------- Comment #3 from pault at gcc dot gnu dot org 2007-12-17 22:53 ------- The first part of this PR is fixed with:
Index: gcc/fortran/expr.c =================================================================== *** gcc/fortran/expr.c (revision 130811) --- gcc/fortran/expr.c (working copy) *************** find_array_element (gfc_constructor *con *** 1026,1035 **** } /* Check the bounds. */ ! if (ar->as->upper[i] ! && (mpz_cmp (e->value.integer, ar->as->upper[i]->value.integer) > 0 ! || mpz_cmp (e->value.integer, ! ar->as->lower[i]->value.integer) < 0)) { gfc_error ("index in dimension %d is out of bounds " "at %L", i + 1, &ar->c_where[i]); --- 1026,1039 ---- } /* Check the bounds. */ ! if ((ar->as->upper[i] ! && ar->as->upper[i]->expr_type == EXPR_CONSTANT ! && mpz_cmp (e->value.integer, ! ar->as->upper[i]->value.integer) > 0) ! || ! (ar->as->lower[i]->expr_type == EXPR_CONSTANT ! && mpz_cmp (e->value.integer, ! ar->as->lower[i]->value.integer) < 0)) { gfc_error ("index in dimension %d is out of bounds " "at %L", i + 1, &ar->c_where[i]); The second is due to the gfc_error at expr.c(check_restricted):2495 There is some attribute that 'i' has which should make it an exception - I just do not quite see what it is right now. Paul -- pault at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2007-12-15 10:08:30 |2007-12-17 22:53:09 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34476