repeated error messages
Tobias Burnus
burnus@net-b.de
Sun Dec 18 20:09:00 GMT 2011
Steve Kargl wrote:
> Can the repeated error message be suppressed? If not,
> how about removing the error message, and letting gfortran
> ICE.
Emitting an ICE is definitely the wrong solution: We have at least 5 bug
reports about this and, additionally, several users reported the ICE via
the mailing list. Having multiple errors is not that nice, but still it
points at the error and trying something complicated for an interim
problem seems to be overkill.
> Here's a better patch. No sense in continue to compile the code
> if a component with a deferred type parameter is encountered.
Well, you could also simply change in
> for (c = sym->components; c != NULL; c = c->next)
> {
> - /* See PRs 51550, 47545, 48654, 49050, 51075 - and 45170. */
> - if (c->ts.type == BT_CHARACTER&& c->ts.deferred)
> - {
> - gfc_error ("Deferred-length character component '%s' at %L is not "
> - "yet supported", c->name,&c->loc);
the gfc_error into an gfc_fatal_error.
> + if (c->ts.deferred)
> + {
> +#define DTPMSG "Component with deferred type parameter is unsupported"
> + fatal_error (DTPMSG);
First: I do not like the #define. Additionally, the information about
the error location is not as ideal as with the message above.
Thus, if you do not like emitting the message several times, how about
doing the gfc_error to gfc_fatal_error change in resolve.c?
Tobias
More information about the Fortran
mailing list