On Mon, 8 Jun 2026, Alex Coplan wrote:

> The PR showed us ICEing in build_poly_int_cst because we have type set
> to a non-type tree node (a var_decl).  A closer look shows this is
> because we pass the wrong variable to wide_int_to_tree in
> expmed.cc:make_tree: we pass t instead of type, where t is
> uninitialized at the point of the call.  Fixed thusly.
> 
> I also took the opportunity to move the CONST_POLY_INT case out of the
> default: section into its own case of the switch.
> 
> Bootstrapped/regtested on aarch64-linux-gnu, OK for trunk and backports?

OK.

Thanks,
Richard.

> Thanks,
> Alex
> 
> gcc/ChangeLog:
> 
>       PR middle-end/125621
>       * expmed.cc (make_tree): Fix CONST_POLY_INT case to pass type
>       instead of t, move it to its own switch case.
> 
> gcc/testsuite/ChangeLog:
> 
>       PR middle-end/125621
>       * gcc.target/aarch64/torture/pr125621.c: New test.
> ---
>  gcc/expmed.cc                                       | 6 +++---
>  gcc/testsuite/gcc.target/aarch64/torture/pr125621.c | 7 +++++++
>  2 files changed, 10 insertions(+), 3 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.target/aarch64/torture/pr125621.c
> 
> 

-- 
Richard Biener <[email protected]>
SUSE Software Solutions Germany GmbH,
Frankenstrasse 146, 90461 Nuernberg, Germany;
GF: Jochen Jaser, Andrew McDonald, Werner Knoblich; (HRB 36809, AG Nuernberg)

Reply via email to