Mercurial > hg > CbC > CbC_gcc
view 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 |
line wrap: on
line source
/* PR rtl-optimization/84071 */ /* Reported by Wilco <wilco@gcc.gnu.org> */ extern void abort (void); typedef union { signed short ss; unsigned short us; int x; } U; int f(int x, int y, int z, int a, U u) __attribute__((noclone, noinline)); int f(int x, int y, int z, int a, U u) { return (u.ss <= 0) + u.us; } int main (void) { U u = { .ss = -1 }; if (f (0, 0, 0, 0, u) != (1 << sizeof (short) * 8)) abort (); return 0; }