From patchwork Sun May 20 12:46:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Janus Weil X-Patchwork-Id: 917155 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-478010-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="sB3I3ilA"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40phW73QtMz9s3x for ; Sun, 20 May 2018 22:46:56 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=DB2oAAleYBTQWRF2fvQ6SUETUYRsWHSvNg5B3BN+mw3Q4C OSZ+Xyoj7CPK1nIfesQLHUC2ozW+nRMJ1dXsRk4+8+7u4fET0VWtGhi8GVcYYpoN 58Yhhn63Nyh4VqY7K6K3cbHXs6a2lKSOLBPG/Q8P7CphUV4q04znOWK3DE8II= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=4EIJ9tVEP7Lrs3RAMAt2d9dHJF8=; b=sB3I3ilAw5D24US9fSl4 dMOl7AGhMuOfVlgEDp60R0DunYwrbYMb6k6KW5jRjGDH8n8cgETj/L3PvT7CsmWE B0464leqQCDfJ04xGbBafrS7sf/kNAEe88SgiSUP78OocGnBd2ii/XBKouJCtHNm q6hBvueWTheYNLc1gc09IKU= Received: (qmail 32252 invoked by alias); 20 May 2018 12:46:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 32234 invoked by uid 89); 20 May 2018 12:46:47 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=STOP, solutions, ABS, SQRT X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-yw0-f173.google.com Received: from mail-yw0-f173.google.com (HELO mail-yw0-f173.google.com) (209.85.161.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 20 May 2018 12:46:45 +0000 Received: by mail-yw0-f173.google.com with SMTP id x27-v6so3760993ywj.1; Sun, 20 May 2018 05:46:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=Xdeh9SuTneSl0XjBB7t4QGKM4Fn+kTFjV2RSEt5NQ9I=; b=ZlVDtHb9Q6XmBHNRBlhGSY7q54W+DVnuDuxEeXuhKz6EV+Ne7umYN+T+S/CZ64VmlX fUZaZhHC1+SEiYjUTkDnhgVdtoW9bla4v4aQmOtGAQ5q5inYYHjWYTJ6w+5uEWyULt9N TpwJjSr8gEPs8JXKooXKmDyzDnxjZHwsH1ONtzB1ZsEfuQ8OriDeyTao+4Ur/3TEGcBS sYUT3WDJwNitmKzQ7yjDLL5N8WvTbdK3ME4Xictr79Q9YWf+yfXZZfgQa6b/xRfbZWUc EU26/rC7iD/eOGPV4uruk7y0Q/NpRZpdUNexVwxwrxClb+B1E7ytoE114j2AHImoRPu5 UM2Q== X-Gm-Message-State: ALKqPwcNkXmBAyHbti4JqhNqvnrHlg18PIP050YmRkNqCNzp0ttvDQ+o vUk+7PYYGoQHiljNNPyC4rJvwz66mc1TWDrTT6LUxA== X-Google-Smtp-Source: AB8JxZrWCVwRYP0jo2gUDMGm/bc9+2+b4ek1FDvN2ZXeVtTAmOAQSVCAXbXje7g0l6VR8Zl/dCuqfNXnCO0iwwdDXV0= X-Received: by 2002:a81:3c0e:: with SMTP id j14-v6mr8540752ywa.391.1526820403117; Sun, 20 May 2018 05:46:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.129.8.212 with HTTP; Sun, 20 May 2018 05:46:42 -0700 (PDT) From: Janus Weil Date: Sun, 20 May 2018 14:46:42 +0200 Message-ID: Subject: [Patch, Fortran] PR 85841: [F2018] reject deleted features To: gfortran , gcc-patches Hi all, the attached patch deals with the fact that the Fortran 2018 standard marks two features as "deleted" (i.e. no longer supported), namely arithmetic IFs and nonblock DO constructs. Both have been obsolescent since the 90s (and have been warned about by gfortran with appropriate flags). Here's what the patch does: 1) It rejects those features with -std=f2018, giving a hard error. 2) It gives a warning with default flags (previously this happened only with -std=f2008 etc, but not with -std=gnu). Note that this does not mean that gfortran completely removes support for these features, of course. They will continue to be supported with flags like -std=legacy or -std=f95. The effect on the gfortran.dg testsuite is moderate, but of course there are a number of test cases which make use of those features. The solutions is to compile them with -std=legacy. The patch regtests cleanly on x86_64-linux-gnu. Ok for trunk? Cheers, Janus 2018-05-20 Janus Weil PR fortran/85841 * match.c (match_arithmetic_if, gfc_match_if): Reject arithmetic if in Fortran 2018. (gfc_match_stopcode): Adjust checks for standard version. * options.c (set_default_std_flags): Warn for F2018 deleted features by default. (gfc_handle_option): F2018 deleted features are allowed in earlier standards. * symbol.c (gfc_define_st_label, gfc_reference_st_label): Reject nonblock do constructs in Fortran 2018. 2018-05-20 Janus Weil PR fortran/85841 * gfortran.dg/goacc/loop-1-2.f95: Add option "-std=legacy". * gfortran.dg/goacc/loop-1.f95: Ditto. * gfortran.dg/gomp/appendix-a/a.6.1.f90: Ditto. * gfortran.dg/gomp/appendix-a/a.6.2.f90: Ditto. * gfortran.dg/gomp/do-1.f90: Ditto. * gfortran.dg/gomp/omp_do1.f90: Ditto. * gfortran.dg/pr37243.f: Ditto. * gfortran.dg/pr49721-1.f: Ditto. * gfortran.dg/pr58484.f: Ditto. * gfortran.dg/pr81175.f: Ditto. * gfortran.dg/pr81723.f: Ditto. * gfortran.dg/predcom-2.f: Ditto. * gfortran.dg/vect/Ofast-pr50414.f90: Ditto. * gfortran.dg/vect/cost-model-pr34445a.f: Ditto. * gfortran.dg/vect/fast-math-mgrid-resid.f: Ditto. * gfortran.dg/vect/pr52580.f: Ditto. Index: gcc/fortran/match.c =================================================================== --- gcc/fortran/match.c (revision 260402) +++ gcc/fortran/match.c (working copy) @@ -1442,6 +1442,8 @@ match_arithmetic_if (void) return MATCH_ERROR; } + if (!gfc_notify_std (GFC_STD_F2018_DEL, "Arithmetic IF statement at %C")) + return MATCH_ERROR; if (!gfc_notify_std (GFC_STD_F95_OBS, "Arithmetic IF statement at %C")) return MATCH_ERROR; @@ -1522,6 +1524,8 @@ gfc_match_if (gfc_statement *if_type) return MATCH_ERROR; } + if (!gfc_notify_std (GFC_STD_F2018_DEL, "Arithmetic IF statement at %C")) + return MATCH_ERROR; if (!gfc_notify_std (GFC_STD_F95_OBS, "Arithmetic IF statement at %C")) return MATCH_ERROR; @@ -2939,11 +2943,12 @@ gfc_match_stopcode (gfc_statement st) /* Set f95 for -std=f95. */ f95 = gfc_option.allow_std == (GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS); + | GFC_STD_F2008_OBS | GFC_STD_F2018_DEL); /* Set f03 for -std=f2003. */ f03 = gfc_option.allow_std == (GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS | GFC_STD_F2003); + | GFC_STD_F2008_OBS | GFC_STD_F2003 + | GFC_STD_F2018_DEL); /* Look for a blank between STOP and the stop-code for F2008 or later. */ if (gfc_current_form != FORM_FIXED && !(f95 || f03)) Index: gcc/fortran/options.c =================================================================== --- gcc/fortran/options.c (revision 260402) +++ gcc/fortran/options.c (working copy) @@ -44,7 +44,7 @@ set_default_std_flags (void) | GFC_STD_F2003 | GFC_STD_F2008 | GFC_STD_F95 | GFC_STD_F77 | GFC_STD_F2008_OBS | GFC_STD_F2008_TS | GFC_STD_GNU | GFC_STD_LEGACY | GFC_STD_F2018 | GFC_STD_F2018_DEL | GFC_STD_F2018_OBS; - gfc_option.warn_std = GFC_STD_F95_DEL | GFC_STD_LEGACY; + gfc_option.warn_std = GFC_STD_F2018_DEL | GFC_STD_F95_DEL | GFC_STD_LEGACY; } @@ -706,7 +706,7 @@ gfc_handle_option (size_t scode, const char *arg, case OPT_std_f95: gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F95 | GFC_STD_F77 - | GFC_STD_F2008_OBS; + | GFC_STD_F2008_OBS | GFC_STD_F2018_DEL; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_continue_fixed = 19; gfc_option.max_continue_free = 39; @@ -717,7 +717,7 @@ gfc_handle_option (size_t scode, const char *arg, case OPT_std_f2003: gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 - | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS; + | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008_OBS | GFC_STD_F2018_DEL; gfc_option.warn_std = GFC_STD_F95_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; @@ -726,7 +726,8 @@ gfc_handle_option (size_t scode, const char *arg, case OPT_std_f2008: gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 - | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS; + | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS + | GFC_STD_F2018_DEL; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; @@ -736,7 +737,7 @@ gfc_handle_option (size_t scode, const char *arg, case OPT_std_f2008ts: gfc_option.allow_std = GFC_STD_F95_OBS | GFC_STD_F77 | GFC_STD_F2003 | GFC_STD_F95 | GFC_STD_F2008 | GFC_STD_F2008_OBS - | GFC_STD_F2008_TS; + | GFC_STD_F2008_TS | GFC_STD_F2018_DEL; gfc_option.warn_std = GFC_STD_F95_OBS | GFC_STD_F2008_OBS; gfc_option.max_identifier_length = 63; warn_ampersand = 1; Index: gcc/fortran/symbol.c =================================================================== --- gcc/fortran/symbol.c (revision 260402) +++ gcc/fortran/symbol.c (working copy) @@ -2721,9 +2721,14 @@ gfc_define_st_label (gfc_st_label *lp, gfc_sl_type lp->defined = type; if (lp->referenced == ST_LABEL_DO_TARGET && type != ST_LABEL_DO_TARGET - && !gfc_notify_std (GFC_STD_F95_OBS, "DO termination statement " - "which is not END DO or CONTINUE with " - "label %d at %C", labelno)) + && (!gfc_notify_std (GFC_STD_F2018_DEL, + "DO termination statement which is not " + "END DO or CONTINUE with label %d at %C", + labelno) || + !gfc_notify_std (GFC_STD_F95_OBS, + "DO termination statement which is not " + "END DO or CONTINUE with label %d at %C", + labelno))) return; break; @@ -2778,8 +2783,10 @@ gfc_reference_st_label (gfc_st_label *lp, gfc_sl_t } if (lp->referenced == ST_LABEL_DO_TARGET && type == ST_LABEL_DO_TARGET - && !gfc_notify_std (GFC_STD_F95_OBS, "Shared DO termination label %d " - "at %C", labelno)) + && (!gfc_notify_std (GFC_STD_F2018_DEL, "Shared DO termination label %d " + "at %C", labelno) || + !gfc_notify_std (GFC_STD_F95_OBS, "Shared DO termination label %d " + "at %C", labelno))) return false; if (lp->referenced != ST_LABEL_DO_TARGET) Index: gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 =================================================================== --- gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 (revision 260402) +++ gcc/testsuite/gfortran.dg/goacc/loop-1-2.f95 (working copy) @@ -1,4 +1,5 @@ ! See also loop-1.f95. +! { dg-additional-options "-std=legacy" } program test call test1 @@ -32,14 +33,12 @@ subroutine test1 do 300 d = 1, 30, 6 i = d 300 a(i) = 1 - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 32 } - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 32 } + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 33 } !$acc loop do d = 1, 30, 5 i = d a(i) = 2 end do - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 38 } ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 38 } !$acc loop do i = 1, 30 @@ -150,8 +149,7 @@ subroutine test1 do i = 1, 3 do r = 4, 6 end do - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 151 } - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 151 } + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 150 } end do ! Both seq and independent are not allowed Index: gcc/testsuite/gfortran.dg/goacc/loop-1.f95 =================================================================== --- gcc/testsuite/gfortran.dg/goacc/loop-1.f95 (revision 260402) +++ gcc/testsuite/gfortran.dg/goacc/loop-1.f95 (working copy) @@ -1,4 +1,5 @@ ! See also loop-1-2.f95. +! { dg-additional-options "-std=legacy" } module test implicit none @@ -32,14 +33,12 @@ subroutine test1 do 300 d = 1, 30, 6 i = d 300 a(i) = 1 - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 32 } - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 32 } + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 33 } !$acc loop do d = 1, 30, 5 i = d a(i) = 2 end do - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 38 } ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 38 } !$acc loop do i = 1, 30 @@ -150,8 +149,7 @@ subroutine test1 do i = 1, 3 do r = 4, 6 end do - ! { dg-warning "Deleted feature: Loop variable at .1. must be integer" "" { target *-*-* } 151 } - ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 151 } + ! { dg-error "ACC LOOP iteration variable must be of type integer" "" { target *-*-* } 150 } end do ! Both seq and independent are not allowed Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.1.f90 (revision 260402) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.1.f90 (working copy) @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-options "-std=legacy" } SUBROUTINE WORK(I, J) INTEGER I,J Index: gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.2.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.2.f90 (revision 260402) +++ gcc/testsuite/gfortran.dg/gomp/appendix-a/a.6.2.f90 (working copy) @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-additional-options "-std=legacy" } SUBROUTINE WORK(I, J) INTEGER I,J Index: gcc/testsuite/gfortran.dg/gomp/do-1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/do-1.f90 (revision 260402) +++ gcc/testsuite/gfortran.dg/gomp/do-1.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O -fopenmp -fdump-tree-omplower" } +! { dg-options "-O -fopenmp -fdump-tree-omplower -std=legacy" } subroutine foo (i, j, k, s, a) integer :: i, j, k, s, a(100), l Index: gcc/testsuite/gfortran.dg/gomp/omp_do1.f90 =================================================================== --- gcc/testsuite/gfortran.dg/gomp/omp_do1.f90 (revision 260402) +++ gcc/testsuite/gfortran.dg/gomp/omp_do1.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fopenmp -std=gnu" } +! { dg-options "-fopenmp -std=legacy" } subroutine foo integer :: i, j integer, dimension (30) :: a @@ -24,11 +24,11 @@ subroutine foo i = i + 1 end do !$omp do - do 300 d = 1, 30, 6 ! { dg-warning "Deleted feature: Loop variable" } + do 300 d = 1, 30, 6 i = d 300 a(i) = 1 !$omp do - do d = 1, 30, 5 ! { dg-warning "Deleted feature: Loop variable" } + do d = 1, 30, 5 i = d a(i) = 2 end do Index: gcc/testsuite/gfortran.dg/pr37243.f =================================================================== --- gcc/testsuite/gfortran.dg/pr37243.f (revision 260402) +++ gcc/testsuite/gfortran.dg/pr37243.f (working copy) @@ -1,5 +1,6 @@ ! PR rtl-optimization/37243 ! { dg-do run } +! { dg-options "-std=legacy" } ! { dg-add-options ieee } ! Check if register allocator handles IR flattening correctly. SUBROUTINE SCHMD(V,M,N,LDV) @@ -13,10 +14,10 @@ DO 160 I = 1,M DUMI = ZERO DO 100 K = 1,N - 100 DUMI = DUMI+V(K,I)*V(K,I) ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" } + 100 DUMI = DUMI+V(K,I)*V(K,I) DUMI = ONE/ SQRT(DUMI) DO 120 K = 1,N - 120 V(K,I) = V(K,I)*DUMI ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" } + 120 V(K,I) = V(K,I)*DUMI IF (I .EQ. M) GO TO 160 I1 = I+1 DO 140 J = I1,M @@ -34,15 +35,15 @@ 220 J = J+1 IF (J .GT. N) GO TO 320 DO 240 K = 1,N - 240 V(K,I) = ZERO ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" } + 240 V(K,I) = ZERO CALL DAXPY(N,DUM,V(1,I),1,V(1,I),1) 260 CONTINUE DUMI = ZERO DO 280 K = 1,N - 280 DUMI = DUMI+V(K,I)*V(K,I) ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" } + 280 DUMI = DUMI+V(K,I)*V(K,I) IF ( ABS(DUMI) .LT. TOL) GO TO 220 DO 300 K = 1,N - 300 V(K,I) = V(K,I)*DUMI ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" } + 300 V(K,I) = V(K,I)*DUMI GO TO 200 320 END program main Index: gcc/testsuite/gfortran.dg/pr49721-1.f =================================================================== --- gcc/testsuite/gfortran.dg/pr49721-1.f (revision 260402) +++ gcc/testsuite/gfortran.dg/pr49721-1.f (working copy) @@ -1,6 +1,6 @@ ! PR middle-end/49721 ! { dg-do compile } -! { dg-options "-O3 -funroll-loops" } +! { dg-options "-O3 -funroll-loops -std=legacy" } subroutine midbloc6(c,a2,a2i,q) parameter (ndim2=6) Index: gcc/testsuite/gfortran.dg/pr58484.f =================================================================== --- gcc/testsuite/gfortran.dg/pr58484.f (revision 260402) +++ gcc/testsuite/gfortran.dg/pr58484.f (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O2" } +! { dg-options "-O2 -std=legacy" } SUBROUTINE UMPSE(AIBJ,NOC,NDIM,NOCA,NVIRA,NOCCA,E2) DIMENSION AIBJ(NOC,NDIM,*) DO 20 MA=1,NVIRA Index: gcc/testsuite/gfortran.dg/pr81175.f =================================================================== --- gcc/testsuite/gfortran.dg/pr81175.f (revision 260402) +++ gcc/testsuite/gfortran.dg/pr81175.f (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-Ofast -fwrapv" } +! { dg-options "-Ofast -fwrapv -std=legacy" } ! { dg-additional-options "-march=broadwell" { target x86_64-*-* i?86-*-* } } SUBROUTINE ECPDRA(IC4C,FP,FQ,G) IMPLICIT DOUBLE PRECISION (A-H,O-Z) Index: gcc/testsuite/gfortran.dg/pr81723.f =================================================================== --- gcc/testsuite/gfortran.dg/pr81723.f (revision 260402) +++ gcc/testsuite/gfortran.dg/pr81723.f (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-O3 -fno-automatic" } +! { dg-options "-O3 -fno-automatic -std=legacy" } FUNCTION WWERF(Z) Index: gcc/testsuite/gfortran.dg/predcom-2.f =================================================================== --- gcc/testsuite/gfortran.dg/predcom-2.f (revision 260402) +++ gcc/testsuite/gfortran.dg/predcom-2.f (working copy) @@ -1,7 +1,7 @@ ! PR 32220, ICE when the loop is not unrolled enough to eliminate all ! register copies ! { dg-do compile } -! { dg-options "-O3" } +! { dg-options "-O3 -std=legacy" } subroutine derv (b,cosxy,thick) c Index: gcc/testsuite/gfortran.dg/vect/Ofast-pr50414.f90 =================================================================== --- gcc/testsuite/gfortran.dg/vect/Ofast-pr50414.f90 (revision 260402) +++ gcc/testsuite/gfortran.dg/vect/Ofast-pr50414.f90 (working copy) @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-options "-std=legacy" } SUBROUTINE SUB (A,L,YMAX) DIMENSION A(L) Index: gcc/testsuite/gfortran.dg/vect/cost-model-pr34445a.f =================================================================== --- gcc/testsuite/gfortran.dg/vect/cost-model-pr34445a.f (revision 260402) +++ gcc/testsuite/gfortran.dg/vect/cost-model-pr34445a.f (working copy) @@ -1,4 +1,5 @@ c { dg-do compile } +c { dg-options "-std=legacy" } subroutine derv (xx,b,bv,det,r,s,t,ndopt,cosxy,thick,edis, 1 vni,vnt) implicit real*8 (a-h,o-z) Index: gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f =================================================================== --- gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f (revision 260402) +++ gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f (working copy) @@ -1,6 +1,6 @@ ! { dg-do compile } ! { dg-require-effective-target vect_double } -! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details" } +! { dg-options "-O3 --param vect-max-peeling-for-alignment=0 -fpredictive-commoning -fdump-tree-pcom-details -std=legacy" } ! { dg-additional-options "-mprefer-avx128" { target { i?86-*-* x86_64-*-* } } } ! { dg-additional-options "-mzarch" { target { s390*-*-* } } } Index: gcc/testsuite/gfortran.dg/vect/pr52580.f =================================================================== --- gcc/testsuite/gfortran.dg/vect/pr52580.f (revision 260402) +++ gcc/testsuite/gfortran.dg/vect/pr52580.f (working copy) @@ -1,4 +1,5 @@ ! { dg-do compile } +! { dg-options "-std=legacy" } ! { dg-require-effective-target vect_double } SUBROUTINE CALC2 IMPLICIT REAL*8 (A-H, O-Z)