http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49074
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org
|gnu.org |
--- Comment #3 from janus at gcc dot gnu.org 2011-06-16 18:24:15 UTC ---
Ok, in fact we just fail to propagate the locus when replacing the assignment
with the corresponding type-bound call. The following one-liner fixes it:
Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c (revision 175100)
+++ gcc/fortran/interface.c (working copy)
@@ -3242,6 +3242,7 @@ gfc_extend_assign (gfc_code *c, gfc_namespace *ns)
c->expr1 = gfc_get_expr ();
build_compcall_for_operator (c->expr1, actual, tb_base, tbo, gname);
c->expr1->value.compcall.assign = 1;
+ c->expr1->where = c->loc;
c->expr2 = NULL;
c->op = EXEC_COMPCALL;
With this one gets the correct error message:
foobar = [bar(1), bar(2)]
1
Error: Non-scalar base object at (1) currently not implemented
Will commit as obvious after regtesting.