https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97133
Martin Sebor <msebor at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |DUPLICATE Status|NEW |RESOLVED Component|ipa |lto --- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> --- This is the same ICE as in PR97172: static void lto_write_tree (struct output_block *ob, tree expr, bool ref_p) { if (!lto_is_streamable (expr)) internal_error ("tree code %qs is not supported in LTO streams", get_tree_code_name (TREE_CODE (expr))); and EXPR is BIND_EXPR. It's emitted by the C front end for the VLA parameter in the definition of int qux (int n, int a[(int (*)[n]) { 0 } == 0]) like so: <parm_decl 0x7fffea94c280 a type <pointer_type 0x7fffea8189d8 type <integer_type 0x7fffea8105e8 int public SI size <integer_cst 0x7fffea7f7f18 constant 32> unit-size <integer_cst 0x7fffea7f7f30 constant 4> align:32 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x7fffea8105e8 precision:32 min <integer_cst 0x7fffea7f7ed0 -2147483648> max <integer_cst 0x7fffea7f7ee8 2147483647> pointer_to_this <pointer_type 0x7fffea8189d8>> public unsigned DI size <integer_cst 0x7fffea7f7cd8 constant 64> unit-size <integer_cst 0x7fffea7f7cf0 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7fffea8189d8> used unsigned read decl_0 DI /src/gcc/master/gcc/testsuite/gcc.dg/pr88701.c:15:17 size <integer_cst 0x7fffea7f7cd8 64> unit-size <integer_cst 0x7fffea7f7cf0 8> align:64 warn_if_not_align:0 context <function_decl 0x7fffea928a00 qux> attributes <tree_list 0x7fffea94d8e8 purpose <identifier_node 0x7fffea937910 arg spec> value <tree_list 0x7fffea94d898 value <string_cst 0x7fffea936860 constant "[$]\000"> chain <tree_list 0x7fffea94d870 value <eq_expr 0x7fffea94d758 type <integer_type 0x7fffea8105e8 int> side-effects arg:0 <c_maybe_const_expr 0x7fffea94d730 type <pointer_type 0x7fffea930c78> side-effects arg:0 <compound_expr 0x7fffea94d708 type <void_type 0x7fffea810f18 void> side-effects arg:1 <bind_expr 0x7fffea949330>> arg:1 <compound_literal_expr 0x7fffea936780 type <pointer_type 0x7fffea930c78> side-effects arg:0 <decl_expr 0x7fffea936760>>> arg:1 <integer_cst 0x7fffea94f030 constant 0> /src/gcc/master/gcc/testsuite/gcc.dg/pr88701.c:15:38 start: /src/gcc/master/gcc/testsuite/gcc.dg/pr88701.c:15:32 finish: /src/gcc/master/gcc/testsuite/gcc.dg/pr88701.c:15:41>>>> arg-type <pointer_type 0x7fffea8189d8>> lto_is_streamable() is defined to return false for BIND_EXPR (and SSA_NAME) like so: /* Return true if EXPR is a tree node that can be written to disk. */ static inline bool lto_is_streamable (tree expr) { enum tree_code code = TREE_CODE (expr); /* Notice that we reject SSA_NAMEs as well. We only emit the SSA name version in lto_output_tree_ref (see output_ssa_names). */ return !is_lang_specific (expr) && code != SSA_NAME && code != LANG_TYPE && code != MODIFY_EXPR && code != INIT_EXPR && code != TARGET_EXPR && code != BIND_EXPR && code != WITH_CLEANUP_EXPR && code != STATEMENT_LIST && (code == CASE_LABEL_EXPR || code == DECL_EXPR || TREE_CODE_CLASS (code) != tcc_statement); } *** This bug has been marked as a duplicate of bug 97172 ***