Skip to content

gccgo: internal compiler error: in gimplify_expr #23868

@ALTree

Description

@ALTree

The following program (reduced from a gosmith-generated one)

package p

var F func([0]int) int
var G func() [0]int

var V = make([]int, F(G()))

crashes gccgo (GCC) 7.2.0 and gccgo (GCC) 8.0.1 20180205 (experimental), with the following error (for gcc8):

test.go: In function ‘p.go.p..import’:
test.go:6:21: internal compiler error: in gimplify_expr, at gimplify.c:12382
 var V = make([]int, F(G()))
                     ^
0x9b0917 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:12382
0x99f594 gimplify_expr
	../../gcc-trunk/gcc/gimplify.c:12430
0x9b89bf gimplify_call_expr
	../../gcc-trunk/gcc/gimplify.c:3385
0x9ad3a7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11406
0x9bbbe7 gimplify_modify_expr
	../../gcc-trunk/gcc/gimplify.c:5626
0x9aceed gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11435
0x9b1926 gimplify_stmt(tree_node**, gimple**)
	../../gcc-trunk/gcc/gimplify.c:6658
0x9b25d2 gimplify_and_add(tree_node*, gimple**)
	../../gcc-trunk/gcc/gimplify.c:441
0x9b25d2 gimplify_decl_expr
	../../gcc-trunk/gcc/gimplify.c:1714
0x9ae6b2 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11631
0x9b1926 gimplify_stmt(tree_node**, gimple**)
	../../gcc-trunk/gcc/gimplify.c:6658
0x9ae033 gimplify_statement_list
	../../gcc-trunk/gcc/gimplify.c:1767
0x9ae033 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11863
0x9b1926 gimplify_stmt(tree_node**, gimple**)
	../../gcc-trunk/gcc/gimplify.c:6658
0x9b435d gimplify_bind_expr
	../../gcc-trunk/gcc/gimplify.c:1335
0x9ad0eb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11635
0x9b1926 gimplify_stmt(tree_node**, gimple**)
	../../gcc-trunk/gcc/gimplify.c:6658
0x9ae033 gimplify_statement_list
	../../gcc-trunk/gcc/gimplify.c:1767
0x9ae033 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	../../gcc-trunk/gcc/gimplify.c:11863
0x9b1926 gimplify_stmt(tree_node**, gimple**)
	../../gcc-trunk/gcc/gimplify.c:6658

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions