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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141072
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
}
}
+ /* Ensure that any initializer is simplified. */
+ if (sym->value)
+ gfc_simplify_expr (sym->value, 1);
+
/* Reject illegal initializers. */
if (!sym->mark && sym->value)
{
+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.
--- /dev/null
+! { 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