PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / nested-calls-1.c
blob500fed2fb770f0a680537e41a8f32bfa9b1e7bda
1 /* PR middle-end/24003 */
2 /* Contributed by Eric Botcazou <ebotcazou@adacore.com> */
4 /* { dg-do run } */
5 /* { dg-options "-std=c99 -O -fno-inline" } */
6 /* { dg-options "-std=c99 -O -fno-inline -mtune=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
8 #include <limits.h>
10 typedef unsigned long uns32_t;
11 typedef unsigned long long uns64_t;
13 extern void abort(void);
15 uns32_t lo (uns64_t p)
17 return (uns32_t)p;
20 uns64_t concat (uns32_t p1, uns32_t p2)
22 #if LLONG_MAX > 2147483647L
23 return ((uns64_t)p1 << 32) | p2;
24 #else
25 return 0;
26 #endif
29 uns64_t lshift32 (uns64_t p1, uns32_t p2)
31 return concat (lo (p1), p2);
34 int main(void)
36 #if LLONG_MAX > 2147483647L
37 if (lshift32 (0xFFFFFFFF12345678ULL, 0x90ABCDEFUL) != 0x1234567890ABCDEFULL)
38 abort ();
39 #endif
41 return 0;