[Bug c/79412] [5/6/7 Regression] ICE in fold_convert_loc, at fold-const.c:2239
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Feb 7 18:22:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79412
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems the C FE on such redeclarations doesn't merge the decls (correct), but
overwrites the type in pop_scope:
1345 I_SYMBOL_BINDING (b->id) = b->shadowed;
1346 if (b->shadowed && b->shadowed->u.type)
1347 TREE_TYPE (b->shadowed->decl) = b->shadowed->u.type;
so we end up gimplifying POSTINCREMENT_EXPR of a VAR_DECL with array type, no
wonder we ICE on that.
More information about the Gcc-bugs
mailing list