On 5/26/21 2:04 PM, Harald Anlauf via Fortran wrote:
Dear Fortranners,
Gerhard found a case where bounds-checking for an optional,
allocatable character dummy resulted in an ICE. We'd better
not call the presence check on a non-dummy symbol, as this
will hit an assert...
Regtested on x86_64-pc-linux-gnu.
OK for mainline? And backport to 11?
(The code in question has not been touched for nearly 10 years,
so I'm expecting this to be safe).
Thanks,
Harald
PR fortran/100656 - prevent ICE in gfc_conv_expr_present
gcc/fortran/ChangeLog:
PR fortran/100656
* trans-array.c (gfc_conv_ss_startstride): Do not call check for
presence of a dummy argument when a symbol actually refers to a
non-dummy.
gcc/testsuite/ChangeLog:
PR fortran/100656
* gfortran.dg/bounds_check_22.f90: New test.
Yes, OK on both. Thanks
Jerry