https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103794
--- Comment #3 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:5fd5d8fb744fd9251d04e4b17d04f2340e6a283b commit r14-1174-g5fd5d8fb744fd9251d04e4b17d04f2340e6a283b Author: Harald Anlauf <anl...@gmx.de> Date: Sun May 21 22:25:29 2023 +0200 Fortran: checking and simplification of RESHAPE intrinsic [PR103794] gcc/fortran/ChangeLog: PR fortran/103794 * check.cc (gfc_check_reshape): Expand constant arguments SHAPE and ORDER before checking. * gfortran.h (gfc_is_constant_array_expr): Add prototype. * iresolve.cc (gfc_resolve_reshape): Expand constant argument SHAPE. * simplify.cc (is_constant_array_expr): If array is determined to be constant, expand small array constructors if needed. (gfc_is_constant_array_expr): Wrapper for is_constant_array_expr. (gfc_simplify_reshape): Fix check for insufficient elements in SOURCE when no padding specified. gcc/testsuite/ChangeLog: PR fortran/103794 * gfortran.dg/reshape_10.f90: New test. * gfortran.dg/reshape_11.f90: New test.