* g++.dg/opt/placeholder1.C: New test.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2004 06:32:29 +0000 (06:32 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 21 Jun 2004 06:32:29 +0000 (06:32 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83427 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/placeholder1.C [new file with mode: 0644]

index 78829eb..de97d53 100644 (file)
@@ -1,3 +1,7 @@
+2004-06-21  Richard Sandiford  <rsandifo@redhat.com>
+
+       * g++.dg/opt/placeholder1.C: New test.
+
 2004-06-20  Eric Botcazou  <ebotcazou@libertysurf.fr>
 
        * gcc.dg/compat/struct-complex-1_x.c: Add dummy symbol.
diff --git a/gcc/testsuite/g++.dg/opt/placeholder1.C b/gcc/testsuite/g++.dg/opt/placeholder1.C
new file mode 100644 (file)
index 0000000..a1c9842
--- /dev/null
@@ -0,0 +1,10 @@
+// PR rtl-optimization/15159
+// { dg-options "-O2" }
+struct S { S (); };
+struct P { P (S *); };
+void foo (const P &);
+void bar ()
+{
+  P p = new S;
+  foo (p);
+}