https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100542
Bug ID: 100542 Summary: ICE: segmentation fault, at is_gimple_variable, gimple-expr.h:84 Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: cnsun at uwaterloo dot ca Target Milestone: --- $ gcc-trunk -v Using built-in specs. COLLECT_GCC=gcc-trunk COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /tmp/tmp.FUbEknNORK-gcc-builder/gcc/configure --enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch --prefix=/scratch/software/gcc-trunk --disable-bootstrap Thread model: posix Supported LTO compression algorithms: zlib gcc version 12.0.0 20210511 (experimental) [master revision :7db32cac8:aa891c56f25baac94db004e309d1b6e40b770a95] (GCC) $ cat mutant.c ldt_add_entry() { __asm__ ( "" : : "m" ( ( { } ) ) ) ; } $ gcc-trunk mutant.c mutant.c:1:1: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | ldt_add_entry() | ^~~~~~~~~~~~~ mutant.c: In function ‘ldt_add_entry’: mutant.c:3:26: internal compiler error: Segmentation fault 3 | __asm__ ( "" : : "m" ( ( { } ) ) ) ; | ~~^~~~~ 0xef7273 crash_signal /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/toplev.c:327 0xbeacd4 is_gimple_variable /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.h:84 0xbeacd4 is_gimple_id /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.h:95 0xbeacd4 is_gimple_addressable /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.h:122 0xbeacd4 is_gimple_lvalue(tree_node*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimple-expr.c:595 0xc273cd gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15038 0xc30a1d gimplify_asm_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6506 0xc26705 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14416 0xc28f6a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6877 0xc2979e gimplify_bind_expr /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:1421 0xc259d3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:14284 0xc28f6a gimplify_stmt(tree_node**, gimple**) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:6877 0xc2a563 gimplify_body(tree_node*, bool) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15328 0xc2a9b1 gimplify_function_tree(tree_node*) /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/gimplify.c:15482 0xa7e707 cgraph_node::analyze() /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:670 0xa81611 analyze_functions /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:1234 0xa820e1 symbol_table::finalize_compilation_unit() /tmp/tmp.FUbEknNORK-gcc-builder/gcc/gcc/cgraphunit.c:2508 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.