Red Hat Bugzilla – Bug 53680
gcc-2.96-85: ICE in fixup_var_refs_1
Last modified: 2007-04-18 12:37:08 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.76 [en] (X11; U; Linux 2.2.19 i686)
Description of problem:
I was trying to compile the (small) program from the URL above.
gcc ICE on it...
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. wget http://www.linuxgazette.com/issue69/misc/mathew/Makefile.txt
2. mv Makefile.txt Makefile
3. wget http://www.linuxgazette.com/issue69/misc/mathew/myaudio.c.txt
4. mv myaudio.c.txt myaudio.c
5. wget http://www.linuxgazette.com/issue69/misc/mathew/myaudio.h.txt
6. mv myaudio.h.txt myaudio.h
8. file myaudio.o
myaudio.h: In function `getvect':
myaudio.h:117: Internal compiler error in fixup_var_refs_1, at
Please submit a full bug report.
See <URL:http://bugzilla.redhat.com/bugzilla/> for instructions.
make: *** [myaudio.o] o[IBKA 1
myaudio.o: ELF 32-bit LSB relocatable, Intel 80386, version 1, not stripped
Created attachment 31799 [details]
This program causes ICE. Just untar it and make.
This is a bug in myaudio.h, getvect's asm constraints are bogus (anyone
care to explain me what the code actually wants to do?).
int foo (int x)
int a, b, c;
asm("" : "=a" (a) : "c" (x), "m" (b), "m" (a), "m" (c));
is a simplified testcase, note a being requested into eax register and into
memory at the same time. Note that this ICEs with gcc 2.95.x, gcc 3.0.1
and gcc 3.1 CVS head too.
I am very sorry for reopening this bug, but I think it is important to mention
that this program compiles with no problems with gcc-2.91.66 aka kgcc from
RH7.0. And I also have to admit that, being compiled with kgcc, the program
It is a driver for pc-speaker and it really plays simple sounds thru the beeper.
I am sorry for such an importunate behavior, I just think that if it works
being compiled with kgcc, it should also work with gcc.
It does not matter. The source is crappy, gcc inline asm's have to be written
so that they can be fulfilled by gcc.
If you want to compile this, removing getvect routine altogether should help,
AFAIC nothing uses it.