Add new test-case.
authorMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 12:08:56 +0000 (13:08 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 2 Dec 2020 12:08:56 +0000 (13:08 +0100)
gcc/testsuite/ChangeLog:

PR tree-optimization/98084
* gcc.dg/tree-ssa/pr98094.c: New test.

gcc/testsuite/gcc.dg/tree-ssa/pr98094.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr98094.c b/gcc/testsuite/gcc.dg/tree-ssa/pr98094.c
new file mode 100644 (file)
index 0000000..f88534a
--- /dev/null
@@ -0,0 +1,21 @@
+/* PR tree-optimization/98084 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct
+{
+  unsigned a : 10;
+} b;
+
+int c;
+void e();
+void d ()
+{
+  c = b.a;
+  if (c == 8 || c == 0)
+    ;
+  else if (c > 8 * 8)
+    ;
+  else if (c < 8 * 8)
+    e ();
+}