Compiler output:
$ gcc -O testcase.c
testcase.c:6:1: error: invalid initializer
testcase.c: In function 'foo':
testcase.c:10:20: error: 'undeclared' undeclared (first use in this function)
testcase.c:10:20: note: each undeclared identifier is reported only once for
each function it appears in
testcase.c:10:31: internal compiler error: in iterative_hash_expr, at
Please submit a full bug report,
with preprocessed source if appropriate.
See <> for instructions.

----- testcase.c -----
struct S
  int i;

int invalid[] = 0;

void foo (void)
  if (((struct S *)undeclared)->i);

Tested revisions:
r164484 - crash
r161659 - crash
r159696 - OK
4.5 r163761 - OK

           Summary: [4.6 Regression] ICE: in iterative_hash_expr, at
                    tree.c:6831 on invalid code
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu

Reply via email to