https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79987
Bug ID: 79987 Summary: [CHKP] ICE in gimplify_expr, at gimplify.c:12151 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- We ICE on following test-case: $ cat /home/marxin/BIG/Programming/llvm-project/clang/test/CodeGen/2009-07-14-VoidPtr.c // RUN: %clang_cc1 -emit-llvm %s -o - // PR4556 extern void foo; void *bar = &foo; $ gcc /home/marxin/BIG/Programming/llvm-project/clang/test/CodeGen/2009-07-14-VoidPtr.c -fcheck-pointer-bounds -mmpx /home/marxin/BIG/Programming/llvm-project/clang/test/CodeGen/2009-07-14-VoidPtr.c:5:13: warning: taking address of expression of type ‘void’ void *bar = &foo; ^ /home/marxin/BIG/Programming/llvm-project/clang/test/CodeGen/2009-07-14-VoidPtr.c: In function ‘_GLOBAL__sub_B_00102_1_bar’: /home/marxin/BIG/Programming/llvm-project/clang/test/CodeGen/2009-07-14-VoidPtr.c:5:1: internal compiler error: in gimplify_expr, at gimplify.c:12151 void *bar = &foo; ^~~~ 0x7f75f1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:12151 0x7fc904 gimplify_expr .././../gcc/gimplify.c:12199 0x7fd685 gimplify_call_expr .././../gcc/gimplify.c:3259 0x7f56cf gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:11170 0x7f4055 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:11927 0x7f6803 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:11918 0x7fde82 gimplify_modify_expr .././../gcc/gimplify.c:5457 0x7f5359 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:11198 0x7f7658 gimplify_stmt(tree_node**, gimple**) .././../gcc/gimplify.c:6478 0x7f503b gimplify_statement_list .././../gcc/gimplify.c:1716 0x7f503b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) .././../gcc/gimplify.c:11626 0x7f7658 gimplify_stmt(tree_node**, gimple**) .././../gcc/gimplify.c:6478 0x7f8977 gimplify_body(tree_node*, bool) .././../gcc/gimplify.c:12395 0x7f8d25 gimplify_function_tree(tree_node*) .././../gcc/gimplify.c:12553 0x875bdc cgraph_build_static_cdtor_1 .././../gcc/ipa.c:980 0xa86935 chkp_finish_file() .././../gcc/tree-chkp.c:3887