]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2019-04-13 Dominique d'Humieres <dominiq@gcc.gnu.org>
authordominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Apr 2019 11:32:49 +0000 (11:32 +0000)
committerdominiq <dominiq@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Apr 2019 11:32:49 +0000 (11:32 +0000)
PR fortran/79842
* module.c (gfc_use_module): use complete sentences.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@270338 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/module.c

index 69e9009d250989eb523a9246cc5b1f4f2a74823b..ef6200c65199ae81a6d2e18c5c04bd9977c6bec6 100644 (file)
@@ -1,3 +1,8 @@
+2019-04-13  Dominique d'Humieres  <dominiq@gcc.gnu.org>
+
+       PR fortran/79842
+       * module.c (gfc_use_module): use complete sentences.
+
 2019-04-11  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR translation/89939
index 3d4b17b599ee1495ad7a0289ad21d4ff202701db..3e1ffedd8ee8c23cb121a42d8b34e92fcf4b6cd8 100644 (file)
@@ -7144,8 +7144,12 @@ gfc_use_module (gfc_use_list *module)
   for (p = gfc_state_stack; p; p = p->previous)
     if ((p->state == COMP_MODULE || p->state == COMP_SUBMODULE)
         && strcmp (p->sym->name, module_name) == 0)
-      gfc_fatal_error ("Cannot USE the same %smodule we're building",
-                      p->state == COMP_SUBMODULE ? "sub" : "");
+      {
+       if (p->state == COMP_SUBMODULE)
+         gfc_fatal_error ("Cannot USE a submodule that is currently built");
+       else
+         gfc_fatal_error ("Cannot USE a module that is currently built");
+      }
 
   init_pi_tree ();
   init_true_name_tree ();