https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92586
G. Steinmetz <gs...@t-online.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gs...@t-online.de --- Comment #5 from G. Steinmetz <gs...@t-online.de> --- A simplification might be : $ cat z1.f90 program p type t integer, allocatable :: a end type type t2 type(t) :: b end type type t3 type(t2) :: c end type contains function g(x) class(t2) :: x type(t) :: g(2) end function f(x) class(t3) :: x type(t) :: f(2) f = g(x%c) end end $ gfortran-10-20191215 -c z1.f90 gimplification failed: &parm.14 <addr_expr 0x7f89646c6e40 type <pointer_type 0x7f89646c0f18 type <record_type 0x7f89646c0dc8 array01_t type_1 BLK size <integer_cst 0x7f89644f1168 constant 512> unit-size <integer_cst 0x7f8964549588 constant 64> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f89646ad7e0 fields <field_decl 0x7f89646b25f0 data> pointer_to_this <pointer_type 0x7f89646c0f18> chain <type_decl 0x7f89646a7ed8 D.3968>> unsigned DI size <integer_cst 0x7f89644d4ba0 constant 64> unit-size <integer_cst 0x7f89644d4bb8 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7f89646adc78 pointer_to_this <pointer_type 0x7f89646c0888>> arg:0 <var_decl 0x7f89646c47e0 parm.14 type <record_type 0x7f89646c0dc8 array01_t> addressable used ignored BLK z1.f90:19:0 size <integer_cst 0x7f89644f1168 512> unit-size <integer_cst 0x7f8964549588 64> align:64 warn_if_not_align:0 context <function_decl 0x7f89646a2e00 f> chain <var_decl 0x7f89646c4870 D.4117 type <integer_type 0x7f89644e8738 integer(kind=8)> used ignored DI z1.f90:19:0 size <integer_cst 0x7f89644d4ba0 64> unit-size <integer_cst 0x7f89644d4bb8 8> align:64 warn_if_not_align:0 context <function_decl 0x7f89646a2e00 f> chain <var_decl 0x7f89646c4900 D.4118>>> z1.f90:19:0 start: z1.f90:19:0 finish: z1.f90:19:0> z1.f90:19:0: 19 | f = g(x%c) | internal compiler error: gimplification failed 0xa14dd1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:14379 0xa1ba3c gimplify_compound_lval ../../gcc/gimplify.c:3052 0xa125f5 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13320 0xa27b18 gimplify_modify_expr ../../gcc/gimplify.c:5769 0xa1489a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13368 0xa17b18 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6810 0xa139a3 gimplify_statement_list ../../gcc/gimplify.c:1857 0xa139a3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13812 0xa17b18 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6810 0xa1cee8 gimplify_cond_expr ../../gcc/gimplify.c:4228 0xa13d80 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13325 0xa17b18 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6810 0xa139a3 gimplify_statement_list ../../gcc/gimplify.c:1857 0xa139a3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13812 0xa17b18 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6810 0xa18c83 gimplify_bind_expr ../../gcc/gimplify.c:1420 0xa13bd2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13569 0xa17b18 gimplify_stmt(tree_node**, gimple**) ../../gcc/gimplify.c:6810 0xa139a3 gimplify_statement_list ../../gcc/gimplify.c:1857 0xa139a3 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int) ../../gcc/gimplify.c:13812