https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107216
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Harald Anlauf <anl...@gcc.gnu.org>: https://gcc.gnu.org/g:d45af5c2eb1ba1e48449d8f3c5b4e3994a956f92 commit r13-3340-gd45af5c2eb1ba1e48449d8f3c5b4e3994a956f92 Author: Harald Anlauf <anl...@gmx.de> Date: Sat Oct 15 21:56:56 2022 +0200 Fortran: handle bad array ctors with typespec [PR93483, PR107216, PR107219] gcc/fortran/ChangeLog: PR fortran/93483 PR fortran/107216 PR fortran/107219 * arith.cc (reduce_unary): Handled expressions are EXP_CONSTANT and EXPR_ARRAY. Do not attempt to reduce otherwise. (reduce_binary_ac): Likewise. (reduce_binary_ca): Likewise. (reduce_binary_aa): Moved check for EXP_CONSTANT and EXPR_ARRAY from here ... (reduce_binary): ... to here. (eval_intrinsic): Catch failed reductions. * gfortran.h (GFC_INTRINSIC_OPS): New enum ARITH_NOT_REDUCED to keep track of expressions that were not reduced by the arithmetic evaluation code. gcc/testsuite/ChangeLog: PR fortran/93483 PR fortran/107216 PR fortran/107219 * gfortran.dg/array_constructor_56.f90: New test. * gfortran.dg/array_constructor_57.f90: New test. Co-authored-by: Mikael Morin <mik...@gcc.gnu.org>