On Sun, Jan 14, 2018 at 12:58 PM, Thomas Koenig <tkoe...@netcologne.de> wrote: > Hello world, > > here is the latest take on the min/maxloc ABI change for BACK. > This version now passes BACK as a GFC_LOGCIAL_4 by value in all cases. > I did this by using the existing %VAL mechanism. I also added > another test case which crashed during one stage of development. > > So, OK for trunk?
Index: gcc/fortran/trans-intrinsic.c =================================================================== --- gcc/fortran/trans-intrinsic.c (Revision 256605) +++ gcc/fortran/trans-intrinsic.c (Arbeitskopie) @@ -4562,6 +4562,16 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_exp tree pos; int n; + actual = expr->value.function.actual; + + /* The last argument, BOUND, is passed by value. Ensure that + by setting its name to %VAL. */ Here, s/BOUND/BACK/ I presume? Also, it seems in the library some of the back arguments are by value, but some are still passed as pointers. Based on some quick grepping of the patch they seem to come from m4/iforeach.m4 (6 lines in total). With these fixes, Ok for trunk. -- Janne Blomqvist