diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/960301-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/960301-1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/960301-1.c b/gcc/testsuite/gcc.c-torture/execute/960301-1.c new file mode 100644 index 00000000000..d75efea9844 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/960301-1.c @@ -0,0 +1,22 @@ +struct foo { + unsigned : 12; + unsigned field : 4; +} foo; +unsigned oldfoo; + +int +bar (unsigned k) +{ + oldfoo = foo.field; + foo.field = k; + if (k) + return 1; + return 2; +} + +main () +{ + if (bar (1U) != 1) + abort (); + exit (0); +} |