From 76b33d8fc1826a1619f9f25e0ac8a2fe66a594ca Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sun, 15 Jun 2008 20:07:34 +0000 Subject: [PATCH] re PR fortran/36515 (Integer read from stdin yields a value overflow for a valid integer.) 2008-06-15 Jerry DeLisle PR fortran/36515 * gfortran.dg/no_range_check_2.f90: New test. From-SVN: r136823 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/no_range_check_2.f90 | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 gcc/testsuite/gfortran.dg/no_range_check_2.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 95a49dc246d..6084985374f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-15 Jerry DeLisle + + PR fortran/36515 + * gfortran.dg/no_range_check_2.f90: New test. + 2008-06-15 Mark Shinwell * lib/target-supports.exp (check_effective_target_mips_loongson): New. diff --git a/gcc/testsuite/gfortran.dg/no_range_check_2.f90 b/gcc/testsuite/gfortran.dg/no_range_check_2.f90 new file mode 100644 index 00000000000..4b45c4c8e4f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/no_range_check_2.f90 @@ -0,0 +1,11 @@ +! { dg-do run } +! { dg-options "-fno-range-check" } +! PR36515 Integer read a value overflow for an invalid integer. +! This tests that -fno-range-check allows this legacy behavior at runtime. +program int_range +character(25) :: inputline = "-2147483648" +integer*4 smallest +read(inputline,100) smallest +100 format(1i11) +if (smallest.ne.-2147483648) call abort +end -- 2.30.2