aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr54676.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr54676.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr54676.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr54676.c b/gcc/testsuite/gcc.dg/pr54676.c
new file mode 100644
index 000000000..97032edf6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54676.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/54676 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-ccp -fno-tree-copy-prop -fno-tree-fre -ftree-vrp" } */
+
+struct S
+{
+ int s:1;
+};
+
+struct S bar (void);
+
+int a;
+
+void
+foo (int x)
+{
+ struct S s = bar ();
+ while (!a)
+ {
+ int l = 94967295;
+ a = x || (s.s &= l);
+ }
+}