Commit df80a455 by Thomas Koenig

re PR fortran/34305 (ICE with array(real) declaration)

2007-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/34305
	* resolve.c (compare_bound):  If either of the types of
	the arguments isn't INTEGER, return CMP_UNKNOWN.

2007-12-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/34305
	* gfortran.dg/real_dimension_1.f:  New test case.

From-SVN: r130993
parent c238230e
2007-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/34305
* resolve.c (compare_bound): If either of the types of
the arguments isn't INTEGER, return CMP_UNKNOWN.
2007-12-16 Tobias Burnus <burnus@net-b.de> 2007-12-16 Tobias Burnus <burnus@net-b.de>
PR fortran/34246 PR fortran/34246
......
...@@ -3149,8 +3149,11 @@ compare_bound (gfc_expr *a, gfc_expr *b) ...@@ -3149,8 +3149,11 @@ compare_bound (gfc_expr *a, gfc_expr *b)
|| b == NULL || b->expr_type != EXPR_CONSTANT) || b == NULL || b->expr_type != EXPR_CONSTANT)
return CMP_UNKNOWN; return CMP_UNKNOWN;
/* If either of the types isn't INTEGER, we must have
raised an error earlier. */
if (a->ts.type != BT_INTEGER || b->ts.type != BT_INTEGER) if (a->ts.type != BT_INTEGER || b->ts.type != BT_INTEGER)
gfc_internal_error ("compare_bound(): Bad expression"); return CMP_UNKNOWN;
i = mpz_cmp (a->value.integer, b->value.integer); i = mpz_cmp (a->value.integer, b->value.integer);
......
2007-12-16 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/34305
* gfortran.dg/real_dimension_1.f: New test case.
2007-12-16 Rask Ingemann Lambertsen <rask@sygehus.dk> 2007-12-16 Rask Ingemann Lambertsen <rask@sygehus.dk>
* gcc.dg/torture/pr24257.c: Remove -O from options. * gcc.dg/torture/pr24257.c: Remove -O from options.
! { dg-do compile }
! PR 34305 - make sure there's an error message for specifying a
program test
parameter (datasize = 1000)
dimension idata (datasize) ! { dg-error "must be of INTEGER type|must have constant shape" }
idata (1) = -1
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment