diff options
Diffstat (limited to 'gcc/fortran/trans-decl.c')
-rw-r--r-- | gcc/fortran/trans-decl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 9d71d71..04f037b 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1203,7 +1203,7 @@ build_function_decl (gfc_symbol * sym) /* TODO: check if a pure SUBROUTINE has no INTENT(OUT) arguments including a alternate return. In that case it can also be marked as PURE. See also in gfc_get_extern_function_decl(). */ - if (attr.function) + if (attr.function && !gfc_return_by_reference (sym)) DECL_IS_PURE (fndecl) = 1; TREE_SIDE_EFFECTS (fndecl) = 0; } |