https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67031

Georg-Johann Lay <gjl at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |avr
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2016-01-29
          Component|target                      |other
                 CC|                            |gjl at gcc dot gnu.org
     Ever confirmed|0                           |1
            Summary|avr-gcc internal compiler   |avr-gcc internal compiler
                   |error                       |error: segmentation fault
                   |                            |in push_reload, at reload.c
      Known to fail|                            |5.2.1

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> ---
Confirmed with 5.2.1 on mingw32 and

$ avr-gcc source.c -S -O3 -mmcu=atmega8

Also tried to reduce even more and to get it closer to sensible C but the ICE
remains:

avr-gcc foo.c -S -Wall -O3 -mmcu=atmega8 -save-temps
foo.c: In function 'func':
foo.c:23:1: internal compiler error: in push_reload, at reload.c:1380
 }
 ^

foo.c:23:1: internal compiler error: Segmentation fault



extern int sscanf (const char*, const char*, ...);

typedef struct {
    int iii;
    char ppp[50];
} S;

extern S a;
extern int b, c, e, g, h, i;

void func2(char *p1) {
    sscanf(p1, "%d %d %d %d", &e, &i, &h, &g);
    char j[30];
    func2(j);
}

void func(void) {
    int d = (int)func;
    while (c < d) {
        b = 23;
        func2(a.ppp);
    }
}

Reply via email to