summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/compile/pr40204.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/pr40204.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr40204.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40204.c b/gcc/testsuite/gcc.c-torture/compile/pr40204.c
new file mode 100644
index 000000000..149302a83
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr40204.c
@@ -0,0 +1,15 @@
+/* { dg-require-effective-target int32plus } */
+/* PR middle-end/40204 */
+
+struct S
+{
+ unsigned int a : 4;
+ unsigned int b : 28;
+} s;
+char c;
+
+void
+f (void)
+{
+ s.a = (c >> 4) & ~(1 << 4);
+}