Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.c-torture/execute/20180131-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* PR rtl-optimization/84071 */ | |
2 /* Reported by Wilco <wilco@gcc.gnu.org> */ | |
3 | |
4 extern void abort (void); | |
5 | |
6 typedef union | |
7 { | |
8 signed short ss; | |
9 unsigned short us; | |
10 int x; | |
11 } U; | |
12 | |
13 int f(int x, int y, int z, int a, U u) __attribute__((noclone, noinline)); | |
14 | |
15 int f(int x, int y, int z, int a, U u) | |
16 { | |
17 return (u.ss <= 0) + u.us; | |
18 } | |
19 | |
20 int main (void) | |
21 { | |
22 U u = { .ss = -1 }; | |
23 | |
24 if (f (0, 0, 0, 0, u) != (1 << sizeof (short) * 8)) | |
25 abort (); | |
26 | |
27 return 0; | |
28 } |