]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/59737 (ice from optimize_inline_calls)
authorJakub Jelinek <jakub@redhat.com>
Wed, 12 Feb 2014 16:55:51 +0000 (17:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 12 Feb 2014 16:55:51 +0000 (17:55 +0100)
PR middle-end/59737
* g++.dg/ipa/pr59737.C: New test.

From-SVN: r207735

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

index 5507a955b9c335c0bcb9353d945e0cb6436dd4cb..a7f25115e3a07c84ff4cc097eb2981535ec89c84 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-12  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/59737
+       * g++.dg/ipa/pr59737.C: New test.
+
 2014-02-12  H.J. Lu  <hongjiu.lu@intel.com>
 
        * g++.dg/opt/pr52727.C: Compile with -march=i686 for ia32.
diff --git a/gcc/testsuite/g++.dg/ipa/pr59737.C b/gcc/testsuite/g++.dg/ipa/pr59737.C
new file mode 100644 (file)
index 0000000..cb8a8aa
--- /dev/null
@@ -0,0 +1,48 @@
+// PR middle-end/59737
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct A
+{
+  virtual void foo (int &x);
+  friend void
+  operator>> (int &x, A &y)
+  {
+    y.foo (x);
+  }
+};
+
+struct B : public A
+{
+  void foo (int &x);
+};
+
+struct F : public B
+{
+  void foo (int &x);
+};
+
+struct G : public F
+{
+  void foo (int &);
+};
+
+struct C : A
+{
+  void foo (int &);
+  struct H : public G
+  {
+    void foo (int &);
+  };
+  struct D : A
+  {
+    H d;
+  };
+};
+
+void
+C::foo (int &x)
+{
+  D a;
+  x >> a.d;
+}