From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by sourceware.org (Postfix) with ESMTPS id A2F993855030; Fri, 23 Jul 2021 19:08:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A2F993855030 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [79.251.15.92] ([79.251.15.92]) by web-mail.gmx.net (3c-app-gmx-bs28.server.lan [172.19.170.80]) (via HTTP); Fri, 23 Jul 2021 21:08:11 +0200 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: Tobias Burnus Cc: fortran , gcc-patches Subject: Re: [PATCH] PR fortran/101536 - ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:7324 Content-Type: text/plain; charset=UTF-8 Date: Fri, 23 Jul 2021 21:08:11 +0200 Importance: normal Sensitivity: Normal In-Reply-To: <449b9a29-4df4-9a5b-7675-a11db7aebe1f@codesourcery.com> References: <449b9a29-4df4-9a5b-7675-a11db7aebe1f@codesourcery.com> Content-Transfer-Encoding: quoted-printable X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:OSgIHyJlvuVIb2iX7WE3U7XftMUSd1L+KN5+DvCGjXRnMlvAHOmMzKfMA409DyUCSX8Up IhU937MvZi2YfDOT/JVcUZezfEOCAokj+zVnQXFrdP5TAizLIDoZuBl4rSpstFE2TDdfmxJMOO3y tFLW8GdQAuSc82u93cQZankJqmlM5x7g66gTIoDnMYcaRLU1mqma+7zofMEy+Zl4TLwtXKiiz78M JFLdXiwOQ2gHTvJTYyvuPI6Ddl5ROz/cOy+ZYG4MlXJnW3oultTD2OrGBrA7yKm3ig3zX+GTH/hs 50= X-UI-Out-Filterresults: notjunk:1;V03:K0:nTUbJ9QQRVY=:04tKOtcluoN5q5CKRacaBi KkGK1LuEQhs7hTGS/QPSBoFhJiAoc9d3WYFGzfOifJXjZlXeu2AduR9NQjnH/bwXwZXRBHwKL 8TsRtAXR0kw2kZW2QnlLoAUxd48MmmJ3CsXu/kFpXloIDRXgA40S5i21GsnE0QmAU3dHEIdrP IzuS9wiLV+UTmJpTkRcZhlL0t2NRrLwlzaqZApyCYxpIbbsNN+on8koBFUgDBAQntveSwMblN J7v5zq/drmOYt4R1NGXsZJSrt9vlWkabhZW2z6FQwHnoMPVpiPnjNvMoGGPX/mh7e7nB8yWDF TXYkR7nkSgbajYgRPM/+ZrFkG2tdjCltkrAwz5RPmxAalXnV7C9oRfd95mjPUPWSlNnZPZVpW zhdK2Pk+oQjoEuGyGYqdDVZHbjVSscYX5qgAxX7kYJEfiR/sriTVXEqLe17XGvZSllqrmPfHG sW5mD6bqxtuH/eOJS+oy8HmiIMjDkfQ/pj8IA65+0LoCBtIr5BolhwKSB5AQGFGGHxO/LmK9o uSYbYJuGeabU1PIYtKfnE3hZWuMyZhkpz9JZsvjAVnuTJ+QELvYonSfBoWu062JVyYDVGu9lF bchkJ8ggQnhQXaozkBTW0QLWUwEaxL5VmSPqUYGP0Wq65alFwqKvcVbd2yTDobgDYJyVGPxb2 vI/IvM1ynwVywqQmkZ4dKh53wQ58LwHGLxtgGl1ODaRXPHEX7PJYTS5UWNVxCCXTYZ3dch0IR CsqQPsemEOuuPP56BGQtNAnSsrfCcOaOVhmLSOfeO4Dz3gHgEFFOoFvNGdnHq9+jEke2eFoP6 gJRvDSjKmDfS/w1ygb/my+xdvObsQ== X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2021 19:08:17 -0000 Hi Tobias, > > However, an additional plain check on e->rank !=3D 0 also in the > > CLASS cases fixes the original issue as well as your example: > [=2E=2E=2E] > > And regtests ok=2E :-) > > See attached updated patch=2E >=20 > I think you still need to remove the 'return true;' from > the 'if (e->rank !=3D 0 && e->ts=2Etype =3D=3D BT_CLASS' block =E2=80=93= to > fall through to the e->rank check after the block=2E > (When 'return true;' is gone, the '{' and '}' can also be removed=2E) >=20 > Reason: Assume 'CLASS(=2E=2E=2E) x'=2E In this case, 'x' is a scalar=2E > And even after calling gfc_add_class_array_ref it remains > a scalar and e->rank =3D=3D 0=2E >=20 > Or in other words: I think with your current patch, > class(u) :: z > f =3D size (z) > is wrongly accepted without an error=2E did you really check that? My related testing succeeded without and with the return (which was in the original commit by Paul)=2E I have nevertheless followed your advice to remove the return statement, extended the testcase and regtested again=2E Committed as https://gcc=2Egnu=2Eorg/g:e314cfc371d8b2405a1d81e51b90f9fb24b= 9061f Thanks, Harald