PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / 20090711-1.c
blob5c3d93a37ed7935f9cde044c87ba350842f8c12c
1 /* Used to be miscompiled at -O0 due to incorrect choice of sign extension
2 vs. zero extension. __attribute__ ((noinline)) added to try to make it
3 fail at higher optimization levels too. */
5 extern void abort (void);
7 long long __attribute__ ((noinline))
8 div (long long val)
10 return val / 32768;
13 int main (void)
15 long long d1 = -990000000;
16 long long d2 = div(d1);
17 if (d2 != -30212)
18 abort ();
19 return 0;