From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127471 invoked by alias); 14 Feb 2018 11:48:26 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 127451 invoked by uid 89); 14 Feb 2018 11:48:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 14 Feb 2018 11:48:24 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A033A8182D1E; Wed, 14 Feb 2018 11:48:10 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-204-85.brq.redhat.com [10.40.204.85]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5CE74215671B; Wed, 14 Feb 2018 11:48:02 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w1EBlxDY019220; Wed, 14 Feb 2018 12:47:59 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w1EBlv7H019219; Wed, 14 Feb 2018 12:47:57 +0100 Date: Wed, 14 Feb 2018 11:48:00 -0000 From: Jakub Jelinek To: Janus Weil Cc: gfortran , gcc-patches , Richard Guenther Subject: Re: [Patch, Fortran, F08] PR 84313: reject procedure pointers in COMMON blocks Message-ID: <20180214114757.GB5866@tucnak> Reply-To: Jakub Jelinek References: <20180214113014.GW5867@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180214113014.GW5867@tucnak> User-Agent: Mutt/1.9.1 (2017-09-22) X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00824.txt.bz2 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