From Bugzilla Helper:
User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i586)
Description of problem:
I have a function that divides a 64-bit integer for conversion to an ASCII
string in some arbitrary base. When I try to check the code for syntax
errors using -fsyntax-only, the compiler bombs out at divstub.c:8.
Steps to Reproduce:
1. Copy the following to a file, such as "divstub.c":
foo (char *s, unsigned long long n)
long long p;
p = 1LL;
while (n / p >= 10)
p = p * 10;
for (i = 0; p; p = p / 10, i++)
s[i] = (n / p) + '0';
n = n % p;
2. Run "gcc -fsyntax-only divstub.c".
Actual Results: divstub.c: In function `foo':
divstub.c:8: Internal error: Segmentation fault.
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
Expected Results: The same code, with "long long" replaced by "long" (and
LL replaced by L), results in no output from the compiler.
The -c and -S options to the compiler still work with this sample code, and
offhand I don't see anything amiss in the .s file.
Fixed by http://gcc.gnu.org/ml/gcc-patches/2000-08/msg00739.html
which I've just backported. It will appear in gcc-2.96-86.