This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch, fortran] PR 56519: Reject impure intrinsic subroutines in DO CONCURRENT
- From: Tobias Burnus <burnus at net-b dot de>
- To: Thomas Koenig <tkoenig at netcologne dot de>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 02 Sep 2013 21:16:20 +0200
- Subject: Re: [patch, fortran] PR 56519: Reject impure intrinsic subroutines in DO CONCURRENT
- Authentication-results: sourceware.org; auth=none
- References: <521FCD72 dot 8020409 at netcologne dot de>
Thomas Koenig wrote:
the attached patch rejects impure subroutines, such as RANDOM_NUMBER,
within DO CONCURRENT.
Regression-tested. OK for trunk?
Okay - and thanks for the patch. Unrelated to changes in your patch, I
am a bit unhappy about:
* Proliferation of global variables
* Magic values (0, 1, 2)
* Badly translatable strings: "â inside a DO CONCURRENT %s",
âgfc_do_concurrent_flag == 2 ? "mask" : "block"
But as those are unchanged by your patch â
Tobias
2013-08-29 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-08-29 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/PR56519
* gfortran.dg/do_concurrent_3.f90: New test case.