re PR fortran/37792 (ICE in gfc_conv_array_initializer; works with -fno-range-check)
2008-10-12 Steven G. Kargl <kargls@comcast.net> PR fortran/37792 * fortran/resolve.c (resolve_fl_variable): Simplify the initializer if there is one. 2008-10-12 Steven G. Kargl <kargls@comcast.net> PR fortran/37792 * gfortran.dg/arithmetic_overflow_1.f90: New test. From-SVN: r141072
This commit is contained in:
parent
35fced0142
commit
7a99defe0d
|
@ -1,3 +1,9 @@
|
|||
2008-10-12 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
PR fortran/37792
|
||||
* fortran/resolve.c (resolve_fl_variable): Simplify the
|
||||
initializer if there is one.
|
||||
|
||||
2008-10-11 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/37794
|
||||
|
|
|
@ -7525,6 +7525,10 @@ resolve_fl_variable (gfc_symbol *sym, int mp_flag)
|
|||
}
|
||||
}
|
||||
|
||||
/* Ensure that any initializer is simplified. */
|
||||
if (sym->value)
|
||||
gfc_simplify_expr (sym->value, 1);
|
||||
|
||||
/* Reject illegal initializers. */
|
||||
if (!sym->mark && sym->value)
|
||||
{
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2008-10-12 Steven G. Kargl <kargls@comcast.net>
|
||||
|
||||
PR fortran/37792
|
||||
* gfortran.dg/arithmetic_overflow_1.f90: New test.
|
||||
|
||||
2008-10-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||
|
||||
* gnat.dg/loop_optimization5.adb: New test.
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
! { dg-do compile }
|
||||
! Fixes PR37787 where the arithmetic overflow was not detected and an ICE ensued.
|
||||
!
|
||||
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
|
||||
!
|
||||
program bug
|
||||
implicit none
|
||||
integer(1) :: a(2) = (/ Z'FF', Z'FF' /) ! { dg-error "Arithmetic overflow" }
|
||||
print*, a
|
||||
end program bug
|
Loading…
Reference in New Issue