PR c++/52582
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2012 14:24:32 +0000 (14:24 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Mar 2012 14:24:32 +0000 (14:24 +0000)
* config/rs6000/rs6000.c (call_ABI_of_interest): Return true
if c_node is NULL.

* g++.dg/opt/pr52582.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185384 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 1ce4c10..e6cae32 100644 (file)
@@ -1,3 +1,8 @@
+2012-03-14  Jakub Jelinek  <jakub@redhat.com>
+
+       PR c++/52582
+       * g++.dg/opt/pr52582.C: New test.
+
 2012-03-14  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/52571
diff --git a/gcc/testsuite/g++.dg/opt/pr52582.C b/gcc/testsuite/g++.dg/opt/pr52582.C
new file mode 100644 (file)
index 0000000..4ba8a26
--- /dev/null
@@ -0,0 +1,28 @@
+// PR c++/52582
+// { dg-do compile }
+// { dg-options "-O2" }
+
+inline void *operator new (__SIZE_TYPE__, void *p) throw ()
+{
+  return p;
+}
+
+struct B
+{
+  virtual ~B ();
+  B ();
+};
+
+struct A : B
+{
+  A () : B () {}
+  virtual void bar ();
+};
+
+void
+foo ()
+{
+  char a[64];
+  B *b = new (&a) A ();
+  b->~B ();
+}