Re: compiling xli - small program to reproduce problem w. gcc

Christian Czezatke (
Mon, 04 Nov 1996 15:32:43 +0100


After all these reports of problems compiling xli and other apps due
to a problem with gcc/alpha getting signal 6 I sat down and fooled
around with "xli.c" trying to produce a source that is as short as
possible and is still reproducing the problem. -- I finally got the
(rather short) listing included below.

When I compile that with gcc 2.7.1 as it comes with Redhat 3.0.3 I
get the following messages:

[ceci@udb xli-1.15]$ gcc -Wall -O2 crashcc.c
crashcc.c: In function `main':
crashcc.c:10: warning: unused variable `longarray'
crashcc.c:14: warning: `hlp' might be used uninitialized in this
crashcc.c:15: warning: `newimage' might be used uninitialized in this
gcc: Internal compiler error: program cc1 got fatal signal 6

Could someone please give that a try with an up-to-date version of gcc
on Linux/Alpha and report whether you still get a "fatal signal 6" when
you try to compile that piece of code with it.

(Anyway, please note that the program's semantic is of course nonsense.
It is just here to show a bug in gcc 2.7.1 -- Just try to compile it,
don't execute it, it will crash immediately.. ;-) )

If the problem is still existant in gcc 2.7.2 I think we should send
that piece of code to the maintainers of gcc/alpha. (BTW: does anyone
know who they are? -- I'm quite new to Linux/Alpha .)


-----------------cut here for crashcc.c---------------------------------
This code was generated from "xli.c" from xli, version 1.15
Compiling this file with optimisation enabled on Linux/Alpha with
gcc 2.7.1 (as shipped with Redhat 3.0.3) causes an internal compiler

void main()
char longarray[32745];
/* CC: if you remove the line above, or make the array smaller (just 1
byte is enough),
gcc will _not_crash -- any number greater than 32745 also seems
to crash gcc
int *hlp; /* CC: it does _not_ crash if you use "int hlp" and do a
"hlp=" */
float newimage;

*hlp = newimage;
-----------------end of crashcc.c---------------------------------

| Christian Czezatke, student of Computer Science at the           |
| Vienna University of Technology (Vienna, Austria, EUROPE)        |
| email:                             |
| PostODBC, a tool to talk to Postgres95 from Windows clients      |
| is freely available (LGPL) from:                                 |
|                             |
| If you are interested in receiving regular information on        |
| the state of PostODBC, please let me know                        |

To unsubscribe: send e-mail to with
'unsubscribe' as the subject.  Do not send it to

Feedback | Store | News | Support | Product Errata | About Us | Linux Info | Search | JumpWords
No Frames | Show Frames

Copyright © 1995-1997 Red Hat Software. Legal notices