Merge with gcc-4_3-branch up to revision 175516.
[official-gcc.git] / gcc / testsuite / gcc.c-torture / execute / pr44202-1.c
blob37e84f2fc377631f7ca986c7f3dfce92c8da4e92
1 extern __attribute__ ((__noreturn__)) void exit(int);
2 extern __attribute__ ((__noreturn__)) void abort(void);
3 __attribute__ ((__noinline__))
4 int
5 add512(int a, int *b)
7 int c = a + 512;
8 if (c != 0)
9 *b = a;
10 return c;
13 __attribute__ ((__noinline__))
14 int
15 add513(int a, int *b)
17 int c = a + 513;
18 if (c == 0)
19 *b = a;
20 return c;
23 int main(void)
25 int b0 = -1;
26 int b1 = -1;
27 if (add512(-512, &b0) != 0 || b0 != -1 || add513(-513, &b1) != 0 || b1 != -513)
28 abort ();
29 exit (0);