OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr31448.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
/* PR middle-end/31448, this used to ICE during expand because
2
   reduce_to_bit_field_precision was not ready to handle constants. */
3
 
4
typedef struct _st {
5
    int iIndex : 24;
6
    int iIndex1 : 24;
7
} st;
8
st *next;
9
void g(void)
10
{
11
    st *next = 0;
12
    int nIndx;
13
    const static int constreg[] = { 0,};
14
    nIndx = 0;
15
    next->iIndex = constreg[nIndx];
16
}
17
void f(void)
18
{
19
    int nIndx;
20
    const static int constreg[] = { 0xFEFEFEFE,};
21
    nIndx = 0;
22
    next->iIndex = constreg[nIndx];
23
    next->iIndex1 = constreg[nIndx];
24
}
25
int main(void)
26
{
27
  st a;
28
  next = &a;
29
  f();
30
  if (next->iIndex != 0xFFFEFEFE)
31
    __builtin_abort ();
32
  if (next->iIndex1 != 0xFFFEFEFE)
33
    __builtin_abort ();
34
  return 0;
35
}
36
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.