summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr46499-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr46499-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr46499-2.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr46499-2.c b/gcc/testsuite/gcc.dg/pr46499-2.c
new file mode 100644
index 000000000..c3a264816
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr46499-2.c
@@ -0,0 +1,19 @@
+/* PR middle-end/46499 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-ccp -fno-tree-dominator-opts" } */
+
+extern void abort (void);
+
+static inline int
+foo (void)
+{
+ return 0;
+}
+
+int
+main ()
+{
+ if ((foo () == 1) & (foo () == 1))
+ abort ();
+ return 0;
+}