https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45305
--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> --- Author: pault Date: Mon Jul 2 19:28:11 2018 New Revision: 262316 URL: https://gcc.gnu.org/viewcvs?rev=262316&root=gcc&view=rev Log: 2018-07-02 Paul Thomas <pa...@gcc.gnu.org> PR fortran/45305 * expr.c : Add a prototype for scalarize_intrinsic_call. (gfc_simplify_expr): Use scalarize_intrinsic_call for elemental intrinsic function calls. (scalarize_intrinsic_call): Add 'init_flag' argument. Check if the expression or any of the actual argument expressions are NULL. Before calling gfc_check_init_expr, check 'init_flag'. Only simplify the scalarized expressions if there are no errors on the stack. (gfc_check_init_expr): Set 'init_flag' true in the call to scalarize_intrinsic_call. 2018-07-02 Paul Thomas <pa...@gcc.gnu.org> PR fortran/45305 * gfortran.dg/scalarize_parameter_array_2.f90: New test. Added: branches/gcc-8-branch/gcc/testsuite/gfortran.dg/proc_ptr_50.f90 Modified: branches/gcc-8-branch/gcc/fortran/ChangeLog branches/gcc-8-branch/gcc/fortran/trans-array.c branches/gcc-8-branch/gcc/testsuite/ChangeLog