diff options
Diffstat (limited to 'gcc/fortran/module.c')
-rw-r--r-- | gcc/fortran/module.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 3d4b17b..3e1ffedd8 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -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 (); |