Hi Harald, This looks good to me. OK for mainline. Thanks for the patch. Paul On Wed, 1 Nov 2023 at 22:10, Harald Anlauf wrote: > Dear all, > > I've dusted off and cleaned up a previous attempt to fix the handling > of allocatable or pointer actual arguments to OPTIONAL+VALUE dummies. > The standard says that a non-allocated / non-associated actual argument > in that case shall be treated as non-present. > > However, gfortran's calling conventions demand that the presence status > for OPTIONAL+VALUE is passed as a hidden argument, while we need to > pass something on the stack which has the right type. The solution > is to conditionally create a temporary when needed. > > Testcase checked with NAG. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > >