#569 gcc: internal compiler error: in extract_insn

closed-fixed
gcc (462)
2004-07-26
2004-05-15
vlada
No

internal compiler error: in extract_insn

Discussion

  • vlada

    vlada - 2004-05-15
     
  • Danny Smith

    Danny Smith - 2004-05-16

    Logged In: YES
    user_id=11494

    Thanks for the detailed information on the bug. It really does
    help.

    Confirmed at -O1.
    Here is reduced testcase:
    /* test1.c */
    typedef struct _foo
    {
    unsigned long _bkgd;
    } FOO;

    void wbkgdset (FOO* foo, unsigned long ch)
    {
    unsigned long bkgdattr;

    if ( (ch & 0xFFFF0000UL) == 0UL )
    bkgdattr = 0x0000000UL;
    else
    bkgdattr = (ch & 0xFFFF0000UL);

    foo->_bkgd = (ch | bkgdattr);
    }

    D:\>gcc -O1 -S -Wall test1.c
    test1.c: In function `wbkgdset':
    test1.c:17: error: unrecognizable insn:
    (insn 36 11 23 0 (set (reg/v:SI 60 [ bkgdattr ])
    (and:SI (reg/v:SI 59 [ ch ])
    (const_int -65536 [0xffff0000]))) -1 (nil)
    (nil))
    test1.c:17: internal compiler error: in extract_insn, at
    recog.c:2083
    Please submit a full bug report,
    with preprocessed source if appropriate.
    See <URL:http://www.mingw.org/bugs.shtml> for instructions.

    The testcase compiles okay at -O0 and at -O2 and -O3.
    It also compiles OK if you clean up the if...else condition to
    simply
    bkgdattr = (ch & 0xFFFF0000UL);

    I'll forward the bug report to GCC bugzilla
    Danny

     
  • Danny Smith

    Danny Smith - 2004-07-26
    • status: open --> closed-fixed
     

Log in to post a comment.