https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109788

--- Comment #17 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 64059
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64059&action=edit
[PATCH] fortran: Fix character SPREAD intrinsic lowering [PR109788]

Patch attached.

The remaining issue is in the Fortran frontend.  Character SPREAD resolution
specializes the shared intrinsic descriptor in place, so later scalar uses can
see the wrong call signature.  This patch copies the intrinsic descriptor
before specializing the character formal argument type.

Regtested on x86_64-pc-linux-gnu with:

- make -C gcc-build-pr109788/gcc check-gfortran
RUNTESTFLAGS='dg.exp=pr109788.f90'
- make -C gcc-build-pr109788/gcc check-gfortran
RUNTESTFLAGS='dg.exp=spread_scalar_source.f90'
- make -C gcc-build-pr109788/gcc check-gfortran
RUNTESTFLAGS='dg.exp=intrinsic_spread_1.f90'
- make -C gcc-build-pr109788/gcc check-gfortran
RUNTESTFLAGS='dg.exp=intrinsic_spread_2.f90'
- make -C gcc-build-pr109788/gcc -j32 -k check-gfortran
- make -C gcc-build-pr109788 -j32 check-target-libgomp-fortran

All passed.
  • [Bug fortran/109788] [14/15/16 ... albert at tugraz dot at via Gcc-bugs

Reply via email to