On 10/16/14 14:12, Marek Polacek wrote:
We ICEd on this invalid testcase because build_array_ref was getting
a decl with an incomplete type as an index, and default_conversion
calls require_complete_type on it - and because it's not complete,
it returns error_mark_node, and then we trip on an assert requiring
it to be an integer type.
Fixed by bailing out if default_conversion returns unusable expr.
Bootstrapped/regtested on x86_64-linux, ok for trunk?
2014-10-16 Marek Polacek <pola...@redhat.com>
PR c/63549
* c-typeck.c (build_array_ref): Bail if the index in an incomplete
type.
* gcc.dg/pr63549.c: New test.
OK.
jeff