gcc internal error when passing "-save-temps" to gcc-3.4.3
with stdin as input to a "gcc -S ..." command
("script_output | gcc -S ... -save-temps ...").
Same input compiles fine without -save-temps.

platform:
gcc-3.4.3, glibc-2.3.3-200410112214, binutils-2.15.92.0.2,
linux-2.4.29, pIII/733. gcc compiled with
CFLAGS="-march=i686 -O2" ../gcc-3.4.3/configure ...".

gcc -v:

Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr \
--enable-shared --enable-threads=posix \
--enable-checking --enable-__cxa_atexit \
--enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 3.4.3

gcc error report:

gawk -f ../scripts/gen-as-const.awk 
../linuxthreads/sysdeps/i386/tcb-offsets.sym 
\
| gcc -S -o /scratch/glibc.build/tcb-offsets.hT3 -std=gnu99 -O2 -Wall -Winline -
Wstrict-prototypes -Wwrite-strings -fno-strict-aliasing -march=i686 -save-temps 
-v -mpreferred-stack-boundary=4     -I../include -I. -I/scratch/glibc.build/csu 
-I.. -I../libio  -I/scratch/glibc.build -I../sysdeps/i386/elf -I../libidn/
sysdeps/unix -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/
sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -
I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../
linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/
sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/
linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../
sysdeps/unix/inet -I../sysdeps/unix/sysv/i386/i686 -I../sysdeps/unix/sysv/i386 -
I../sysdeps/unix/sysv -I../sysdeps/unix/i386/i686 -I../sysdeps/unix/i386 -I../
sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/
i686 -I../sysdeps/i386/i486 -I../linuxthreads/sysdeps/i386/i486 -I../sysdeps/
i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 
-I../sysdeps/ieee754/ldbl-96 
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I.
./sysdeps/generic/elf -I../sysdeps/generic  -D_LIBC_REENTRANT -include ../
include/libc-symbols.h       -DHAVE_INITFINI -x c - \
        -MD -MP -MF /scratch/glibc.build/tcb-offsets.h.dT -MT 
'/scratch/glibc.build/
tcb-offsets.h.d /scratch/glibc.build/tcb-offsets.h'
Reading specs from /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/specs
Configured with: ../gcc-3.4.3/configure --prefix=/usr --enable-shared --enable-
threads=posix --enable-checking --enable-__cxa_atexit --enable-languages=c,c++ -
-disable-nls
Thread model: posix
gcc version 3.4.3
 /usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -E -quiet -v -I../include -I. -I/
scratch/glibc.build/csu -I.. -I../libio -I/scratch/glibc.build -I../sysdeps/
i386/elf -I../libidn/sysdeps/unix 
-I../linuxthreads/sysdeps/unix/sysv/linux/i386 
-I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I..
/sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/
unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../
sysdeps/unix/sysv/linux/i386/i686 -I../sysdeps/unix/sysv/linux/i386 -I../
sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/
unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386/i686 -I../sysdeps/
unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386/i686 -I../sysdeps/
unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../
sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../linuxthreads/sysdeps/i386/i486 -I.
./sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/
ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../
sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -MD /scratch/
glibc.build/tcb-offsets.d -MF /scratch/glibc.build/tcb-offsets.h.dT -MP -MT /
scratch/glibc.build/tcb-offsets.h.d /scratch/glibc.build/tcb-offsets.h -MQ /
scratch/glibc.build/tcb-offsets.hT3 -D_LIBC_REENTRANT -DHAVE_INITFINI -include .
./include/libc-symbols.h - -march=i686 -mpreferred-stack-boundary=4 -std=gnu99 -
Wall -Winline -Wstrict-prototypes -Wwrite-strings -fno-strict-aliasing -O2 -o -.
i
#include "..." search starts here:
#include <...> search starts here:
 ../include
 .
 /scratch/glibc.build/csu
 ..
 ../libio
 /scratch/glibc.build
 ../sysdeps/i386/elf
 ../libidn/sysdeps/unix
 ../linuxthreads/sysdeps/unix/sysv/linux/i386
 ../linuxthreads/sysdeps/unix/sysv/linux
 ../linuxthreads/sysdeps/pthread
 ../sysdeps/pthread
 ../linuxthreads/sysdeps/unix/sysv
 ../linuxthreads/sysdeps/unix
 ../linuxthreads/sysdeps/i386/i686
 ../linuxthreads/sysdeps/i386
 ../sysdeps/unix/sysv/linux/i386/i686
 ../sysdeps/unix/sysv/linux/i386
 ../sysdeps/unix/sysv/linux
 ../sysdeps/gnu
 ../sysdeps/unix/common
 ../sysdeps/unix/mman
 ../sysdeps/unix/inet
 ../sysdeps/unix/sysv/i386/i686
 ../sysdeps/unix/sysv/i386
 ../sysdeps/unix/sysv
 ../sysdeps/unix/i386/i686
 ../sysdeps/unix/i386
 ../sysdeps/unix
 ../sysdeps/posix
 ../sysdeps/i386/i686/fpu
 ../sysdeps/i386/i686
 ../sysdeps/i386/i486
 ../linuxthreads/sysdeps/i386/i486
 ../sysdeps/i386/fpu
 ../sysdeps/i386
 ../sysdeps/wordsize-32
 ../sysdeps/ieee754/ldbl-96
 ../sysdeps/ieee754/dbl-64
 ../sysdeps/ieee754/flt-32
 ../sysdeps/ieee754
 ../sysdeps/generic/elf
 ../sysdeps/generic
 /usr/local/include
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/include
 /usr/lib/gcc/i686-pc-linux-gnu/3.4.3/../../../../i686-pc-linux-gnu/include
 /usr/include
End of search list.
 /usr/libexec/gcc/i686-pc-linux-gnu/3.4.3/cc1 -fpreprocessed -.i -quiet -
dumpbase - -march=i686 -mpreferred-stack-boundary=4 -auxbase-strip /scratch/
glibc.build/tcb-offsets.hT3 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-
strings -std=gnu99 -version -fno-strict-aliasing -o /scratch/glibc.build/tcb-
offsets.hT3
cc1: error: unrecognized command line option "-.i"
<stdin>:1: internal compiler error: Segmentation fault

Oddly, I could not reproduce it with

  gcc -c -save-temps $CFLAGS -o name.o < input.c

when I tried to reproduce the error with a simple
test case. gcc-3.4.3 simply compiles the input
to "name.o", no temporary file is found, and
no error is reported by gcc.

-- 
           Summary: [3.4.3] "input|gcc -S -save-temps ..." internal error
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cgweav at email dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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

Reply via email to