https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114308
--- Comment #9 from kargls at comcast dot net ---
(In reply to anlauf from comment #8)
> (In reply to kargls from comment #7)
> > I can no longer edit meta data for a PR. The keyword: field is wrong. This
> > is an ice-on-invalid-code. Please change.
>
> I think you need to login with your @gcc.gnu.org address now, if you have
> one.
Looking towards the future, I am trying to unify all of my accounts
across the planet to use one email address. Too many accounts to
remember.
> Regarding your patch, is there a reason you emit the symbol name twice?
>
> gfc_error ("Declared type of %qs has an ABSTRACT attribute, "
> "%qs cannot appear in the array constructor at %L",
> expr->symtree->name, expr->symtree->name, &expr->where);
>
> How about just doing it once (see e.g. NAG)?
I had
gfc_error ("Declared type of %qs has an ABSTRACT attribute, "
"it cannot appear in the array constructor at %L",
expr->symtree->name, &expr->where);
but the word 'it' seemed too vague to me. Using NAG's message
would have
gfc_error ("Array constructor value %qs at %L is of abstract type %qs",
expr->symtree->name, &expr->where, expr->ts.u.derived->name);
with the output
Array constructor value A_ARRAY is of abstract type __CLASS_MY_MODULE_A_1_0A
gfortran mangles names. I suppose we can do
gfc_error ("Array constructor value %qs at %L is of abstract type,
expr->symtree->name, &expr->where);
and leave out the name of the derived type.