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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [bitfld-4.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* When comparisons of bit-fields to unsigned constants got shortened,
2
   the shortened signed constant was wrongly marked as overflowing,
3
   leading to a later integer_zerop failure and misoptimization.
4
 
5
   Related to bug tree-optimization/16437 but shows the problem on
6
   32-bit systems.  */
7
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
8
 
9
extern void abort (void);
10
 
11
struct s { int a:12, b:20; };
12
 
13
struct s x = { -123, -456 };
14
 
15
int
16
main (void)
17
{
18
  if (x.a != -123U || x.b != -456U)
19
    abort ();
20
  return 0;
21
}

powered by: WebSVN 2.1.0

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