diff mbox

Fix PR ipa/60315 (inliner explosion)

Message ID mvmk3bhl5q7.fsf@hawking.suse.de
State New
Headers show

Commit Message

Andreas Schwab March 26, 2014, 8:33 a.m. UTC
Jan Hubicka <hubicka@ucw.cz> writes:

> Index: testsuite/g++.dg/torture/pr60315.C
> ===================================================================
> --- testsuite/g++.dg/torture/pr60315.C	(revision 0)
> +++ testsuite/g++.dg/torture/pr60315.C	(revision 0)
> @@ -0,0 +1,32 @@
> +// { dg-do compile }
> +struct Base {
> +    virtual int f() = 0;
> +};
> +
> +struct Derived : public Base {
> +    virtual int f() final override {
> +        return 42;
> +    }
> +};
> +
> +extern Base* b;
> +
> +int main() {
> +    return (static_cast<Derived*>(b)->*(&Derived::f))();
> +}
> +// { dg-do compile }
> +struct Base {
> +    virtual int f() = 0;
> +};
> +
> +struct Derived : public Base {
> +    virtual int f() final override {
> +        return 42;
> +    }
> +};
> +
> +extern Base* b;
> +
> +int main() {
> +    return (static_cast<Derived*>(b)->*(&Derived::f))();
> +}

	* g++.dg/torture/pr60315.C: Remove duplication.
diff mbox

Patch

diff --git a/gcc/testsuite/g++.dg/torture/pr60315.C b/gcc/testsuite/g++.dg/torture/pr60315.C
index 7f12260..72ce507 100644
--- a/gcc/testsuite/g++.dg/torture/pr60315.C
+++ b/gcc/testsuite/g++.dg/torture/pr60315.C
@@ -14,19 +14,3 @@  extern Base* b;
 int main() {
     return (static_cast<Derived*>(b)->*(&Derived::f))();
 }
-// { dg-do compile }
-struct Base {
-    virtual int f() = 0;
-};
-
-struct Derived : public Base {
-    virtual int f() final override {
-        return 42;
-    }
-};
-
-extern Base* b;
-
-int main() {
-    return (static_cast<Derived*>(b)->*(&Derived::f))();
-}