From 661051aaa96d8fc62fe7a1e44906a8d398de4f91 Mon Sep 17 00:00:00 2001 From: Daniel Franke Date: Fri, 18 May 2007 09:25:07 -0400 Subject: [PATCH] re PR fortran/24633 (MODULE attribute conflicts with PROCEDURE attribute) 2007-05-18 Daniel Franke PR fortran/24633 * symbol.c (gfc_add_flavor): Add the NAME to error message if available. From-SVN: r124828 --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/symbol.c | 11 ++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index dbd2cc85136..08c9d33a0d1 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2007-05-18 Daniel Franke + + PR fortran/24633 + * symbol.c (gfc_add_flavor): Add the NAME to error message if + available. + 2007-05-15 Daniel Franke PR fortran/31919 diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 2fef9d52d0b..71f89123e95 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -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; } -- 2.30.2