This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Breakage with "Update testsuite to run with slim LTO"
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- Cc: hubicka at ucw dot cz, gcc-patches at gcc dot gnu dot org, dnovillo at google dot com, rguenther at suse dot de, ak at linux dot intel dot com
- Date: Fri, 21 Oct 2011 00:19:32 +0200
- Subject: Re: Breakage with "Update testsuite to run with slim LTO"
- References: <20110927172322.GA21068@kam.mff.cuni.cz> <201110201732.p9KHWRhv001594@ignucius.se.axis.com>
> > Date: Tue, 27 Sep 2011 19:23:22 +0200
> > From: Jan Hubicka <hubicka@ucw.cz>
>
> > this patch updates testsuite to cover both fat and slim LTO when linker plugin
> > is used and also both linker plugin and collect2 paths. I didn't wanted to
> > slow down testing too much so I just distributes the flags across existing runs
> > with aim to maximize the coverage of testing matrix that is bit large now.
> > I believe it is sufficient and testsuite now runs a bit faster than previously
> > since slim LTO saves some effort.
> >
> > sync and pr34850 tests doesn't pass with slim LTO. The reason is that they
> > excpects diagnostics that is output too late in compilation (usually at
> > expansion time). These should be probably fixed as QOI issue but they are not
> > real bug - the diagnostics will be output at linktime. I will open PR tracking
> > this. We probably should output pretty much everything till end of early opts
> > except for stuff that really looks for optimization results. Especially now
> > when we handle always inline in early inlining.
> >
> > Honza
> >
> > * lib/lto.exp: When linker plugin is available test both
> > plugin/non-plugin LTO paths as well as fat and slim LTO.
> > lib/c-torture.exp: Likewise.
> > lib/gcc-dg.exp: Likweise
>
> Looks like this patch broke, for cris-elf with TOT binutils:
>
> Running /tmp/hpautotest-gcc1/gcc/gcc/testsuite/gcc.dg/torture/dg-torture.exp ...
> FAIL: gcc.dg/torture/cris-asm-mof-1.c scan-assembler in-asm: .mof
> FAIL: gcc.dg/torture/cris-asm-mof-1.c scan-assembler out-asm: .mof
> FAIL: gcc.dg/torture/cris-asm-mof-1.c scan-assembler in2-asm: .mof
> FAIL: gcc.dg/torture/cris-asm-mof-1.c scan-assembler out2-asm: .mof
>
> which for "-O2 -flto -fuse-linker-plugin -fno-fat-lto-objects"
> don't produce any code. Is that expected?
>
> If so, and if the required update is as for the test-cases you
> updated, to add:
> + /* { dg-options "-ffat-lto-objects" } */
Yes, if we scan assembler, we likely want -fno-fat-lto-objects.
>
> then IIUC you need to patch *all* torture tests that use
> scan-assembler and scan-assembler-not. Alternatively, patch
> somewhere else, like not passing it if certain directives are
> used, like scan-assembler{,-not}. And either way, is it safe to
> add that option always, not just when also passing "-flto" or
> something?
Hmm, some of assembler scans still works because they check for
presence of symbols we output anyway, but indeed, it would make more
sense to automatically imply -ffat-lto-object when scan-assembler
is used. I am not sure if my dejagnu skill as on par here however.
Honza
>
> brgds, H-P