diff options
author | Andrew Benson <abensonca@gmail.com> | 2018-08-22 17:47:53 +0000 |
---|---|---|
committer | Andrew Benson <abensonca@gcc.gnu.org> | 2018-08-22 17:47:53 +0000 |
commit | 66f32b0e2131ce85102a5fb1acee118c416afd9b (patch) | |
tree | d9eeda0615f4e2099881b8420dcfd9a9562b6fde | |
parent | fe26fd66b05e00fd686c5992d89760991c791f28 (diff) | |
download | gcc-66f32b0e2131ce85102a5fb1acee118c416afd9b.zip gcc-66f32b0e2131ce85102a5fb1acee118c416afd9b.tar.gz gcc-66f32b0e2131ce85102a5fb1acee118c416afd9b.tar.bz2 |
module.c (load_generic_interfaces): Move call to find_symbol() so that only occurs if actually needed.
2018-08-22 Andrew Benson <abensonca@gmail.com>
* module.c (load_generic_interfaces): Move call to find_symbol()
so that only occurs if actually needed.
From-SVN: r263784
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/module.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 2cd5dcf..88edff3 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,8 @@ +2018-08-22 Andrew Benson <abensonca@gmail.com> + + * module.c (load_generic_interfaces): Move call to find_symbol() + so that only occurs if actually needed. + 2018-08-22 Janus Weil <janus@gcc.gnu.org> PR fortran/86888 diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c index 196da9c..993ea9f 100644 --- a/gcc/fortran/module.c +++ b/gcc/fortran/module.c @@ -4559,9 +4559,6 @@ load_generic_interfaces (void) /* Decide if we need to load this one or not. */ p = find_use_name_n (name, &i, false); - st = find_symbol (gfc_current_ns->sym_root, - name, module_name, 1); - if (!p || gfc_find_symbol (p, NULL, 0, &sym)) { /* Skip the specific names for these cases. */ @@ -4570,6 +4567,9 @@ load_generic_interfaces (void) continue; } + st = find_symbol (gfc_current_ns->sym_root, + name, module_name, 1); + /* If the symbol exists already and is being USEd without being in an ONLY clause, do not load a new symtree(11.3.2). */ if (!only_flag && st) |