From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sonic309-24.consmr.mail.ir2.yahoo.com (sonic309-24.consmr.mail.ir2.yahoo.com [77.238.179.82]) by sourceware.org (Postfix) with ESMTPS id 743A23938C38 for ; Fri, 1 May 2020 13:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 743A23938C38 X-YMail-OSG: QCwhEqMVM1lYbFpi7uOkmDCPZscM8JxJ85jhpWi4F6LqlEeMMYFMAo_ZA1X3SPh r9a1Oc5hvgsGly7WBxJdeMrsE0yAGsZ81x2xFSnbOLPK9u95WJJB3TRQ5KnwZFqJnSG.MOxmFIbg Qb0nUEC44afBIMDS.DPfXpSQuT3XPd_sqd12mRJp92mphSPUFkpCiOzsshI8W2Xzfc.pud6JfZ3V pKR7U7y4Jcb8Z0nwLHwfz0c1I9TdCw0j0_4SwPRbg.wKsDCfHR6SYZm6KyUVQg6_VlVzxpq9shj7 rU9guyf5zdmVMN5Zxf8.xwiJ2VVih9q_FgH2jk2_a2TL41P1qWU9vTLc9CEY3NNKX6an_aUjtNi4 VOjIcn1n_1t9Me5zqSw7m8T8IYPE50RBVc1DA.0b_cdwUXfxT01yozzGgOD1GK57Vbus0pJy0no2 OfK0nef0Im27ktMXK3Bk5rOMYAPtR2IQGBV0df2HhUG_0mvha9T8UEZpvo_uhOGpFVoWpOHTFbFJ JJrNMPnuibgWEI0ZLlpTFMWDwJ5Z8mdgZkUxcLArM434uBkA.UJi5sC8cseqEoilnT1ukS0TxsxV l5rRMMeNUjdnannmkQeWwNbCHSlOLKc7dbupManALhp2Ypxa1qUWgl6gnfypaFXD4zCalWEP1Jwi vWsT5IzLI4qkxpPqMbdP9gJggFS3Y4gRfK7QYDcZ4niZUPmGPd1xN9uIbbBAv3QRMP66LrZ6fOsG TM9.Cm70I9b_mNeGDKqaJtdtJla6sCQr7EW8jbbMVmPl8QUlhR8Fua6a8itZVqJQVLYM0HSOHtwa 04RDXj0mZ3o49hqwIOKiiAIGZ59WyHuCv53SPXEOCav.ESAqhmuP7VNbR9aOeVC2NNtd7i45A1PF gAZZ3Rqq_DFVpllDf_4FAVkdG5GdqKlILpEkB0IoMrMfI6Gql9CoaRqouUUo3uHArtgxak9MZtm2 C2BWXAAupkZMmw8WbMHisNeOSHiTZ80F7pVtUNDQO1e0U5rBQ5wVUGFTO6ns70SnK3kQVKpCEXVm yIzNvquJYpKVsXJEh9YewJ_4zZjettpTE6sOdaFyQ6W34ikB3.AaaZIushdBzC09rnv6aqA1xTJv OF_ml9BBmwirbqmtsuheLHRaK72L9iXfRIBmkGuvKdUiMTibg6X2JSr7JiJB34mutebRPTy.jeus wu8HYxR4AIK9mNVhMEH3u9eM5kLb1umb8Du6ThyjuwM6VkpIvcmbSayfrRD_loj0D6dXLqaqG4Fs KIFynhjfWI2d1LP84XfWvH1.xKNkN_VNkpfo0PC5oO81iS3IPKk84FssY7aZ0CZeQujI2bVvoIj5 uk__FGjOxSKlUvPr2Xa7M Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.ir2.yahoo.com with HTTP; Fri, 1 May 2020 13:46:14 +0000 Date: Fri, 1 May 2020 13:46:11 +0000 (UTC) From: Hannes Domani To: Gdb-patches Message-ID: <1114253616.574993.1588340771580@mail.yahoo.com> In-Reply-To: <20200501131136.GN3522@embecosm.com> References: <20200501123518.5907-1-ssbssa.ref@yahoo.de> <20200501123518.5907-1-ssbssa@yahoo.de> <20200501131136.GN3522@embecosm.com> Subject: Re: [PATCH] Fix size recalculation of fortran arrays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailer: WebService/1.1.15820 YMailNorrin Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:71.0) Gecko/20100101 Firefox/71.0 X-Spam-Status: No, score=-18.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 13:46:19 -0000 Am Freitag, 1. Mai 2020, 15:11:40 MESZ hat Andrew Burgess Folgendes geschrieben: > * Hannes Domani via Gdb-patches [2020-05-01 = 14:35:18 +0200]: > > > My recent change regarding size calculation of arrays of stubbed types > > didn't take array strides and associated/allocated type properties into > > account, which basically broke fortran arrays. > > > > Fixed by refactoring the array size calculation of > > create_array_type_with_stride into a new function, and also use it for > > the stubbed array size recalculation. > > > > gdb/ChangeLog: > > > > 2020-05-01=C2=A0 Hannes Domani=C2=A0 > > > >=C2=A0=C2=A0=C2=A0=C2=A0 * gdbtypes.c (calculate_static_array_size): New= function. > >=C2=A0=C2=A0=C2=A0=C2=A0 (create_array_type_with_stride): Use calculate_= static_array_size. > >=C2=A0=C2=A0=C2=A0=C2=A0 (check_typedef): Likewise. > > --- > >=C2=A0 gdb/gdbtypes.c | 130 ++++++++++++++++++++++++++------------------= ----- > >=C2=A0 1 file changed, 68 insertions(+), 62 deletions(-) > > > > diff --git a/gdb/gdbtypes.c b/gdb/gdbtypes.c > > index 6648dc4d67..ad5c7ee0af 100644 > > --- a/gdb/gdbtypes.c > > +++ b/gdb/gdbtypes.c > > @@ -1177,6 +1177,62 @@ discrete_position (struct type *type, LONGEST va= l, LONGEST *pos) > >=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 } > >=C2=A0 } > > > > +/* If the array has static bounds, calculate its size.=C2=A0 */ > > + > > +static bool > > +calculate_static_array_size (struct type *type) > > Could you rename this to something like update_static_array_size - > calculate to me implies something will be calculated and returned. > Also please update the header comment to reference TYPE, and describe > the return values, something like: > >=C2=A0=C2=A0 /* If the array TYPE has static bounds calculate and update i= ts >=C2=A0=C2=A0=C2=A0=C2=A0 size, then return true.=C2=A0 Otherwise return fa= lse and leave TYPE >=C2=A0=C2=A0=C2=A0=C2=A0 unchanged.=C2=A0 */ > > With those changes this looks good. Pushed with those changes, thanks. > Thanks for the quick fix. I'm very sorry for the breakage, but running the testsuite on Windows can be very frustrating at times. Maybe I'm doing something wrong, but each test only has ~66% chance of even staring correctly. Hannes