From: Thomas Koenig Date: Wed, 31 Oct 2018 18:35:59 +0000 (+0000) Subject: re PR fortran/20520 (allocatable arrays used uninitialized without a warning) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cdf0919d6de9594ca7711c5a03cf4c4068874805;p=gcc.git re PR fortran/20520 (allocatable arrays used uninitialized without a warning) 2018-10-31 Thomas Koenig PR fortran/20520 * gfortran.dg/allocatable_uninitialized_1.f90: New test. From-SVN: r265698 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ba5ea3c39d..157b5888637 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-10-31 Thomas Koenig + + PR fortran/20520 + * gfortran.dg/allocatable_uninitialized_1.f90: New test. + 2018-10-31 Nathan Sidwell * g++.dg/lookup/friend21.C: New. diff --git a/gcc/testsuite/gfortran.dg/allocatable_uninitialized_1.f90 b/gcc/testsuite/gfortran.dg/allocatable_uninitialized_1.f90 new file mode 100644 index 00000000000..4c52bd7192e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/allocatable_uninitialized_1.f90 @@ -0,0 +1,8 @@ +! { dg-do compile } +! { dg-options "-O -Wall" } +program main + real,allocatable:: a(:),b(:) + + a(1)=2*b(1) ! { dg-warning "uninitialized" } + +end