summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr45101.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr45101.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr45101.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr45101.c b/gcc/testsuite/gcc.dg/pr45101.c
new file mode 100644
index 000000000..d9615725a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr45101.c
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/45101 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fgcse -fgcse-las" } */
+
+struct
+{
+ int i;
+} *s;
+
+extern void bar (void);
+
+void foo ()
+{
+ !s ? s->i++ : bar ();
+}