------- Comment #11 from pinskia at gcc dot gnu dot org 2008-12-18 23:20
-------
Reduced testcase:
enum JSOp {
JSOP_GETELEM = 5,
JSOP_LIMIT
} ;
typedef struct JSFrameRegs {
unsigned char *pc;
} JSFrameRegs;
struct JSStackFrame {
JSFrameRegs *regs;
};
int
f( unsigned char *pc, enum JSOp nextop )
{
unsigned char *startpc, *endpc, *pc2, *done;
enum JSOp op, lastop, saveop;
while ( pc < endpc )
{
JSStackFrame *fp;
unsigned format, mode, type;
if ( ( fp && fp->regs && pc == fp->regs->pc ) || pc == startpc )
{
if (mode == (2U<<5))
op = (JSOp) ((format & (1U<<8)) ? 256 : 1);
else
if (mode == (3U<<5))
op = (JSOp) ((format & (1U<<8)) ? 257 : 2);
else
op = JSOP_GETELEM;
}
if (op >= JSOP_LIMIT) {
if (((format) & 0x001f) != 8)
return 0;
}
}
}
-- CUT ---
This is related to enums as if I change the type of op to int, GCC does not
crash.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2008-12-18 23:20:57
date| |
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38572