]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR middle-end/32950 (ICE with __complex__ double)
authorH.J. Lu <hongjiu.lu@intel.com>
Sun, 7 Jun 2009 13:39:54 +0000 (13:39 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Sun, 7 Jun 2009 13:39:54 +0000 (06:39 -0700)
2009-06-07  H.J. Lu  <hongjiu.lu@intel.com>

Backport from mainline:
2009-06-07  H.J. Lu  <hongjiu.lu@intel.com>

PR middle-end/32950
* g++.dg/torture/pr32950.C: New.

From-SVN: r148246

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

index dc619a19ea5ea88c03ae19f262d81d11014dda1b..540110f71171b47636d243ecb9048027f5f7f2cd 100644 (file)
@@ -1,3 +1,11 @@
+2009-06-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       Backport from mainline:
+       2009-06-07  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR middle-end/32950
+       * g++.dg/torture/pr32950.C: New.
+
 2009-06-04  Richard Guenther  <rguenther@suse.de>
 
        Backport from mainline
diff --git a/gcc/testsuite/g++.dg/torture/pr32950.C b/gcc/testsuite/g++.dg/torture/pr32950.C
new file mode 100644 (file)
index 0000000..8d64296
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+struct A
+{
+  __complex__ double c;
+};
+
+struct B
+{
+  A a;
+  B(A x) : a(x) {}
+  void foo();
+};
+
+void bar()
+{
+  B b = A();
+  B(b).foo();
+}