On Tue, Apr 16, 2019 at 02:51:14PM +0200, Jan Hubicka wrote: > > Hi Jan, > > > > The test causes > > > > WARNING: lto.exp does not support dg-do > > WARNING: lto.exp does not support dg-options in primary source file > > > > This is fixed by the following patch > > > > --- ../_clean/gcc/testsuite/g++.dg/lto/pr89358_0.C 2019-04-15 > > 00:04:48.000000000 +0200 > > +++ gcc/testsuite/g++.dg/lto/pr89358_0.C 2019-04-16 13:13:14.000000000 > > +0200 > > @@ -1,5 +1,5 @@ > > -/* { dg-do link } */ > > -/* { dg-options "-std=c++17" } */ > > +/* { dg-lto-do link } */ > > +/* { dg-lto-options "-std=c++17" } */ > > Thanks, this changle is OK. > Honza > > #include <map> > > > > extern void test(); > > --- ../_clean/gcc/testsuite/g++.dg/lto/pr89358_1.C 2019-04-15 > > 00:04:48.000000000 +0200 > > +++ gcc/testsuite/g++.dg/lto/pr89358_1.C 2019-04-16 13:14:44.000000000 > > +0200 > > @@ -1,4 +1,3 @@ > > -/* { dg-options "-std=c++14" } */
But this change is not ok and makes the test useless. The whole point of the test is to test if compiling one TU with -std=c++17 and another one with -std=c++14 and linking them together doesn't produce warnings. I think dg-options in *_1.C is ok, several tests have those: 20100302_1.C:// { dg-options "-fabi-version=0" } pr60150_1.C:// { dg-options "-fno-lto" } pr63270_2.C:// { dg-options "-fno-lto" } pr64076_1.C:// { dg-options -fno-lto } pr65276_1.C:// { dg-options "-O2" } pr68811_1.C:// { dg-options "-O2 -flto -w" } Jakub