Compile the following with -O1 -fdump-tree-all and you will get an ICE:
static inline int f(int i)
{
  struct {
    int t[i];
  } t;
  return sizeof(t.t[i--]);
}

int g(int i)
{
  return f(i);
}

t.c:2: internal compiler error: tree check: expected tree that contains 'decl 
with RTL' structure, have 
'type_decl'  in set_decl_rtl, at emit-rtl.c:957
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

I think this is related to  PR 23174 or a dup of it.

-- 
           Summary: [4.1 Regression] ICE with -fdump-tree-all
           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: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 23174
             nThis:


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

Reply via email to