From 52fd48aeeac6fb83082ed2d89df3688d184a3544 Mon Sep 17 00:00:00 2001 From: Thomas Koenig Date: Sat, 17 Dec 2016 11:13:16 +0000 Subject: [PATCH] re PR fortran/78239 (ICE in char_len_param_value, at fortran/decl.c:926, with -fimplicit-none) 2016-12-17 Thomas Koenig PR fortran/78239 * decl.c(char_len_param_value): Also check for -fimplicit-none when determining if implicit none is in force. 2016-12-17 Thomas Koenig PR fortran/78239 * gfortran.dg/fimplicit_none_1.f90: New test. * gfortran.dg/fimplicit_none_2.f90: New test. From-SVN: r243773 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gfortran.dg/fimplicit_none_1.f90 | 6 ++++++ gcc/testsuite/gfortran.dg/fimplicit_none_2.f90 | 6 ++++++ 4 files changed, 24 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/fimplicit_none_1.f90 create mode 100644 gcc/testsuite/gfortran.dg/fimplicit_none_2.f90 diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fba0d985b0d..cf406eba3c8 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2016-12-17 Thomas Koenig + + PR fortran/78239 + * decl.c(char_len_param_value): Also check for -fimplicit-none + when determining if implicit none is in force. + 2016-12-16 Jerry DeLisle PR fortran/78622 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 11e6d9a288b..396a048492f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2016-12-17 Thomas Koenig + + PR fortran/78239 + * gfortran.dg/fimplicit_none_1.f90: New test. + * gfortran.dg/fimplicit_none_2.f90: New test. + 2016-12-16 Kelvin Nilsen * gcc.target/powerpc/byte-in-either-range-0.c: New test. diff --git a/gcc/testsuite/gfortran.dg/fimplicit_none_1.f90 b/gcc/testsuite/gfortran.dg/fimplicit_none_1.f90 new file mode 100644 index 00000000000..997584e0b3d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fimplicit_none_1.f90 @@ -0,0 +1,6 @@ +! { dg-do compile } +! { dg-options "-fimplicit-none" } +subroutine s(n) ! { dg-error "has no IMPLICIT type" } + character(n) :: c ! { dg-error "Scalar INTEGER expression expected" } + c = 'c' ! { dg-error "has no IMPLICIT type" } +end diff --git a/gcc/testsuite/gfortran.dg/fimplicit_none_2.f90 b/gcc/testsuite/gfortran.dg/fimplicit_none_2.f90 new file mode 100644 index 00000000000..fa8a8f4d055 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fimplicit_none_2.f90 @@ -0,0 +1,6 @@ +! { dg-do compile } +! { dg-options "-fimplicit-none" } +! PR fortran/78239 - used to ICE +program p + character(*), parameter :: z(2) = [character(n) :: 'x', 'y'] ! { dg-error "Scalar INTEGER expression expected" } +end -- 2.30.2