Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / pr48837.c
blobffc65b9dc8c58df688d8eb24bf94f19f1866a566
1 /* PR tree-optimization/48837 */
2 /* { dg-do run } */
3 /* { dg-options "-O2" } */
5 void abort (void);
7 __attribute__((noinline))
8 int baz(void)
10 return 1;
13 inline const int *bar(const int *a, const int *b)
15 return *a ? a : b;
18 int foo(int a, int b)
20 return a || b ? baz() : foo(*bar(&a, &b), 1) + foo(1, 0);
23 int main(void)
25 if (foo(0, 0) != 2)
26 abort();
28 return 0;