------- Comment #2 from burnus at gcc dot gnu dot org  2008-01-19 18:09 -------
It fails in array.c's
compare_bounds (gfc_expr *bound1, gfc_expr *bound2)
{
  if (bound1 == NULL || bound2 == NULL
      || bound1->expr_type != EXPR_CONSTANT
      || bound2->expr_type != EXPR_CONSTANT
      || bound1->ts.type != BT_INTEGER
      || bound2->ts.type != BT_INTEGER)
    gfc_internal_error ("gfc_compare_array_spec(): Array spec clobbered");

which is called in turn in gfc_compare_array_spec as:
  if (as1->type == AS_EXPLICIT)
    for (i = 0; i < as1->rank; i++)
      {
        if (compare_bounds (as1->lower[i], as2->lower[i]) == 0)
          return 0;

which is called by resolve.c's resolve_entries:

          else if (as && fas && gfc_compare_array_spec (as, fas) == 0)
            gfc_error ("Function %s at %L has entries with mismatched "
                       "array specifications", ns->entries->sym->name,
                       &ns->entries->sym->declared_at);

The problem is therefore that SIZE(IDA2,NF3) does not evaluate at compile time
to an integer, but that this is expected as the type is AS_EXPLICIT.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34861

Reply via email to