https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96312
--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-10 branch has been updated by Thomas Kथà¤nig <tkoe...@gcc.gnu.org>: https://gcc.gnu.org/g:9040b14da7070f30af6d2814097fb7ea1a91707d commit r10-8603-g9040b14da7070f30af6d2814097fb7ea1a91707d Author: Paul Thomas <pa...@gcc.gnu.org> Date: Mon Aug 10 06:22:22 2020 +0100 This patch fixes PR96312. Cures a used uninitialized warning. 2020-08-10 Paul Thomas <pa...@gcc.gnu.org> gcc/fortran PR fortran/96312 * trans-expr.c (fcncall_realloc_result): Only compare shapes if lhs was allocated.. gcc/testsuite/ PR fortran/96312 * gfortran.dg/pr96312.f90: New test. (cherry picked from commit abb276d0eca218e62e5ed50babf12ff544250759)