aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-decl.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2017-10-18 08:55:27 +0000
committerPaul Thomas <pault@gcc.gnu.org>2017-10-18 08:55:27 +0000
commitee077fcb8cdb4b4b54e4e7363eec401607c08c2c (patch)
treefd3c94ed0ddeea9c01879839f77bc413085d7183 /gcc/fortran/trans-decl.c
parent04612f7f8452021ad4eba08f03bc98b196753330 (diff)
downloadgcc-ee077fcb8cdb4b4b54e4e7363eec401607c08c2c.zip
gcc-ee077fcb8cdb4b4b54e4e7363eec401607c08c2c.tar.gz
gcc-ee077fcb8cdb4b4b54e4e7363eec401607c08c2c.tar.bz2
re PR fortran/82550 (program using submodules fails to link)
2017-10-18 Paul Thomas <pault@gcc.gnu.org> 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 <pault@gcc.gnu.org> PR fortran/82550 * gfortran.dg/submodule_30.f08 : New test. From-SVN: r253848
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r--gcc/fortran/trans-decl.c4
1 files changed, 3 insertions, 1 deletions
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);