re PR fortran/24633 (MODULE attribute conflicts with PROCEDURE attribute)

2007-05-18  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/24633
        * symbol.c (gfc_add_flavor): Add the NAME to error message if
        available.

From-SVN: r124828
This commit is contained in:
Daniel Franke 2007-05-18 09:25:07 -04:00 committed by Daniel Franke
parent 10d7f5f36e
commit 661051aaa9
2 changed files with 14 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2007-05-18 Daniel Franke <franke.daniel@gmail.com>
PR fortran/24633
* symbol.c (gfc_add_flavor): Add the NAME to error message if
available.
2007-05-15 Daniel Franke <franke.daniel@gmail.com>
PR fortran/31919

View File

@ -1156,9 +1156,14 @@ gfc_add_flavor (symbol_attribute * attr, sym_flavor f, const char *name,
if (where == NULL)
where = &gfc_current_locus;
gfc_error ("%s attribute conflicts with %s attribute at %L",
gfc_code2string (flavors, attr->flavor),
gfc_code2string (flavors, f), where);
if (name)
gfc_error ("%s attribute of '%s' conflicts with %s attribute at %L",
gfc_code2string (flavors, attr->flavor), name,
gfc_code2string (flavors, f), where);
else
gfc_error ("%s attribute conflicts with %s attribute at %L",
gfc_code2string (flavors, attr->flavor),
gfc_code2string (flavors, f), where);
return FAILURE;
}