https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94022
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Thomas Kथà¤nig <tkoe...@gcc.gnu.org>: https://gcc.gnu.org/g:6a07010b774cb5a0b1790b857e69d3d8534eebd2 commit r11-1228-g6a07010b774cb5a0b1790b857e69d3d8534eebd2 Author: José Rui Faustino de Sousa <jrfso...@gmail.com> Date: Thu Jun 11 13:24:55 2020 +0200 Patch to Bug 94022 - Array slices of assumed-size arrays. Make sure that when passing array sections of assumed-size arrays to procedures expecting an assumed-rank array the upper bound of the last dimension of the array section does not get improperly reset to -1 to mark it has an assumed size array. gcc/fortran/ChangeLog: 2020-06-11 José Rui Faustino de Sousa <jrfso...@gmail.com> PR fortran/94022 * trans-expr.c (gfc_conv_procedure_call): In the case of assumed-size arrays ensure that the reference is to a full array. gcc/testsuite/ChangeLog: 2020-06-11 José Rui Faustino de Sousa <jrfso...@gmail.com> PR fortran/94022 * gfortran.dg/PR94022.f90: New test.