This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, Fortran, F08] PR 84313: reject procedure pointers in COMMON blocks
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Janus Weil <janus at gcc dot gnu dot org>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Guenther <rguenther at suse dot de>
- Date: Wed, 14 Feb 2018 12:30:14 +0100
- Subject: Re: [Patch, Fortran, F08] PR 84313: reject procedure pointers in COMMON blocks
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qhbdSontmz3XmNO9r9ec4OUfod+hk9U-k57Sv-o009Uvw@mail.gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 13, 2018 at 07:24:35PM +0100, Janus Weil wrote:
> Hi all,
>
> as the subject line says, the attached patch rejects procedure
> pointers in COMMON blocks (which is forbidden in F08). Since it's
> apparently legal in F03, I'm still accepting it with -std=f2003 and
> add that flag to a test case where this 'feature' is used. In another
> one, I'm adding the error message that one gets with -std=f2008.
>
> As my last submission, this fixes fallout from
> https://groups.google.com/forum/?fromgroups#!topic/comp.lang.fortran/AIHRQ2kJv3c.
> As the last one, it is a very simple fix for an accepts-invalid
> problem (which is not a regression), so I hope this one will also
> still be suitable for trunk (if not, I hope the release managers, in
> CC, will stop me).
>
> It does regtest cleanly on x86_64-linux-gnu. Ok for trunk?
This broke libgomp.fortran/threadprivate4.f90 test.
Adding ! { dg-additional-options "-std=f2003" }
doesn't work, because the test uses
call abort
which is a GNU extension and I have no idea how to choose allow_std
which includes GNU but doesn't include F2008.
Jakub