From ee077fcb8cdb4b4b54e4e7363eec401607c08c2c Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Wed, 18 Oct 2017 08:55:27 +0000 Subject: re PR fortran/82550 (program using submodules fails to link) 2017-10-18 Paul Thomas PR fortran/82550 * trans_decl.c (gfc_get_symbol_decl): Procedure symbols that have the 'used_in_submodule' attribute should be processed by 'gfc_get_extern_function_decl'. 2017-10-18 Paul Thomas PR fortran/82550 * gfortran.dg/submodule_30.f08 : New test. From-SVN: r253848 --- gcc/fortran/trans-decl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/fortran/trans-decl.c') diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 019b803..c21611c 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1670,7 +1670,9 @@ gfc_get_symbol_decl (gfc_symbol * sym) { /* Catch functions. Only used for actual parameters, procedure pointers and procptr initialization targets. */ - if (sym->attr.use_assoc || sym->attr.intrinsic + if (sym->attr.use_assoc + || sym->attr.used_in_submodule + || sym->attr.intrinsic || sym->attr.if_source != IFSRC_DECL) { decl = gfc_get_extern_function_decl (sym); -- cgit v1.1