131
|
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 }
|