From cdf0919d6de9594ca7711c5a03cf4c4068874805 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Wed, 31 Oct 2018 18:35:59 +0000 Subject: [PATCH] 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 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/allocatable_uninitialized_1.f90 | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/allocatable_uninitialized_1.f90 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 -- 2.30.2