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 190273858D34; Sun, 12 Sep 2021 18:31:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 190273858D34 X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [79.232.156.230] ([79.232.156.230]) by web-mail.gmx.net (3c-app-gmx-bs61.server.lan [172.19.170.145]) (via HTTP); Sun, 12 Sep 2021 20:31:41 +0200 MIME-Version: 1.0 Message-ID: From: Harald Anlauf To: Harald Anlauf Cc: fortran , gcc-patches Subject: *PING* [PATCH] PR fortran/82314 - ICE in gfc_conv_expr_descriptor, at fortran/trans-array.c:6972 Content-Type: text/plain; charset=UTF-8 Date: Sun, 12 Sep 2021 20:31:41 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:3vyfBGqt+Sc8HYCMiIy2AqgOMH/fVwzyElicZ4G5CupLoHhCBtWoStS8VoTDYt5hesh9w 85dPAHpE0vWumdPA40OnVW54867FSH5oIYm7ogYCdVchc/oSG3uxEvfnAsI1xvJ8b/SUhc/9lVxk iYGjrGENwUMYiRhNPIJ71neatt89fl0sY3l1smpCBoB9L+v1KWgRXKuGCOjGeYrMppf+r9TTUuGe W0bMY2vlsmBeOphpo8o+p+sgFXTwEPqlXbOzk8/nTsqgPtYdAM/P0RrJAYLh33FjRuKuq5a/15PK ck= X-UI-Out-Filterresults: notjunk:1;V03:K0:t2UX20WN5xQ=:lDILvLXDzfME9DLSC4HGhV L+U7gFD7bOsnkk6sew0yUMH0/pfXz4JxOmkn2uRlsIc7tUBm9GUd2S6GuT6NU6CugOBQ5pe8C 9tcweCXTf36Zy7PUtUv6tZpT7li2aQTAFI3o/fTgAymxlzXBJ4Ed9paIV0SEwAD3CXunnqbz+ 6J80t8p+C4VCoY0FNn4VK8HS1lQKfQxmgL576qVT+r6ybYarRxaFDLxVLkEU0AsW+dp/ZvYQv U2/axwUoQOOnQLl2ht3SXcsTwphdsZ5jzf5e3r5xauxe+JiGCoPGDAI+kBR52vq+ibqKawgmb 43a41v+gYqV6wfWzATfYHS0Tc6R50chYV4NpmsDEBY/OWkliddLBWi22S8+W6O0xtyYxltIn0 j+3pOK9qLWl92Vl8TvvJ+ozKLrjKusbDueo24AP9a94b1FVVHnw2rDZmsEdlJCsGt1lSrt5xm q/MJh1Rv9GU7TXBLLlHtbuj1SQp76omv8iTv9FzYEVBufUHr4nGhJVv+JoySXPD1YI0WuoY6I YYtbURnx5RqpbBZkNlYEIohrgek8bt7ngT7aJo1/JnuFqjhu5UjQ1IfajgQXYxllOcL/EavB5 RW+mNMM2GuQHDl+Hk4lGbj4f4qWlB2VvCpSyPbZtwKtQJvtYLhWTSvwMFzrlFAM1rUo0H5ehK bHH5RMRZmwrY4RFCToiFeu/kVvUvPp/T7QggBecFCiw6bYW265kWammO5gl7QMz/9e/RbtUtZ BN1vvvg8wCZVkS99pFGtbKfuhdzzT5YN8yQbm1W2vcNC1pPuFQrnlvUruPf5Rib2tX76Hp/ha 35BTYQ9 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, KAM_NUMSUBJECT, RCVD_IN_BARRACUDACENTRAL, 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: Sun, 12 Sep 2021 18:31:44 -0000 Early *PING*. > Gesendet: Dienstag, 07. September 2021 um 23:44 Uhr > Von: "Harald Anlauf" > An: "fortran" , "gcc-patches" > Betreff: [PATCH] PR fortran/82314 - ICE in gfc_conv_expr_descriptor, at = fortran/trans-array.c:6972 > > When adding the initializer for an array, we need to make sure that > array bounds are properly simplified if that array is a PARAMETER. > Otherwise the generated initializer could be wrong and screw up > subsequent simplifications, see PR. > > The minimal solution is to attempt simplification of array bounds > before adding the initializer as in the attached patch. (We could > place that part in a helper function if this functionality is > considered useful elsewhere). > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > > > Fortran - ensure simplification of bounds of array-valued named constant= s > > gcc/fortran/ChangeLog: > > PR fortran/82314 > * decl.c (add_init_expr_to_sym): For proper initialization of > array-valued named constants the array bounds need to be > simplified before adding the initializer. > > gcc/testsuite/ChangeLog: > > PR fortran/82314 > * gfortran.dg/pr82314.f90: New test. > >