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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [931031-1.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* The bit-field below would have a problem if __INT_MAX__ is too
2
   small.  */
3
#if __INT_MAX__ < 2147483647
4
int
5
main (void)
6
{
7
  exit (0);
8
}
9
#else
10
struct foo
11
{
12
  unsigned y:1;
13
  unsigned x:32;
14
};
15
 
16
int
17
f (x)
18
     struct foo x;
19
{
20
  int t = x.x;
21
  if (t < 0)
22
    return 1;
23
  return t+1;
24
}
25
 
26
main ()
27
{
28
  struct foo x;
29
  x.x = -1;
30
  if (f (x) == 0)
31
    abort ();
32
  exit (0);
33
}
34
#endif

powered by: WebSVN 2.1.0

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