aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2013-04-02 12:23:13 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2013-04-02 12:23:13 +0000
commit8034bcbee6a8de54d29e70aa15671ff9ea297493 (patch)
tree363592b42ed1c6c0b30edfd60764fed79d98a612
parent73243d6301a2bd8a9dcae589d6cfb0a459542a94 (diff)
downloadgcc-8034bcbee6a8de54d29e70aa15671ff9ea297493.zip
gcc-8034bcbee6a8de54d29e70aa15671ff9ea297493.tar.gz
gcc-8034bcbee6a8de54d29e70aa15671ff9ea297493.tar.bz2
re PR c++/56768 ([4.7] ICE in make_decl_rtl, at varasm.c:1147)
2013-04-02 Richard Biener <rguenther@suse.de> PR middle-end/56768 * g++.dg/torture/pr56768.C: New testcase. From-SVN: r197349
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56768.C41
2 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7462483..9b17672 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56768
+ * g++.dg/torture/pr56768.C: New testcase.
+
2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
* obj-c++.dg/try-catch-13.mm: Update per PR56725.
diff --git a/gcc/testsuite/g++.dg/torture/pr56768.C b/gcc/testsuite/g++.dg/torture/pr56768.C
new file mode 100644
index 0000000..db504c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56768.C
@@ -0,0 +1,41 @@
+// { dg-do compile }
+// { dg-options "-std=c++0x" }
+
+struct Iter
+{
+ int& operator* ();
+ void operator++ ();
+};
+
+bool operator!= (Iter &, Iter &) { }
+
+struct Container
+{
+ Iter begin () const;
+ Iter end () const;
+};
+
+struct J
+{
+ virtual J *mutable_child ();
+};
+
+struct M
+{
+ M (const Container &);
+ J ns_;
+};
+namespace
+{
+ J MakeNamespace (const Container &src)
+ {
+ J a;
+ J *b = 0;
+ for (const int &c: src)
+ b = b ? b->mutable_child () : &a;
+ return a;
+ }
+}
+M::M (const Container &ns):ns_ (MakeNamespace (ns))
+{
+}