summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr49000.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr49000.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr49000.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr49000.c b/gcc/testsuite/gcc.dg/pr49000.c
new file mode 100644
index 000000000..32a1cdb35
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr49000.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/49000 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+static
+foo (int x, int y)
+{
+ return x * y;
+}
+
+static int
+bar (int *z)
+{
+ return *z;
+}
+
+void
+baz (void)
+{
+ int a = 42;
+ int *b = &a;
+ foo (bar (&a), 3);
+}
+
+void
+test (void)
+{
+ baz ();
+}