1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-optimized" } */
3
4 typedef struct { unsigned short a; } A;
5
6 extern void abort (void);
7 extern void exit (int);
8
foo(unsigned int x)9 void foo (unsigned int x)
10 {
11 if (x != 0x800 && x != 0x810)
12 abort ();
13 }
14
15 int
main(int argc,char ** argv)16 main (int argc, char **argv)
17 {
18 int i;
19 for (i = 0; i < 2; ++i)
20 foo (((A) { ((!(i >> 4) ? 8 : 64 + (i >> 4)) << 8) + (i << 4) } ).a);
21 exit (0);
22 }
23 /* { dg-final { scan-tree-dump-times "Invalid sum" 0 "optimized" } } */
24