Compile the following valid C99 code at -O3 and we get an ICE:
struct f1
{
  int i;
};
void g(int);
static struct f1 *f2 = &(struct f1){1};
int f(void)
{
  g(f2->i);
  return f2->i;
}

-- 
           Summary: [4.1 Regression] ICE with static promotion
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: dberlin at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org


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

Reply via email to