Dear all, the addition of runtime checks for the SIZE intrinsic created a regression that showed up for certain CLASS arguments to procedures. Paul did most of the work (~ 99%), but asked me to dig into an issue with an inappropriately selected error message. This actually turned out to be a simple one-liner on top of Paul's patch. Regtested on x86_64-pc-linux-gnu. OK for mainline? Thanks, Harald P.S.: I couldn't find a Changelog entry that uses co-authors. Is the version below correct? PR fortran/99112 - ICE with runtime diagnostics for SIZE intrinsic function Add/fix handling of runtime checks for CLASS arguments with ALLOCATABLE or POINTER attribute. gcc/fortran/ChangeLog: * trans-expr.c (gfc_conv_procedure_call): Fix runtime checks for CLASS arguments. * trans-intrinsic.c (gfc_conv_intrinsic_size): Likewise. gcc/testsuite/ChangeLog: * gfortran.dg/pr99112.f90: New test. Co-authored-by: Paul Thomas