mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-04 20:21:36 +08:00
re PR fortran/35093 (gfortran.dg/data_constraints_1.f90)
2008-02-05 Tobias Burnus <burnus@net-b.de> PR fortran/35093 * data.c (gfc_assign_data_value): Only free "size" if it has not already been freed. From-SVN: r132128
This commit is contained in:
parent
6a279e9228
commit
da36ba2754
@ -1,3 +1,9 @@
|
||||
2008-02-05 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/35093
|
||||
* data.c (gfc_assign_data_value): Only free "size" if
|
||||
it has not already been freed.
|
||||
|
||||
2008-02-05 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
PR fortran/34945
|
||||
|
@ -321,15 +321,17 @@ gfc_assign_data_value (gfc_expr *lvalue, gfc_expr *rvalue, mpz_t index)
|
||||
else
|
||||
{
|
||||
mpz_t size;
|
||||
if (spec_size (ref->u.ar.as, &size) == SUCCESS
|
||||
&& mpz_cmp (offset, size) >= 0)
|
||||
if (spec_size (ref->u.ar.as, &size) == SUCCESS)
|
||||
{
|
||||
if (mpz_cmp (offset, size) >= 0)
|
||||
{
|
||||
mpz_clear (size);
|
||||
gfc_error ("Data element above array upper bound at %L",
|
||||
&lvalue->where);
|
||||
return FAILURE;
|
||||
}
|
||||
mpz_clear (size);
|
||||
gfc_error ("Data element above array upper bound at %L",
|
||||
&lvalue->where);
|
||||
return FAILURE;
|
||||
}
|
||||
mpz_clear (size);
|
||||
}
|
||||
|
||||
/* Splay tree containing offset and gfc_constructor. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user