http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47274

--- Comment #3 from Anton Blanchard <anton at samba dot org> 2011-01-15 
02:04:04 UTC ---
I'm seeing this too:

# cat test1.c
void *ptr;

# cat test2.c
extern void *ptr;
void foo()
{
    ptr = 0;
}

# gcc -flto -c test1.c
# gcc -flto -c test2.c 
# gcc -flto test1.o test2.o

lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:306
Please submit a full bug report

-v output:

Using built-in specs.
COLLECT_GCC=/root/gcc-installed/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../gcc/configure --build=powerpc64-linux
--enable-targets=powerpc64-linux --prefix=/root/gcc-installed --disable-nls
--with-gmp=/root/gcc-installed --with-mpfr=/root/gcc-installed
--with-libelf=/root/gcc-installed --with-cloog=/root/gcc-installed
--with-ppl=/root/gcc-installed --disable-werror
--with-ld=/root/gcc-installed/bin/ld --with-as=/root/gcc-installed/bin/as
--enable-languages=c,c++,fortran --enable-lto : (reconfigured) ../gcc/configure
--build=powerpc64-linux --enable-targets=powerpc64-linux
--prefix=/root/gcc-installed --disable-nls --with-gmp=/root/gcc-installed
--with-mpfr=/root/gcc-installed --with-libelf=/root/gcc-installed
--with-cloog=/root/gcc-installed --with-ppl=/root/gcc-installed
--disable-werror --with-ld=/root/gcc-installed/bin/ld
--with-as=/root/gcc-installed/bin/as --enable-lto build_alias=powerpc64-linux
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 4.6.0 20110114 (experimental) (GCC) 
COMPILER_PATH=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/libexec/gcc/powerpc64-linux/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/lib/gcc/powerpc64-linux/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/bin/
LIBRARY_PATH=/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/lib/:/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-flto'
 /root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/collect2 -plugin
/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/liblto_plugin.so
-plugin-opt=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
-plugin-opt=-fresolution=/tmp/ccSsas7e.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s -flto
--eh-frame-hdr -V -Qy -m elf64ppc -dynamic-linker /lib64/ld64.so.1
/usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o
/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/crtbegin.o
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../lib64
-L/lib/../lib64 -L/usr/lib/../lib64
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../../../powerpc64-linux/lib
-L/root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/../../.. test1.o test2.o
-lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s
--no-as-needed /root/gcc-installed/lib/gcc/powerpc64-linux/4.6.0/crtend.o
/usr/lib/../lib64/crtn.o
GNU ld (GNU Binutils) 2.21.51.20110113
  Supported emulations:
   elf64ppc
   elf32ppclinux
   elf32ppc
   elf32ppcsim
 /root/gcc-installed/bin/gcc @/tmp/ccgYtfeo.args
Using built-in specs.
COLLECT_GCC=/root/gcc-installed/bin/gcc
COLLECT_LTO_WRAPPER=/root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto-wrapper
Target: powerpc64-linux
Configured with: ../gcc/configure --build=powerpc64-linux
--enable-targets=powerpc64-linux --prefix=/root/gcc-installed --disable-nls
--with-gmp=/root/gcc-installed --with-mpfr=/root/gcc-installed
--with-libelf=/root/gcc-installed --with-cloog=/root/gcc-installed
--with-ppl=/root/gcc-installed --disable-werror
--with-ld=/root/gcc-installed/bin/ld --with-as=/root/gcc-installed/bin/as
--enable-languages=c,c++,fortran --enable-lto : (reconfigured) ../gcc/configure
--build=powerpc64-linux --enable-targets=powerpc64-linux
--prefix=/root/gcc-installed --disable-nls --with-gmp=/root/gcc-installed
--with-mpfr=/root/gcc-installed --with-libelf=/root/gcc-installed
--with-cloog=/root/gcc-installed --with-ppl=/root/gcc-installed
--disable-werror --with-ld=/root/gcc-installed/bin/ld
--with-as=/root/gcc-installed/bin/as --enable-lto build_alias=powerpc64-linux
--enable-languages=c,c++,fortran,lto --no-create --no-recursion
Thread model: posix
gcc version 4.6.0 20110114 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-c' '-v' '-fltrans-output-list=/tmp/ccd96jEi.ltrans.out'
'-fwpa' '-fresolution=/tmp/ccSsas7e.res'
 /root/gcc-installed/libexec/gcc/powerpc64-linux/4.6.0/lto1 -quiet -dumpbase
test1.o -auxbase test1 -version -fltrans-output-list=/tmp/ccd96jEi.ltrans.out
-fwpa -fresolution=/tmp/ccSsas7e.res @/tmp/cciQWnDi
GNU GIMPLE (GCC) version 4.6.0 20110114 (experimental) (powerpc64-linux)
    compiled by GNU C version 4.6.0 20110114 (experimental), GMP version 4.3.2,
MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU GIMPLE (GCC) version 4.6.0 20110114 (experimental) (powerpc64-linux)
    compiled by GNU C version 4.6.0 20110114 (experimental), GMP version 4.3.2,
MPFR version 2.4.2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
lto1: internal compiler error: in lto_varpool_replace_node, at lto-symtab.c:306
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: /root/gcc-installed/bin/gcc returned 1 exit status
/root/gcc-installed/bin/ld: lto-wrapper failed
collect2: ld returned 1 exit status

Reply via email to