diff options
author | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-02 22:09:07 +0000 |
---|---|---|
committer | tkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-09-02 22:09:07 +0000 |
commit | 8b8cc022d08cfe154ff4dcfbeb4fc0cb41e11c45 (patch) | |
tree | 879ee6e37a254540b134cd1a1f80c3b10c14caf1 /gcc/fortran/intrinsic.c | |
parent | ed784636e886f11ebd3327d016fe6b274c58a21f (diff) | |
download | gcc-8b8cc022d08cfe154ff4dcfbeb4fc0cb41e11c45.tar.gz |
2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/PR56519
* gfortran.h: Declare gfc_do_concurrent_flag as extern.
* resolve.c: Rename do_concurrent_flag to gfc_do_concurrent_flag
and make non-static.
(resolve_function): Use gfc_do_concurrent_flag instead of
do_concurrent_flag.
(pure_subroutine): Likewise.
(resolve_code): Likewise.
(resolve_types): Likewise.
* intrinsic.c (gfc_intrinsic_sub_interface): Raise error for
non-pure intrinsic subroutines within DO CONCURRENT.
2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/PR56519
* gfortran.dg/do_concurrent_3.f90: New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202188 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index c2e1525a268..3da3c5365a0 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -4397,6 +4397,13 @@ gfc_intrinsic_sub_interface (gfc_code *c, int error_flag) c->resolved_sym->attr.elemental = isym->elemental; } + if (gfc_do_concurrent_flag && !isym->pure) + { + gfc_error ("Subroutine call to intrinsic '%s' in DO CONCURRENT " + "block at %L is not PURE", name, &c->loc); + return MATCH_ERROR; + } + if (gfc_pure (NULL) && !isym->pure) { gfc_error ("Subroutine call to intrinsic '%s' at %L is not PURE", name, |