aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr104381.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr104381.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr104381.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr104381.c b/gcc/testsuite/gcc.dg/pr104381.c
new file mode 100644
index 0000000..a3aec91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr104381.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -gtoggle -fdump-tree-optimized" } */
+
+int foo (int x)
+{
+ int tem = x + 1;
+ int tem2 = tem - 1;
+ return tem2;
+}
+
+int
+__attribute__((optimize("no-tree-pre")))
+bar (int x)
+{
+ int tem = x + 1;
+ int tem2 = tem - 1;
+ return tem2;
+}
+
+// { dg-final { scan-tree-dump-not "DEBUG " "optimized" } }