Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/nested-calls-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* PR middle-end/24003 */ | |
2 /* Contributed by Eric Botcazou <ebotcazou@adacore.com> */ | |
3 | |
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 } } } */ | |
7 | |
8 #include <limits.h> | |
9 | |
10 typedef unsigned long uns32_t; | |
11 typedef unsigned long long uns64_t; | |
12 | |
13 extern void abort(void); | |
14 | |
15 uns32_t lo (uns64_t p) | |
16 { | |
17 return (uns32_t)p; | |
18 } | |
19 | |
20 uns64_t concat (uns32_t p1, uns32_t p2) | |
21 { | |
22 #if LLONG_MAX > 2147483647L | |
23 return ((uns64_t)p1 << 32) | p2; | |
24 #else | |
25 return 0; | |
26 #endif | |
27 } | |
28 | |
29 uns64_t lshift32 (uns64_t p1, uns32_t p2) | |
30 { | |
31 return concat (lo (p1), p2); | |
32 } | |
33 | |
34 int main(void) | |
35 { | |
36 #if LLONG_MAX > 2147483647L | |
37 if (lshift32 (0xFFFFFFFF12345678ULL, 0x90ABCDEFUL) != 0x1234567890ABCDEFULL) | |
38 abort (); | |
39 #endif | |
40 | |
41 return 0; | |
42 } |