diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr32244-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/pr32244-1.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr32244-1.c b/gcc/testsuite/gcc.c-torture/execute/pr32244-1.c new file mode 100644 index 000000000..afad25650 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/pr32244-1.c @@ -0,0 +1,20 @@ +struct foo +{ + unsigned long long b:40; +} x; + +extern void abort (void); + +void test1(unsigned long long res) +{ + /* The shift is carried out in 40 bit precision. */ + if (x.b<<32 != res) + abort (); +} + +int main() +{ + x.b = 0x0100; + test1(0); + return 0; +} |