Bug 66330 - gcc.c-torture/execute/20040709-1.c compilation fatal error with -flto -O2
Summary: gcc.c-torture/execute/20040709-1.c compilation fatal error with -flto -O2
Status: RESOLVED WORKSFORME
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 6.0
: P3 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-28 22:30 UTC by Tom de Vries
Modified: 2016-02-03 11:17 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom de Vries 2015-05-28 22:30:30 UTC
...
$ build/gcc/xgcc -Bbuild/gcc/ src/gcc/testsuite/gcc.c-torture/execute/20040709-1.c  -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects  -w  -lm -o ./20040709-1.exe -save-temps -fipa-pta
lto1: fatal error: 20040709-1.exe.ltrans1.o: section s.1837.lto_priv.0 is missing
compilation terminated.
lto-wrapper: fatal error: build/gcc/xgcc returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
...
Comment 1 Richard Biener 2015-05-29 11:11:51 UTC
It works for me, so - which target, which linker?
Comment 2 Tom de Vries 2015-05-29 21:33:15 UTC
Revision: trunk@223866

configure line:
...
$ install/bin/gcc -v
Using built-in specs.
COLLECT_GCC=install/bin/gcc
COLLECT_LTO_WRAPPER=install/libexec/gcc/x86_64-unknown-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: src/configure --prefix=install --with-cloog=infra --with-ppl=infra --with-gmp=infra --with-mpfr=infra --with-mpc=infra --with-isl=infra --disable-bootstrap --enable-checking=yes,rtl --enable-languages=c
Thread model: posix
gcc version 6.0.0 20150529 (experimental) (GCC) 
...

Reproduced using installed gcc rather than build-time gc:
...
$ install/bin/gcc src/gcc/testsuite/gcc.c-torture/execute/20040709-1.c -O2 -w -fipa-pta -flto
lto1: fatal error: /tmp/ccVbK4Y1.ltrans1.o: section s.1837.lto_priv.0 is missing
compilation terminated.
lto-wrapper: fatal error: install/bin/gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: lto-wrapper failed
collect2: error: ld returned 1 exit status
...


ld version:
...
$ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.24
...
Comment 3 Tom de Vries 2016-02-03 11:17:12 UTC
Can't reproduce this anymore.

Marking resolved-worksforme.