Patchwork Fix PR ipa/60315 (inliner explosion)

login
register
mail settings
Submitter Jakub Jelinek
Date March 28, 2014, 10:26 a.m.
Message ID <20140328102641.GH1817@tucnak.redhat.com>
Download mbox | patch
Permalink /patch/334645/
State New
Headers show

Comments

Jakub Jelinek - March 28, 2014, 10:26 a.m.
On Thu, Mar 27, 2014 at 12:02:01PM +0100, Andreas Schwab wrote:
> > --- 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))();
> > +}
> 
> FAIL: g++.dg/torture/pr60315.C  -O0  (test for excess errors)
> Excess errors:
> /usr/local/gcc/gcc-20140327/gcc/testsuite/g++.dg/torture/pr60315.C:7:19: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11
> /usr/local/gcc/gcc-20140327/gcc/testsuite/g++.dg/torture/pr60315.C:7:21: warning: override controls (override/final) only available with -std=c++11 or -std=gnu++11

As dg-torture.exp doesn't cycle through c++98/c++11/c++14, I've committed
this fix as obvious:

2014-03-28  Jakub Jelinek  <jakub@redhat.com>

	PR ipa/60315
	* g++.dg/torture/pr60315.C: Add -std=c++11 to dg-options.



	Jakub

Patch

--- gcc/testsuite/g++.dg/torture/pr60315.C.jj	2014-03-26 10:13:22.000000000 +0100
+++ gcc/testsuite/g++.dg/torture/pr60315.C	2014-03-28 11:07:08.671208010 +0100
@@ -1,4 +1,7 @@ 
+// PR ipa/60315
 // { dg-do compile }
+// { dg-options "-std=c++11" }
+
 struct Base {
     virtual int f() = 0;
 };