https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66810
Bug ID: 66810 Summary: [6] ICE on tree error_mark with -miamcu Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: julia.koval at intel dot com Target Milestone: --- Created attachment 35934 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35934&action=edit proposed patch $ cat test.c int vv; void i (void) { static int a[vv]; } $ gcc test.c -m32 test.c: In function ‘i’: test.c:6:14: error: storage size of ‘a’ isn’t constant static int a[vv]; ^ $ gcc test.c -m32 -miamcu test.c: In function ‘i’: test.c:6:14: error: storage size of ‘a’ isn’t constant static int a[vv]; ^ At top level: cc1: internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in iamcu_alignment, at config/i386/i386.c:27402 0xdba407 tree_class_check_failed(tree_node const*, tree_code_class, char const*, int, char const*) .././../TRUNK/gcc/gcc/tree.c:9480 0xe39f48 tree_class_check(tree_node*, tree_code_class, char const*, int, char const*) .././../TRUNK/gcc/gcc/tree.h:2981 0xe39f48 iamcu_alignment .././../TRUNK/gcc/gcc/config/i386/i386.c:27402 0xe6e4aa ix86_data_alignment(tree_node*, int, bool) .././../TRUNK/gcc/gcc/config/i386/i386.c:27456 0xe0cbc1 align_variable(tree_node*, bool) .././../TRUNK/gcc/gcc/varasm.c:1030 0xe1e7a2 varpool_node::analyze() .././../TRUNK/gcc/gcc/varpool.c:531 0x72ac47 analyze_functions .././../TRUNK/gcc/gcc/cgraphunit.c:1083 0x72b720 symbol_table::finalize_compilation_unit() .././../TRUNK/gcc/gcc/cgraphunit.c:2485 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. There is a test, reproducing this: gcc.dg/c11-thread-local-2.c