https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114389
--- Comment #1 from Tan Senqi <tsqurt at outlook dot com> ---
reconfirmed at 2024-4-1
GCC: gcc (GCC) 14.0.1 20240401 (experimental)
GDB: GNU gdb (GDB) 14.2
Platform: AMD64, ubuntu 20.04
Testcase is following; Note that the position where segmentation fault happens
is different in this version().
struct A { int a;} a;
int main ()
{
struct A r;
r.a = 0;
return 0;
}
(gdb) b 6
Breakpoint 1 at 0x40110a: file a.c, line 6.
(gdb) run
Starting program: /home/asahi/emd/build/a.out
Breakpoint 1, main () at a.c:6
6 r.a = 0;
(gdb) expr r.a = 0
*** WARNING *** there are active plugins, do not report this as a bug unless
you can reproduce it without enabling any plugins.
Event | Plugins
PLUGIN_PRE_GENERICIZE | libcc1plugin
PLUGIN_GGC_MARKING | libcc1plugin
PLUGIN_PRAGMAS | libcc1plugin
gdb command line:1:2: internal compiler error: Segmentation fault
0xc402bf crash_signal
../.././gcc/toplev.cc:314
0x7f71bf63708f ???
/build/glibc-wuryBv/glibc-2.31/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xebedc2 component_ref_field_offset(tree_node*)
../.././gcc/tree.cc:12990
0x9afd62 gimplify_compound_lval
../.././gcc/gimplify.cc:3250
0x9aa537 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../.././gcc/gimplify.cc:16335
0x9b660a gimplify_modify_expr
../.././gcc/gimplify.cc:6169
0x9aab9d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../.././gcc/gimplify.cc:16383
0x9ac415 gimplify_stmt(tree_node**, gimple**)
../.././gcc/gimplify.cc:7226
0x9ac415 gimplify_statement_list
../.././gcc/gimplify.cc:2019
0x9ac415 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../.././gcc/gimplify.cc:16828
0x9b22fd gimplify_stmt(tree_node**, gimple**)
../.././gcc/gimplify.cc:7226
0x9b22fd gimplify_bind_expr
../.././gcc/gimplify.cc:1430
0x9ab52a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../.././gcc/gimplify.cc:16584
0x9aef13 gimplify_stmt(tree_node**, gimple**)
../.././gcc/gimplify.cc:7226
0x9aef13 gimplify_body(tree_node*, bool)
../.././gcc/gimplify.cc:17645
0x9af2d2 gimplify_function_tree(tree_node*)
../.././gcc/gimplify.cc:17844
0x83bf57 cgraph_node::analyze()
../.././gcc/cgraphunit.cc:684
0x83e567 analyze_functions
../.././gcc/cgraphunit.cc:1247
0x83f18d symbol_table::finalize_compilation_unit()
../.././gcc/cgraphunit.cc:2554
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compilation failed.