diff options
author | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-13 14:57:38 +0000 |
---|---|---|
committer | burnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-09-13 14:57:38 +0000 |
commit | b410f5d1b9a47e53bf13b627f189a94c08832b45 (patch) | |
tree | 456522c8d5e110e07f9646aef6c70490f0d67b68 /gcc/fortran | |
parent | b0c967ed2394ed8f96a1ff965ef94295bee07666 (diff) | |
download | ppe42-gcc-b410f5d1b9a47e53bf13b627f189a94c08832b45.tar.gz ppe42-gcc-b410f5d1b9a47e53bf13b627f189a94c08832b45.zip |
2012-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/54556
* resolve.c (resolve_formal_arglist): Allow VALUE arguments
with implicit_pure.
(gfc_impure_variable): Don't check gfc_pure such that the
function also works for gfc_implicit_pure procedures.
2012-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/54556
* gfortran.dg/implicit_pure_3.f90: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191259 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/fortran/resolve.c | 13 |
2 files changed, 15 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 45f1c9fd48d..21e7dbe676d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,11 @@ +2012-09-13 Tobias Burnus <burnus@net-b.de> + + PR fortran/54556 + * resolve.c (resolve_formal_arglist): Allow VALUE arguments + with implicit_pure. + (gfc_impure_variable): Don't check gfc_pure such that the + function also works for gfc_implicit_pure procedures. + 2012-09-12 Tobias Burnus <burnus@net-b.de> PR fortran/54225 diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 28eea5d82c8..0748b6af78b 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -426,10 +426,12 @@ resolve_formal_arglist (gfc_symbol *proc) } else if (!sym->attr.pointer) { - if (proc->attr.function && sym->attr.intent != INTENT_IN) + if (proc->attr.function && sym->attr.intent != INTENT_IN + && !sym->value) proc->attr.implicit_pure = 0; - if (proc->attr.subroutine && sym->attr.intent == INTENT_UNKNOWN) + if (proc->attr.subroutine && sym->attr.intent == INTENT_UNKNOWN + && !sym->value) proc->attr.implicit_pure = 0; } } @@ -13565,10 +13567,9 @@ gfc_impure_variable (gfc_symbol *sym) } proc = sym->ns->proc_name; - if (sym->attr.dummy && gfc_pure (proc) - && ((proc->attr.subroutine && sym->attr.intent == INTENT_IN) - || - proc->attr.function)) + if (sym->attr.dummy + && ((proc->attr.subroutine && sym->attr.intent == INTENT_IN) + || proc->attr.function)) return 1; /* TODO: Sort out what can be storage associated, if anything, and include |