[Bug fortran/24705] ICE on assumed length character result
paul dot richard dot thomas at cea dot fr
gcc-bugzilla@gcc.gnu.org
Thu Nov 10 15:54:00 GMT 2005
------- Comment #2 from paul dot richard dot thomas at cea dot fr 2005-11-10 15:54 -------
The following patch fixes this PR. Please note that it has yet to be regtested
but I do not see any problems with it. I do not thank that PR15809 has
anything to do with this one.
Index: gcc/gcc/fortran/resolve.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/fortran/resolve.c,v
retrieving revision 1.63
diff -c -p -r1.63 resolve.c
*** gcc/gcc/fortran/resolve.c 24 Oct 2005 19:28:17 -0000 1.63
--- gcc/gcc/fortran/resolve.c 10 Nov 2005 15:48:51 -0000
*************** resolve_contained_fntype (gfc_symbol * s
*** 294,299 ****
--- 294,307 ----
sym->attr.untyped = 1;
}
}
+
+ if (sym->ts.type == BT_CHARACTER)
+ {
+ gfc_charlen *cl = sym->ts.cl;
+ if (!cl || !cl->length)
+ gfc_error ("Character-valued internal function '%s' at %L must "
+ "not be automatic length", sym->name, &sym->declared_at);
+ }
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24705
More information about the Gcc-bugs
mailing list