https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95499
Bug ID: 95499
Summary: ICE: during GIMPLE pass: ssa / segfault in verify_ssa
/ OpenMP target with deferred-length CHARACTER
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, openmp
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: burnus at gcc dot gnu.org
Target Milestone: ---
Created attachment 48668
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48668&action=edit
Test case - compile with "gfortran -fopenmp"
The attached testcase, found when trying to test something else.
The following bit causes the problem:
character(len=:), allocatable :: str
!$omp target map(from:str)
Fails with GCC trunk as:
during GIMPLE pass: ssa
test.f90:15:0:
15 | deallocate (A, my_str)
|
internal compiler error: Segmentation fault
0xeb42af crash_signal
../../repos/gcc/gcc/toplev.c:328
0x10d8c14 verify_ssa(bool, bool)
../../repos/gcc/gcc/tree-ssa.c:1070
0xdda8d5 execute_function_todo
../../repos/gcc/gcc/passes.c:1992
0xddb57e execute_todo
../../repos/gcc/gcc/passes.c:2039
With the distro's GCC 7 + 9 + 10, I get ("gfortran-10 -foffload=disable
-fopenmp"):
during IPA pass: fnsummary
test.f90:15: internal compiler error: tree code ‘ssa_name’ is not supported in
LTO streams
In the debugger, I see:
Program received signal SIGSEGV, Segmentation fault.
verify_ssa (check_modified_stmt=check_modified_stmt@entry=true,
check_ssa_operands=check_ssa_operands@entry=true) at
../../repos/gcc/gcc/gimple.h:6626
6626 return gimple_code (g) == GIMPLE_NOP;
(gdb) list
6621 /* Returns TRUE if statement G is a GIMPLE_NOP. */
6622
6623 static inline bool
6624 gimple_nop_p (const gimple *g)
6625 {
6626 return gimple_code (g) == GIMPLE_NOP;
6627 }
(gdb) bt
#0 verify_ssa (check_modified_stmt=check_modified_stmt@entry=true,
check_ssa_operands=check_ssa_operands@entry=true) at
../../repos/gcc/gcc/gimple.h:6626
#1 0x0000000000d604a6 in execute_function_todo (fn=0x7ffff78cf0b0,
data=<optimized out>) at ../../repos/gcc/gcc/passes.c:1992
#2 0x0000000000d611dd in do_per_function (data=0x8040, callback=0xd60230
<execute_function_todo(function*, void*)>) at ../../repos/gcc/gcc/passes.c:1640
#3 execute_todo (flags=32832) at ../../repos/gcc/gcc/passes.c:2039
#4 0x0000000000d639a3 in execute_one_pass (pass=0x25b23d0) at
../../repos/gcc/gcc/passes.c:2539