This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug in -fsyntax-only
- To: gcc-bugs at gcc dot gnu dot org
- Subject: bug in -fsyntax-only
- From: Harold Levy <hlevy at synopsys dot COM>
- Date: Mon, 19 Mar 2001 13:53:18 -0800
Hello, here is a bug that arises with -fsyntax-only
(1) Version Info (gcc -v)
.../gcc-lib/sparc-sun-solaris2.7/2.95.2/specs
gcc version 2.95.2 19991024 (release)
(2) Command Line
gcc -fsyntax-only asdf.c
(3) Compiler Output
gcc: Internal compiler error: program cc1 got fatal signal 11
(4) Preprocessor File (asdf.i from 'gcc -fsyntax_only -save_temps asdf.c')
# 1 "asdf.c"
typedef unsigned int size_t ;
extern void * malloc ( size_t ) ;
void *
func (
size_t a,
size_t b
)
{
size_t i ;
void * v ;
i = 1 + a * b ;
v = malloc ( i ) ;
return ( v ) ;
}
(5) Configuration Info
Just specified --prefix and --exec-prefix. Built with Sun's compiler
cc: SC4.0 18 Oct 1995 C 4.0
(6) Description
The problem seems to be specific to the multiplication in 'i = 1 + a * b';
if you change it to 'i = 1 + a + b' the fatal goes away.
Thanks for any help,
-Harold Levy
hlevy@synopsys.com
(800) 843-5669, x5263