https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126938
Bug ID: 126938
Summary: [17 Regression] ICE in s390_function_arg_advance since
r17-3213
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: stefansf at gcc dot gnu.org
CC: jakub at redhat dot com
Target Milestone: ---
Target: s390x-*
Starting with r17-3213 the following tests fail on s390:
FAIL: g++.dg/reflect/crash18.C -std=c++26 (internal compiler error: in
s390_function_arg_advance, at config/s390/s390.cc:13290)
FAIL: g++.dg/reflect/crash18.C -std=c++26 (test for excess errors)
FAIL: g++.dg/reflect/crash18.C -std=c++29 (internal compiler error: in
s390_function_arg_advance, at config/s390/s390.cc:13290)
FAIL: g++.dg/reflect/crash18.C -std=c++29 (test for excess errors)
FAIL: g++.dg/reflect/parm3.C -std=c++26 (internal compiler error: in
s390_function_arg_advance, at config/s390/s390.cc:13290)
FAIL: g++.dg/reflect/parm3.C -std=c++26 (test for excess errors)
FAIL: g++.dg/reflect/parm3.C -std=c++29 (internal compiler error: in
s390_function_arg_advance, at config/s390/s390.cc:13290)
FAIL: g++.dg/reflect/parm3.C -std=c++29 (test for excess errors)
In s390_function_arg_advance we are now faced with
(gdb) call debug (arg.type)
<meta_type 0x3fff76d5738 decltype(^^int) unsigned DI
size <integer_cst 0x3fff7502ea0 type <integer_type 0x3fff751b0a8
bitsizetype> constant 64>
unit-size <integer_cst 0x3fff7502eb8 type <integer_type 0x3fff751b000
sizetype> constant 8>
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x3fff76d5738>
This is because now in gimplify_parameters() we do not skip the meta_type
anymore because passed_mode != VOIDmode:
FOR_EACH_VEC_ELT (fnargs, i, parm)
{
struct assign_parm_data_one data;
/* Extract the type of PARM; adjust it according to ABI. */
assign_parm_find_data_types (&all, parm, &data);
/* Early out for errors and void parameters. */
if (data.passed_mode == VOIDmode || DECL_SIZE (parm) == NULL)
continue;
/* Update info on where next arg arrives in registers. */
targetm.calls.function_arg_advance (all.args_so_far, data.arg);
I'm wondering what the contract here is. An error is already thrown by the FE,
though, still we proceed. Should the back end deal with meta_type?