http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58970

            Bug ID: 58970
           Summary: internal compiler error: in get_bit_range, at
                    expr.c:4562
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jan.sm...@alcatel-lucent.com

/tmp/minimal9.i: In function 'function':
/tmp/minimal9.i:15:28: internal compiler error: in get_bit_range, at
expr.c:4562
     pInfo->mode[x].member1 = 0;
                            ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.



struct info
{
    struct {
        unsigned char member1 : 1;
        unsigned char member2;
    } mode[1];
};

extern void call(void);

void function(int x, struct info *pInfo)
{
    if (x != -1)
        call();
    pInfo->mode[x].member1 = 0;
    if (pInfo->mode[x].member2 == (((x) == 1) ? 2 : 1))
    {
        call();
    }
}

Reply via email to