Subject: -O breaks
To: RiscBSD <port-arm32@NetBSD.ORG>
From: Ale Terlevich <A.I.Terlevich@durham.ac.uk>
List: port-arm32
Date: 09/25/1996 11:09:21
  Should I be reporting cases in which -O breaks gcc2.7.2.1 here?

The latest one I've found is in display.c in ImageMagick.

It compiles with -O, but with -O2 gives the following error...
(I get virtually the same error with Xtank using only -O)


garp:~/soft/ImageMagick> gcc -v -O2 -I/usr/X11R6.1/include -DCSRG_BASED 
-DFUNCPROTO=15 -DNARROWPROTO -I./magick -c display.c
gcc version 2.7.2.1
 /usr/libexec/cpp -lang-c -v -I/usr/X11R6.1/include -I./magick -undef 
-D__GNUC__=2 -D__GNUC_MINOR__=7 -Dunix -Darm32 -D__arm32__ -D__arm6__ 
-Driscbsd -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ -D__unix__ -D__arm32__ 
-D__arm32__ -D__arm6__ -D__riscbsd__ -D__NetBSD__ -D__KPRINTF_ATTRIBUTE__ 
-D__unix -D__arm32 -D__riscbsd -Asystem(unix) -Asystem(NetBSD) -Acpu(arm) 
-Amachine(arm) -D__CHAR_UNSIGNED__ -D__OPTIMIZE__ -DCSRG_BASED 
-DFUNCPROTO=15 -DNARROWPROTO display.c /var/tmp/cc000203.i
GNU CPP version 2.7.2.1 (ARM/NetBSD)
#include "..." search starts here:
#include <...> search starts here:
 /usr/X11R6.1/include
 ./magick
 /usr/include
End of search list.
 /usr/libexec/cc1 /var/tmp/cc000203.i -quiet -dumpbase display.c -O2 
-version -o /var/tmp/cc000203.s
GNU C version 2.7.2.1 (ARM/NetBSD) compiled by GNU C version 2.7.2.
display.c: In function `XDrawEditImage':
display.c:6848: internal error--insn does not satisfy its constraints:
(insn:QI 3196 5546 5548 (set (reg:SI 2 r2)
        (plus:SI (mult:SI (reg:SI 2 r2)
                (reg:SI 2 r2))
            (reg:SI 3 r3))) 36 {mulsi3+3} (insn_list 5546 (insn_list 3132 
(insn_list 3194 (nil))))
    (expr_list:REG_DEAD (reg:SI 2 r2)
        (expr_list:REG_DEAD (reg:SI 3 r3)
            (nil))))
gcc: Internal compiler error: program cc1 got fatal signal 6
garp:~/soft/ImageMagick>