From patchwork Tue Jan 22 20:58:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Koenig X-Patchwork-Id: 1029528 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-494553-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=netcologne.de Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="GnbYZEw1"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netcologne.de header.i=@netcologne.de header.b="JaRVHbFd"; 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 43kglF0wVlz9sCs for ; Wed, 23 Jan 2019 07:59:19 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=W6ZqlXRupvstSvIrIOPvapabH12J6OGDsc8TwrnXXb3XdPV2FL cw38ibOlmpvf+it9W6t3rq9qXJUZXJqWT28CL/kQo+Bx3lmgy1WN44Qa+hU+B3mi wJhcpfkWJhM8eQhS9kqLOYA7YVi2BNZqJoYAQ+wpWmxBVpupY4iKODO+E= 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:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=l38AfkUNlckk+grj7KPIUVaHYBw=; b=GnbYZEw1rO5ZeYLsJTLn 9hVf51KQQBX0tWdT81sHe3gAAEjTZY8bSwBAH3mJJvD4hT3Y9gfW2nesBiLToy+F UG9QayKrjx+d/bQRYoRR0AMeT4sX1ntiRNPnHkAr/LnA/v1p0isgVEqFmHFaKp23 LJKchq0ss2WaG1Q0YKxq01c= Received: (qmail 23135 invoked by alias); 22 Jan 2019 20:59:02 -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 22317 invoked by uid 89); 22 Jan 2019 20:59:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=PACK, cpt, sk:array_r, elemental X-HELO: cc-smtpout1.netcologne.de Received: from cc-smtpout1.netcologne.de (HELO cc-smtpout1.netcologne.de) (89.1.8.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Jan 2019 20:58:56 +0000 Received: from cc-smtpin1.netcologne.de (cc-smtpin1.netcologne.de [89.1.8.201]) by cc-smtpout1.netcologne.de (Postfix) with ESMTP id A4B7D13187; Tue, 22 Jan 2019 21:58:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=netcologne.de; s=nc1116a; t=1548190733; bh=aRul2bMGUagKgNr+hVmGp34iHuZRxuz2I/t7Fm+KnnA=; h=To:From:Subject:Message-ID:Date:From; b=JaRVHbFd8B+AYIpRHAuQ2ht5TMTJw3BIwUihMGTAu4Y9T1OaUeKnrW+Q8L4peM3YZ z7I01hfoJvMvgc75gTKczklrsp230lkajdGKl46IEWT6QvwRZ7njzUxghViVF+Oy4G nDhiFvcfMKp/rJIjGqARAMCVOd+16KMZeIBlWIPU1aAhxkwSrXc/KnzFpqNs2hwvnG w+2RUy/ocKLX/lTMUcpIIF8GKB1GQySl0V3TU6ZQVZ7S8H9ZZx07O3p3oVYzM4dEsq twgNIcP7bmB4Q7wzxqNUvlN7GAYn53/anmnBC8Dp5237p/cxw/pVzuGmmP0a/vWCIV PI2ohBr/VENuQ== Received: from localhost (localhost [127.0.0.1]) by cc-smtpin1.netcologne.de (Postfix) with ESMTP id 97CC511ED8; Tue, 22 Jan 2019 21:58:53 +0100 (CET) Received: from [78.35.145.129] (helo=cc-smtpin1.netcologne.de) by localhost with ESMTP (eXpurgate 4.6.0) (envelope-from ) id 5c47840d-5f8a-7f0000012729-7f000001a608-1 for ; Tue, 22 Jan 2019 21:58:53 +0100 Received: from [192.168.178.68] (xdsl-78-35-145-129.nc.de [78.35.145.129]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by cc-smtpin1.netcologne.de (Postfix) with ESMTPSA; Tue, 22 Jan 2019 21:58:51 +0100 (CET) To: "fortran@gcc.gnu.org" , gcc-patches From: Thomas Koenig Subject: [patch, fortran] Move some array packing to front end Message-ID: <9155895c-c6d3-e131-9b48-96bba76bc696@netcologne.de> Date: Tue, 22 Jan 2019 21:58:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 Hello world, the attached patch moves the packing / unpacking of arrays to the front end when optimizing, but not for size. Rationale: internal_pack and internal_unpack are opaque to the compiler. This can lead to a lot of information loss for inlining and inter- procedural optimization, and in extreme cases can lead to huge slowdowns. I don't want to do this for -Os or for -O0. -Os because I want to avoid size increases, and -O0 for several reasons: The current method works well, if there should turn out to be a bug still hiding in this code I want to at least have "works with -O0" in the bug report, and finally I did not want to rewrite all test cases. Because run test cases cycle through a lot of optimization options, I had to split some of them up - test the pattern matches with -O0, test for run time correctness under all the options. I have regression-tested this. I would, however, prefer if some people could run this patch against their non-testsuite code and report any problems that this may introduce. So, if you can spare the time and the cycles, that would be great. The nice thing about this kind of patch is that, if this does not work for a certain condition, it is usually straightforward to check for the condition and then simply not do the optimization. So, comments? Bug reports? OK for trunk if nobody has come up with a bug in the next few days? Regards Thomas 2019-01-22 Thomas Koenig PR fortran/88821 * expr.c (gfc_is_simply_contiguous): Return true for an EXPR_ARRAY. * trans-array.c (is_pointer): New function. (gfc_conv_array_parameter): Call gfc_conv_subref_array_arg when not optimizing and not optimizing for size if the formal arg is passed by reference. * trans-expr.c (gfc_conv_subref_array_arg): Add arguments fsym, proc_name and sym. Add run-time warning for temporary array creation. Wrap argument if passing on an optional argument to an optional argument. * trans.h (gfc_conv_subref_array_arg): Add optional arguments fsym, proc_name and sym to prototype. 2019-01-22 Thomas Koenig PR fortran/88821 * gfortran.dg/alloc_comp_auto_array_3.f90: Add -O0 to dg-options to make sure the test for internal_pack is retained. * gfortran.dg/assumed_type_2.f90: Split compile and run time tests into this and * gfortran.dg/assumed_type_2a.f90: New file. * gfortran.dg/c_loc_test_22.f90: Likewise. * gfortran.dg/contiguous_3.f90: Likewise. * gfortran.dg/internal_pack_11.f90: Likewise. * gfortran.dg/internal_pack_12.f90: Likewise. * gfortran.dg/internal_pack_16.f90: Likewise. * gfortran.dg/internal_pack_17.f90: Likewise. * gfortran.dg/internal_pack_18.f90: Likewise. * gfortran.dg/internal_pack_4.f90: Likewise. * gfortran.dg/internal_pack_5.f90: Add -O0 to dg-options to make sure the test for internal_pack is retained. * gfortran.dg/internal_pack_6.f90: Split compile and run time tests into this and * gfortran.dg/internal_pack_6a.f90: New file. * gfortran.dg/internal_pack_8.f90: Likewise. * gfortran.dg/missing_optional_dummy_6: Split compile and run time tests into this and * gfortran.dg/missing_optional_dummy_6a.f90: New file. * gfortran.dg/no_arg_check_2.f90: Split compile and run time tests into this and * gfortran.dg/no_arg_check_2a.f90: New file. * gfortran.dg/typebound_assignment_5.f90: Split compile and run time tests into this and * gfortran.dg/typebound_assignment_5a.f90: New file. * gfortran.dg/typebound_assignment_6.f90: Split compile and run time tests into this and * gfortran.dg/typebound_assignment_6a.f90: New file. * gfortran.dg/internal_pack_19.f90: New file. * gfortran.dg/internal_pack_20.f90: New file. ! { dg-do compile } ! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/56136 ! ICE on defined assignment with class arrays. ! ! Original testcase by Alipasha MODULE A_TEST_M TYPE :: A_TYPE INTEGER :: I CONTAINS GENERIC :: ASSIGNMENT (=) => ASGN_A PROCEDURE, PRIVATE :: ASGN_A END TYPE CONTAINS ELEMENTAL SUBROUTINE ASGN_A (A, B) CLASS (A_TYPE), INTENT (INOUT) :: A CLASS (A_TYPE), INTENT (IN) :: B A%I = B%I END SUBROUTINE END MODULE A_TEST_M PROGRAM ASGN_REALLOC_TEST USE A_TEST_M TYPE (A_TYPE), ALLOCATABLE :: A(:) INTEGER :: I, J ALLOCATE (A(100)) A = (/ (A_TYPE(I), I=1,SIZE(A)) /) A(1:50) = A(51:100) IF (ANY(A%I /= (/ ((50+I, I=1,SIZE(A)/2), J=1,2) /))) STOP 1 A(::2) = A(1:50) ! pack/unpack IF (ANY(A( ::2)%I /= (/ (50+I, I=1,SIZE(A)/2) /))) STOP 2 IF (ANY(A(2::2)%I /= (/ ((50+2*I, I=1,SIZE(A)/4), J=1,2) /))) STOP 3 END PROGRAM ! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } } ! { dg-final { scan-tree-dump-times "_gfortran_internal_unpack" 1 "original" } } ! { dg-do run } ! ! PR fortran/49074 ! ICE on defined assignment with class arrays. module foo type bar integer :: i contains generic :: assignment (=) => assgn_bar procedure, private :: assgn_bar end type bar contains elemental subroutine assgn_bar (a, b) class (bar), intent (inout) :: a class (bar), intent (in) :: b select type (b) type is (bar) a%i = b%i end select return end subroutine assgn_bar end module foo program main use foo type (bar), allocatable :: foobar(:) allocate (foobar(2)) foobar = [bar(1), bar(2)] if (any(foobar%i /= [1, 2])) STOP 1 end program Index: fortran/expr.c =================================================================== --- fortran/expr.c (revision 268104) +++ fortran/expr.c (working copy) @@ -5582,6 +5582,9 @@ gfc_is_simply_contiguous (gfc_expr *expr, bool str gfc_ref *ref, *part_ref = NULL; gfc_symbol *sym; + if (expr->expr_type == EXPR_ARRAY) + return true; + if (expr->expr_type == EXPR_FUNCTION) { if (expr->value.function.esym) Index: fortran/trans-array.c =================================================================== --- fortran/trans-array.c (revision 268104) +++ fortran/trans-array.c (working copy) @@ -7755,6 +7755,23 @@ array_parameter_size (tree desc, gfc_expr *expr, t *size, fold_convert (gfc_array_index_type, elem)); } +/* Helper function - return true if the argument is a pointer. */ + +static bool +is_pointer (gfc_expr *e) +{ + gfc_symbol *sym; + + if (e->expr_type != EXPR_VARIABLE || e->symtree == NULL) + return false; + + sym = e->symtree->n.sym; + if (sym == NULL) + return false; + + return sym->attr.pointer || sym->attr.proc_pointer; +} + /* Convert an array for passing as an actual parameter. */ void @@ -8006,6 +8023,19 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * "Creating array temporary at %L", &expr->where); } + /* When optmizing, we can use gfc_conv_subref_array_arg for + making the packing and unpacking operation visible to the + optimizers. */ + + if (g77 && optimize && !optimize_size && expr->expr_type == EXPR_VARIABLE + && !is_pointer (expr)) + { + gfc_conv_subref_array_arg (se, expr, g77, + fsym ? fsym->attr.intent : INTENT_INOUT, + false, fsym, proc_name, sym); + return; + } + ptr = build_call_expr_loc (input_location, gfor_fndecl_in_pack, 1, desc); Index: fortran/trans-expr.c =================================================================== --- fortran/trans-expr.c (revision 268104) +++ fortran/trans-expr.c (working copy) @@ -4536,7 +4536,9 @@ gfc_apply_interface_mapping (gfc_interface_mapping after the function call. */ void gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr, int g77, - sym_intent intent, bool formal_ptr) + sym_intent intent, bool formal_ptr, + const gfc_symbol *fsym, const char *proc_name, + gfc_symbol *sym) { gfc_se lse; gfc_se rse; @@ -4553,7 +4555,25 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_ex stmtblock_t body; int n; int dimen; + tree parmse_expr; + if (gfc_option.rtcheck & GFC_RTCHECK_ARRAY_TEMPS) + { + /* We will create a temporary array, so let us warn. */ + char * msg; + + if (fsym && proc_name) + msg = xasprintf ("An array temporary was created for argument " + "'%s' of procedure '%s'", fsym->name, proc_name); + else + msg = xasprintf ("An array temporary was created"); + + tmp = build_int_cst (logical_type_node, 1); + gfc_trans_runtime_check (false, true, tmp, &parmse->pre, + &expr->where, msg); + free (msg); + } + gfc_init_se (&lse, NULL); gfc_init_se (&rse, NULL); @@ -4803,10 +4823,25 @@ class_array_fcn: /* We want either the address for the data or the address of the descriptor, depending on the mode of passing array arguments. */ if (g77) - parmse->expr = gfc_conv_descriptor_data_get (parmse->expr); + parmse_expr = gfc_conv_descriptor_data_get (parmse->expr); else - parmse->expr = gfc_build_addr_expr (NULL_TREE, parmse->expr); + parmse_expr = gfc_build_addr_expr (NULL_TREE, parmse->expr); + /* Wrap in "if (present(x))" if needed. */ + + if (fsym && fsym->attr.optional && sym && sym->attr.optional) + { + tree present; + tree type; + + present = gfc_conv_expr_present (sym); + type = TREE_TYPE (parmse_expr); + tmp = fold_build3_loc (input_location, COND_EXPR, type, present, + parmse_expr, build_int_cst (type, 0)); + parmse_expr = tmp; + } + + parmse->expr = parmse_expr; return; } Index: fortran/trans.h =================================================================== --- fortran/trans.h (revision 268104) +++ fortran/trans.h (working copy) @@ -529,7 +529,10 @@ int gfc_is_intrinsic_libcall (gfc_expr *); int gfc_conv_procedure_call (gfc_se *, gfc_symbol *, gfc_actual_arglist *, gfc_expr *, vec *); -void gfc_conv_subref_array_arg (gfc_se *, gfc_expr *, int, sym_intent, bool); +void gfc_conv_subref_array_arg (gfc_se *, gfc_expr *, int, sym_intent, bool, + const gfc_symbol *fsym = NULL, + const char *proc_name = NULL, + gfc_symbol *sym = NULL); /* Generate code for a scalar assignment. */ tree gfc_trans_scalar_assign (gfc_se *, gfc_se *, gfc_typespec, bool, bool, Index: testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 =================================================================== --- testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 (revision 268104) +++ testsuite/gfortran.dg/alloc_comp_auto_array_3.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! Test the fix for PR66082. The original problem was with the first ! call foo_1d. Index: testsuite/gfortran.dg/assumed_type_2.f90 =================================================================== --- testsuite/gfortran.dg/assumed_type_2.f90 (revision 268104) +++ testsuite/gfortran.dg/assumed_type_2.f90 (working copy) @@ -1,5 +1,5 @@ -! { dg-do run } -! { dg-options "-fdump-tree-original" } +! { dg-do compile } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/48820 ! Index: testsuite/gfortran.dg/c_loc_test_22.f90 =================================================================== --- testsuite/gfortran.dg/c_loc_test_22.f90 (revision 268104) +++ testsuite/gfortran.dg/c_loc_test_22.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/56907 ! Index: testsuite/gfortran.dg/contiguous_3.f90 =================================================================== --- testsuite/gfortran.dg/contiguous_3.f90 (revision 268104) +++ testsuite/gfortran.dg/contiguous_3.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/40632 ! Index: testsuite/gfortran.dg/internal_pack_11.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_11.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_11.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! Test the fix for PR43173, where unnecessary calls to internal_pack/unpack ! were being produced below. These references are contiguous and so do not Index: testsuite/gfortran.dg/internal_pack_12.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_12.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_12.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! Test the fix for PR43243, where unnecessary calls to internal_pack/unpack ! were being produced below. These references are contiguous and so do not Index: testsuite/gfortran.dg/internal_pack_16.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_16.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_16.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-O0 -fdump-tree-original" } ! PR 59345 - pack/unpack was not needed here. SUBROUTINE S1(A) REAL :: A(3) Index: testsuite/gfortran.dg/internal_pack_17.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_17.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_17.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-O0 -fdump-tree-original" } ! PR 59345 - pack/unpack was not needed here. ! Original test case by Joost VandeVondele SUBROUTINE S1(A) Index: testsuite/gfortran.dg/internal_pack_18.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_18.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_18.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-additional-options "-fdump-tree-original" } +! { dg-additional-options "-O0 -fdump-tree-original" } ! PR 57992 - this was packed/unpacked unnecessarily. ! Original case by Tobias Burnus. subroutine test Index: testsuite/gfortran.dg/internal_pack_4.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_4.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_4.f90 (working copy) @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-options "-fdump-tree-original" } ! ! PR fortran/36132 ! @@ -25,6 +24,3 @@ END MODULE M1 USE M1 CALL S2() END - -! { dg-final { scan-tree-dump-times "a != 0B \\? \\\(.*\\\) _gfortran_internal_pack" 1 "original" } } -! { dg-final { scan-tree-dump-times "if \\(a != 0B &&" 1 "original" } } Index: testsuite/gfortran.dg/internal_pack_5.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_5.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_5.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/36909 ! Index: testsuite/gfortran.dg/internal_pack_6.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_6.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_6.f90 (working copy) @@ -1,5 +1,5 @@ -! { dg-do run } -! { dg-options "-fdump-tree-original" } +! { dg-do compile } +! { dg-options "-O0 -fdump-tree-original" } ! ! Test the fix for PR41113 and PR41117, in which unnecessary calls ! to internal_pack and internal_unpack were being generated. Index: testsuite/gfortran.dg/internal_pack_9.f90 =================================================================== --- testsuite/gfortran.dg/internal_pack_9.f90 (revision 268104) +++ testsuite/gfortran.dg/internal_pack_9.f90 (working copy) @@ -1,5 +1,5 @@ ! { dg-do compile } -! { dg-options "-fdump-tree-original" } +! { dg-options "-O0 -fdump-tree-original" } ! ! During the discussion of the fix for PR43072, in which unnecessary ! calls to internal PACK/UNPACK were being generated, the following, Index: testsuite/gfortran.dg/missing_optional_dummy_6.f90 =================================================================== --- testsuite/gfortran.dg/missing_optional_dummy_6.f90 (revision 268104) +++ testsuite/gfortran.dg/missing_optional_dummy_6.f90 (working copy) @@ -46,14 +46,3 @@ contains end subroutine scalar2 end program test - -! { dg-final { scan-tree-dump-times "scalar2 \\(slr1" 1 "original" } } - -! { dg-final { scan-tree-dump-times "= es1 != 0B" 1 "original" } } -! { dg-final { scan-tree-dump-times "assumed_shape2 \\(es1" 0 "original" } } -! { dg-final { scan-tree-dump-times "explicit_shape2 \\(es1" 1 "original" } } - -! { dg-final { scan-tree-dump-times "= as1 != 0B" 2 "original" } } -! { dg-final { scan-tree-dump-times "assumed_shape2 \\(as1" 0 "original" } } -! { dg-final { scan-tree-dump-times "explicit_shape2 \\(as1" 0 "original" } } - Index: testsuite/gfortran.dg/no_arg_check_2.f90 =================================================================== --- testsuite/gfortran.dg/no_arg_check_2.f90 (revision 268104) +++ testsuite/gfortran.dg/no_arg_check_2.f90 (working copy) @@ -1,5 +1,5 @@ -! { dg-do run } -! { dg-options "-fdump-tree-original" } +! { dg-do compile } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/39505 ! Index: testsuite/gfortran.dg/typebound_assignment_5.f03 =================================================================== --- testsuite/gfortran.dg/typebound_assignment_5.f03 (revision 268104) +++ testsuite/gfortran.dg/typebound_assignment_5.f03 (working copy) @@ -1,5 +1,5 @@ -! { dg-do run } -! { dg-options "-fdump-tree-original" } +! { dg-do compile } +! { dg-options "-O0 -fdump-tree-original" } ! ! PR fortran/49074 ! ICE on defined assignment with class arrays. Index: testsuite/gfortran.dg/typebound_assignment_6.f03 =================================================================== --- testsuite/gfortran.dg/typebound_assignment_6.f03 (revision 268104) +++ testsuite/gfortran.dg/typebound_assignment_6.f03 (working copy) @@ -1,5 +1,4 @@ ! { dg-do run } -! { dg-options "-fdump-tree-original" } ! ! PR fortran/56136 ! ICE on defined assignment with class arrays. @@ -37,6 +36,3 @@ IF (ANY(A(2::2)%I /= (/ ((50+2*I, I=1,SIZE(A)/4), J=1,2) /))) STOP 3 END PROGRAM -! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } } -! { dg-final { scan-tree-dump-times "_gfortran_internal_unpack" 1 "original" } } -