Re: EGCS optimiser bugs...
On Mon 14 Jun 1999, Christopher C Chimelis wrote:
>
> I'm reporting at least three optimiser bugs to the egcs list. The examples
> I'm using are from xspread, r-base, and a particularly nasty one in
> nextaw.
Did this one ever get fixed? At least on alpha.debian.nl it still fails.
This is from one of the sound packages, I believe, heavily preprocessed
and minimized. So don't complain that the source doesn't do anything
useful; it's not supposed to :-)
--snip-snip-----------------------------------------------------------
/*
$ gcc -c -O2 egcs-bug.c # compiles fine with -O
egcs-bug.c: In function `main':
egcs-bug.c:43: internal error--unrecognizable insn:
(insn 162 154 69 (set (reg:SI 86)
(reg/v:DI 71)) -1 (insn_list 154 (nil))
(nil))
../../gcc/toplev.c:1378: Internal compiler error in function fatal_insn
*/
typedef enum {
JCS_UNKNOWN,
JCS_GRAYSCALE,
JCS_RGB
} J_COLOR_SPACE;
struct jcs {
J_COLOR_SPACE color;
};
int
main(int argc, char *argv[])
{
int gray = 0, type, y;
struct jcs cinfo;
for (;;) {
if (!y)
break;
switch (y) {
case '1':
gray = 1 ;
break;
}
}
type = gray ? 1 : 2 ;
if (gray)
x();
x2(&cinfo);
cinfo.color = gray ? JCS_GRAYSCALE : JCS_RGB;
for (y = 0; y < 3; y++)
if (x3(type)) {
}
}
--snip-snip-----------------------------------------------------------
Paul Slootman
--
home: paul@wurtel.demon.nl | work: paul@murphy.nl | debian: paul@debian.org
http://www.wurtel.demon.nl | Murphy Software, Enschede, the Netherlands
Reply to: