diff options
author | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-03 20:59:58 +0000 |
---|---|---|
committer | fxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-03 20:59:58 +0000 |
commit | 56342743ff951c0aac8b4f95b6005b33cbec4959 (patch) | |
tree | 0f68e03d497580f633c28cc642826023040ba163 /gcc/fortran | |
parent | 9b88f526a61b661b2c0432481bbc6ea18c49c039 (diff) | |
download | gcc-56342743ff951c0aac8b4f95b6005b33cbec4959.tar.gz |
PR fortran/52313
* module.c (gfc_use_module): Improve error messages.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184864 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/module.c | 19 |
2 files changed, 12 insertions, 12 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 0234bede6f2..b41da54c614 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2012-03-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR fortran/52313 + * module.c (gfc_use_module): Improve error messages. + 2012-03-03 Tobias Burnus <burnus@net-b.de> PR fortran/48820 diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 36ef4f8a088..31d7de1e256 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -6090,22 +6090,17 @@ gfc_use_module (gfc_use_list *module) parse_name (c); if ((start == 1 && strcmp (atom_name, "GFORTRAN") != 0) || (start == 2 && strcmp (atom_name, " module") != 0)) - gfc_fatal_error ("File '%s' opened at %C is not a GFORTRAN module " - "file", filename); + gfc_fatal_error ("File '%s' opened at %C is not a GNU Fortran" + " module file", filename); if (start == 3) { if (strcmp (atom_name, " version") != 0 || module_char () != ' ' - || parse_atom () != ATOM_STRING) - gfc_fatal_error ("Parse error when checking module version" - " for file '%s' opened at %C", filename); - - if (strcmp (atom_string, MOD_VERSION)) - { - gfc_fatal_error ("Wrong module version '%s' (expected '%s') " - "for file '%s' opened at %C", atom_string, - MOD_VERSION, filename); - } + || parse_atom () != ATOM_STRING + || strcmp (atom_string, MOD_VERSION)) + gfc_fatal_error ("Cannot read module file '%s' opened at %C," + " because it was created by an older" + " version of GNU Fortran", filename); free (atom_string); } |