Bug#491115: gcc-4.3: segfaults when compiling a fputs() call with one argument and no headers
Package: gcc-4.3
Version: 4.3.1-2
Severity: normal
When compiling a program with a fputs() call with exactly one argument
passed to it, and not including any headers, gcc segfaults.
Compile:
int main(int argc, char **argv)
{
fputs("");
return 0;
}
Do not include any headers. The fputs call is wrong, but the compiler
should not segfault.
yury@orbit:~$ gcc bug.c
bug.c: In function ‘main’:
bug.c:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.
This happens with gcc-4.3, but not 4.1 or 4.2. This occurs on amd64, but
people have reported it working fine on i386.
-- System Information:
Debian Release: lenny/sid
APT prefers testing
APT policy: (900, 'testing'), (800, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.25-yury (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gcc-4.3 depends on:
ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina
ii cpp-4.3 4.3.1-2 The GNU C preprocessor
ii gcc-4.3-base 4.3.1-2 The GNU Compiler Collection (base
ii libc6 2.7-10 GNU C Library: Shared libraries
ii libgcc1 1:4.3.1-2 GCC support library
ii libgomp1 4.3.1-2 GCC OpenMP (GOMP) support library
Versions of packages gcc-4.3 recommends:
ii libc6-dev 2.7-10 GNU C Library: Development Librari
-- no debconf information
Reply to: