Patchwork Fix PR ipa/60315 (inliner explosion)

login
register
mail settings
Submitter Andreas Schwab
Date March 26, 2014, 8:33 a.m.
Message ID <mvmk3bhl5q7.fsf@hawking.suse.de>
Download mbox | patch
Permalink /patch/333803/
State New
Headers show

Comments

Andreas Schwab - March 26, 2014, 8:33 a.m.
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.

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))();
-}