This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

'internal error--unrecognizable insn' on Alpha linux


egcs version: 1.1.2
system type: Alpha (linux)
command line: gcc -c -O2 bla.c

I get this:

egcs-bug.c: In function `main':
egcs-bug.c:42: internal error--unrecognizable insn:
(insn 162 154 69 (set (reg:SI 87)
        (reg/v:DI 71)) -1 (insn_list 154 (nil))
    (nil))
../../gcc/toplev.c:1385: Internal compiler error in function fatal_insn


This happens with -O2 and above. -O is ok.
This is the (heavily preprocessed and minimized) source that triggers it.
It was some huge source file but this example gives the exact same error:

--snip-snip-----------------------------------------------------------
/*
egcs-bug.c: In function `main':
egcs-bug.c:42: 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-----------------------------------------------------------

Thanks,
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]