https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81460
Bug ID: 81460 Summary: [8 Regression] ICE in force_constant_size, at gimplify.c:684 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- It's mine: $ cat /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c // RUN: %llvmgcc -S -w %s -o - // PR1170 int f(int a, struct {int b[a];} c) { return c.b[0]; } int g(struct {int b[1];} c) { return c.b[0]; } $ ./xgcc -B. /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c -fsanitize=address -c /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c:3:14: warning: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration int f(int a, struct {int b[a];} c) { return c.b[0]; } ^~~~~~ /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c:5:7: warning: anonymous struct declared inside parameter list will not be visible outside of this definition or declaration int g(struct {int b[1];} c) { ^~~~~~ during GIMPLE pass: sanopt /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c: In function âfâ: /home/marxin/BIG/Programming/llvm-project/dragonegg/test/compilator/local/2007-02-16-VariableSizeStructArg.c:3:5: internal compiler error: in force_constant_size, at gimplify.c:684 int f(int a, struct {int b[a];} c) { return c.b[0]; } ^ 0x907396 force_constant_size ../../gcc/gimplify.c:684 0x90df27 gimple_add_tmp_var(tree_node*) ../../gcc/gimplify.c:722 0xbd614e sanitize_rewrite_addressable_params ../../gcc/sanopt.c:910 0xbd69e4 execute ../../gcc/sanopt.c:1030