public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Janus Weil <janus@gcc.gnu.org>
Cc: gfortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	       Richard Guenther <rguenther@suse.de>
Subject: Re: [Patch, Fortran, F08] PR 84313: reject procedure pointers in COMMON blocks
Date: Wed, 14 Feb 2018 11:48:00 -0000	[thread overview]
Message-ID: <20180214114757.GB5866@tucnak> (raw)
In-Reply-To: <20180214113014.GW5867@tucnak>

On Wed, Feb 14, 2018 at 12:30:14PM +0100, Jakub Jelinek wrote:
> On Tue, Feb 13, 2018 at 07:24:35PM +0100, Janus Weil wrote:
> > 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.

! { dg-additional-options "-std=f2003 -fdec" }

seems to work (because -std=f2003 sets
      gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77
        | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS;
and -fdec adds:
      gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F95_DEL
        | GFC_STD_GNU | GFC_STD_LEGACY;
), but it is quite nasty.  Isn't there a better way?

Kind like -std=gnu++17 vs. -std=c++17 where the latter is standard
and former standard + GNU extensions (which would roughly be
"| GFC_STD_GNU | GFC_STD_LEGACY" in the fortran world).

	Jakub

  reply	other threads:[~2018-02-14 11:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-13 18:24 Janus Weil
2018-02-13 19:14 ` Steve Kargl
2018-02-13 19:55   ` Richard Biener
2018-02-13 21:16     ` Janus Weil
2018-02-14 11:30 ` Jakub Jelinek
2018-02-14 11:48   ` Jakub Jelinek [this message]
2018-02-14 12:09     ` Janus Weil
2018-02-14 15:57       ` Janus Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180214114757.GB5866@tucnak \
    --to=jakub@redhat.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=janus@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).