From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by sourceware.org (Postfix) with ESMTPS id BAAEC385781B; Fri, 12 Feb 2021 13:26:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BAAEC385781B Received: by mail-lf1-x12d.google.com with SMTP id f1so13088386lfu.3; Fri, 12 Feb 2021 05:26:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=WU5ImClJY0PntGJnrR5M6e5ausHlOvIMsM9sPSKFUHM=; b=QAnLlXPcfO/ivAQuZ3UgZrWFz+QiQSSJbgkv4LFvDihEYZZ4nSR8ASs0ZBqcoEHP5u 75ycU/CXsfIaR5SbrG9xklFa/ht2MBanmxcqkLL5ggoUdoeNwfYhexCvQV6GwAQdEa80 Lp4gBErz6m0Nn8akMNeyze6Cnc2GL9hyLyYvou4tBb6+yYwkjasysO/W2xk5PgY7SsDB UHraSQWuRNo7MLj3jOKTB1aeX1h92Qsd1Vm2VOedY0REOhVlf9oNAT9NN5GBLYMTKSPw YZB31bu+Gc5xBFRJ5G89JrfH25VHPL10ybpsh4/w7l1dxmQ8XcfTIx3dwL7w8JnNbnbF N7Iw== X-Gm-Message-State: AOAM530JpKZ7l5xkdKvy9biC7L1bdNYQkCGC0VNC427530RaVaHqffVR 60Q2DXF1/q2bYcDeFiqJl4/35vQHzhFf+5pkkRE= X-Google-Smtp-Source: ABdhPJyN2siSmw63XNY6sgYzLuY5A00rir2RsWDwQDl+Mk7qmq/6bIg5N3Wstj3reBw9PO6O2Lc7i03Fwml21nyaMFo= X-Received: by 2002:ac2:4183:: with SMTP id z3mr1635382lfh.525.1613136362394; Fri, 12 Feb 2021 05:26:02 -0800 (PST) MIME-Version: 1.0 References: <4f5fc485-3cc9-122e-be36-eadf576675db@codesourcery.com> In-Reply-To: <4f5fc485-3cc9-122e-be36-eadf576675db@codesourcery.com> From: Paul Richard Thomas Date: Fri, 12 Feb 2021 13:25:50 +0000 Message-ID: Subject: Re: [Patch] Fortran: Fix rank of assumed-rank array [PR99043] To: Tobias Burnus Cc: gcc-patches , fortran X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: fortran@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Fortran mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2021 13:26:05 -0000 Hi Tobias, The patch is good for 10- and 11-branches. Thanks Paul On Thu, 11 Feb 2021 at 18:59, Tobias Burnus wrote= : > In the Fortran standard, I think it is best explained > in the description of the RANK intrinsic: > > "Example. If X is an assumed-rank dummy argument and > its associated effective argument is an array of rank, > RANK(X) has the value 3." > > That's already well tested in assumed_rank_16.f90; > however, as the PR shows, this should not be reset > to "-1" when passing it further on as actual argument to > another assumed-rank dummy argument. > > OK for mainline? > Reported against GCC 10, not a regression but simple wrong-code fix; > does it make sense to apply there was well? > > Tobias > > ----------------- > Mentor Graphics (Deutschland) GmbH, Arnulfstrasse 201, 80634 M=C3=BCnchen > Registergericht M=C3=BCnchen HRB 106955, Gesch=C3=A4ftsf=C3=BChrer: Thoma= s Heurung, Frank > Th=C3=BCrauf > --=20 "If you can't explain it simply, you don't understand it well enough" - Albert Einstein