From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id cqbWFOWee2KcnwUAWB0awg (envelope-from ) for ; Wed, 11 May 2022 07:32:53 -0400 Received: by simark.ca (Postfix, from userid 112) id 4C9191E21F; Wed, 11 May 2022 07:32:53 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=OrdjaoDN; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C18011E01D for ; Wed, 11 May 2022 07:32:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 47023383E822 for ; Wed, 11 May 2022 11:32:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 47023383E822 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1652268772; bh=3K0OF92Of/X9FJVM90ECsIMaaWoD6dainDtxNmFI29o=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=OrdjaoDNYjHpEAsAaLDy6ipqkLeNkfICqFwUPmasfzy6uMbZ/UjMrj4urXa/Gbr6k N5LDhYOuthYrNvU2Rlz0eDQehzQk/h21jPr1ThyOnDB1twxAd8NYKsNcYx1Lc7D+Vp R4mDguJE1Kuj7RLvjMsqrJFwX2OrRyo9sF3jeMLg= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 9E2253858401 for ; Wed, 11 May 2022 11:32:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9E2253858401 Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-342-61oomafxOceFQIeVXv4xiA-1; Wed, 11 May 2022 07:32:31 -0400 X-MC-Unique: 61oomafxOceFQIeVXv4xiA-1 Received: by mail-wr1-f72.google.com with SMTP id m8-20020adfc588000000b0020c4edd8a57so731746wrg.10 for ; Wed, 11 May 2022 04:32:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=3K0OF92Of/X9FJVM90ECsIMaaWoD6dainDtxNmFI29o=; b=XuYBqOqFgOH8831yA6rqZUNNry8KQ7eJLWWm19B5Uo3zpWL9tXKQKTWJS+Q46nwDfV zVS6PsNPM/Ps0xXQqf6tvM9GFzi0Za/eOQ/dxMUwg19RP2Y/axj3DNJ2iU0c6G7hOUs1 c3wHF0Dbfesa+/UtKnwZ3dAOovKTd511gJLkhu15YgxUzObOwwmFnpi0j6eGePCfvqQp dFx5c+RY8HVArS2XaGC4dJOwCZDgSc/eMu9sn5Gfgy3Mj9Wt4LBE9Hy8wf7AQc/rwxGQ ld2VukJrQJc3qeNpa4xC+5YuDgbiBmlyGj6bZqcqGU/ouusIYVcDAO+P+51r5elXpSIq LWtQ== X-Gm-Message-State: AOAM530nZLT/2w41v/QDO0Y12exzmJSTpx6I9CFZS0MC/GszMJk77Lpo 5+yAp3h9wPCzXMTH5VpW6zBZQIn0psM6JB9IRy0L01qiyurW7v4pCs9nh6sDgN/4/krVz401sK+ ewGR0DbLWy/QXCKTFpO8wBw== X-Received: by 2002:a05:600c:1989:b0:394:8dc0:b57f with SMTP id t9-20020a05600c198900b003948dc0b57fmr4366122wmq.110.1652268749312; Wed, 11 May 2022 04:32:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwa9juXdkbRG3CVsrzwZlJ/OlagQY3t8oEqa4JmAm3xLbEzc9y9Bo6gC3QQrpUwbgHAI7+pgA== X-Received: by 2002:a05:600c:1989:b0:394:8dc0:b57f with SMTP id t9-20020a05600c198900b003948dc0b57fmr4366099wmq.110.1652268749036; Wed, 11 May 2022 04:32:29 -0700 (PDT) Received: from localhost (host81-136-113-48.range81-136.btcentralplus.com. [81.136.113.48]) by smtp.gmail.com with ESMTPSA id c131-20020a1c3589000000b003942a244eddsm1840497wma.34.2022.05.11.04.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 May 2022 04:32:28 -0700 (PDT) To: Nils-Christian Kempke , gdb-patches@sourceware.org Subject: Re: [PATCH 08/18] testsuite, fortran: make print-formatted.exp more robust In-Reply-To: <20220510142437.1397399-9-nils-christian.kempke@intel.com> References: <20220510142437.1397399-1-nils-christian.kempke@intel.com> <20220510142437.1397399-9-nils-christian.kempke@intel.com> Date: Wed, 11 May 2022 12:32:27 +0100 Message-ID: <875ymcl2yc.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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: , From: Andrew Burgess via Gdb-patches Reply-To: Andrew Burgess Cc: JiniSusan.George@amd.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Nils-Christian Kempke via Gdb-patches writes: > The test was written in a way that assumed, that going to main and > issuing a single next command would automatically end up after the > assign statement for ii. This was true for gfortran and ifort, but not > for ifx leading to a failed test. For ifx, GDB actually was at > the assign statment (not past it) and printing 'ii' there would lead to > GDB displaying it as 0 (instead of 10), failing the test. > > I changed this to become more robust and added a line past the > assignment with a comment, as is commonly done all over the testsuite. > > After this change the test passes for all, gfortran/ifort/ifx/flang. I have no problem with this change, the point of the test is clearly the print formatting rather than the behaviour of 'next'. That said, isn't the behaviour for ifx indicating a bug in the generated debug info? The program only has the single 'ii = 10' statement, so surely when we run to main, that's where we should stop? Then 'next' should move past that line? If you agree then it might be worth mentioning that this is working around the compiler bug. Thanks, Andrew > --- > gdb/testsuite/gdb.fortran/print-formatted.exp | 3 ++- > gdb/testsuite/gdb.fortran/print-formatted.f90 | 1 + > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.fortran/print-formatted.exp b/gdb/testsuite/gdb.fortran/print-formatted.exp > index eaeca1ede2..59b7148852 100644 > --- a/gdb/testsuite/gdb.fortran/print-formatted.exp > +++ b/gdb/testsuite/gdb.fortran/print-formatted.exp > @@ -29,7 +29,8 @@ if { ![fortran_runto_main] } { > return -1 > } > > -gdb_test "next" ".*" "go to the end of the program" > +gdb_breakpoint [gdb_get_line_number "End of program"] > +gdb_continue_to_breakpoint "End of program" ".*End of program.*" > > gdb_test "set output-radix 16" \ > "Output radix now set to decimal 16, hex 10, octal 20." \ > diff --git a/gdb/testsuite/gdb.fortran/print-formatted.f90 b/gdb/testsuite/gdb.fortran/print-formatted.f90 > index 63048032b1..f37fdafe97 100644 > --- a/gdb/testsuite/gdb.fortran/print-formatted.f90 > +++ b/gdb/testsuite/gdb.fortran/print-formatted.f90 > @@ -17,4 +17,5 @@ program printformatted > integer :: ii > > ii = 10 > + print *, ii ! End of program. > end program printformatted > -- > 2.25.1 > > Intel Deutschland GmbH > Registered Address: Am Campeon 10, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928