This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/34861] ICE in function with entry (and result?)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jan 2008 18:09:14 -0000
- Subject: [Bug fortran/34861] ICE in function with entry (and result?)
- References: <bug-34861-15620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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