From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id 9143B3885C3E for ; Wed, 11 Mar 2020 10:24:04 +0000 (GMT) Received: by mail-wr1-x431.google.com with SMTP id a25so1870794wrd.0 for ; Wed, 11 Mar 2020 03:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2jigFogAFume3YKsA6b2g6nYRSTrkoALHuDVD7u/qFY=; b=bQPuIVUG4S2ssBPn/FLq9ZMnmkTQ5u4JC70wsCH7WNnAXv2ms08dQa57mpkqq/d0Yd nwmBpZkyMUa30iIQ6GYf/05Q9fftc56FSFdjVUzSKTIvKwZ7yQ5Xio/4bOfGx4VehcHi O55m39mfANK9tmt7bcxbSgjWJ5B+3+4TE6RXchMe5Qm0qKl4p1x4NiPiPeFkwNI8JvwL K6/EDM3wk9xCmBovCJzx+dqLu/ALKxjIJz6wSDPPsG1WEzlaxr+SPyYR9aijWMY/yuzH CxR3mbP1ir+0T7qEZGT/VBZuaxnXPwgkP7eS5zT3HEWu/Hhz9rmlsOVC/oXk0ToIg6s+ ChzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=2jigFogAFume3YKsA6b2g6nYRSTrkoALHuDVD7u/qFY=; b=doItGx1m0/+vdXf2IZXYOGb3SOJ2vZ5eS9JBmkq5nzeV+4Ew1/U46ZG0zEdlpluCxv 9hFttTdFc4jWYAA1iHliy32Erg5OlUAGIhLCzqaeFNWo60ytiwmcnS5MtKdrVwFXqwJ+ UJv7uvUW6FH+0A6gTkS8njwngxBL/RqA5511+tqAGVhAsEY52g3SbGPeC93XpL1opAtj mga1BOStDsI1zrJxNopwf+UF9GW2GLvHgP6D6tIVNIRN3HUpFZJOI09anmLFLjckKW9p SNcnzXAmZodnV0HTIeeKjLTGFtxZ0oJ7UYNKglaGVQg3E+hufGP1THYJVrD7zrktY5bO zU4Q== X-Gm-Message-State: ANhLgQ1Fxf7++2V2UgZvhE43vtawJmu5Eht6aXwVjQgkBFwZbK9AwuTh swbzkv1fuAgY8hPpgI2Ao7lWPftgUbI= X-Google-Smtp-Source: ADFU+vvauK1SbaLCw2tNoUwSo4Neltu8yrOJFQuEA0uEktXPP9zE5GoYlDNRRQDTcCxNc9ZjJCTIrA== X-Received: by 2002:adf:f48c:: with SMTP id l12mr3724864wro.244.1583922243657; Wed, 11 Mar 2020 03:24:03 -0700 (PDT) Received: from localhost (host86-180-62-221.range86-180.btcentralplus.com. [86.180.62.221]) by smtp.gmail.com with ESMTPSA id f15sm7760408wmj.25.2020.03.11.03.24.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Mar 2020 03:24:03 -0700 (PDT) Date: Wed, 11 Mar 2020 10:24:02 +0000 From: Andrew Burgess To: Tom de Vries Cc: "Sharma, Alok Kumar" , "gdb-patches@sourceware.org" Subject: Re: [gdb/testsuite] Fix missing uint8_t in gdb.fortran/logical.exp Message-ID: <20200311102402.GG3317@embecosm.com> References: <20200302182152.12819-1-andrew.burgess@embecosm.com> <20200303182143.GX3317@embecosm.com> <2f60fb40-80d1-b8ea-7f77-a49531de0eee@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2f60fb40-80d1-b8ea-7f77-a49531de0eee@suse.de> X-Operating-System: Linux/4.18.19-100.fc27.x86_64 (x86_64) X-Uptime: 10:20:25 up 25 days, 21:49, X-Fortune: Another good night not to sleep in a eucalyptus tree. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-Spam-Status: No, score=-27.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS 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: Wed, 11 Mar 2020 10:24:05 -0000 * Tom de Vries [2020-03-04 09:48:22 +0100]: > [ was: Re: [PATCHv2] gdb/fortran: Fix printing of logical true values > for Flang ] > > On 03-03-2020 19:21, Andrew Burgess wrote: > > * Sharma, Alok Kumar [2020-03-03 04:47:20 +0000]: > > > >> I strongly agree and accept your comment. Please let me know if > >> patch need to be updated by me? In case you have already > >> incorporated the comments, please push it. > > > > I pushed this change. > > I'm running into trouble with the test-case. Attached patch fixes that. > > OK for trunk? LGTM. Thanks for this fix. > > Thanks, > - Tom > [gdb/testsuite] Fix missing uint8_t in gdb.fortran/logical.exp > > With test-case gdb.fortran/logical.exp, I run into: > ... > (gdb) PASS: gdb.fortran/logical.exp: var=l: get hexadecimal valueof "&l" > set *((uint8_t *) 0x7fffffffd2bc) = 0xff^M > No symbol "uint8_t" in current context.^M > (gdb) FAIL: gdb.fortran/logical.exp: var=l: byte 0: set contents of byte at offset 0 > ... > > Fix this by using the fortran-native type character instead. > > Tested on x86_64-linux, with gcc 7.5.0 and clang 5.0.2. I dug into this because, as we discussed on IRC you are seeing failures with 7.5, while I am seeing passes with 7.4. For me I was getting the symbol from libgfortan. I wonder if it's possible that you're linking against an older version of libgfortran, even with a newer gcc? Either way, I think this fix should be merged, so feel free to go ahead. Thanks, Andrew > > gdb/testsuite/ChangeLog: > > 2020-03-04 Tom de Vries > > * gdb.fortran/logical.f90: Define variable with character type. > * gdb.fortran/logical.exp: Use character type instead of uint8_t. > > --- > gdb/testsuite/gdb.fortran/logical.exp | 2 +- > gdb/testsuite/gdb.fortran/logical.f90 | 2 ++ > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.fortran/logical.exp b/gdb/testsuite/gdb.fortran/logical.exp > index 96e6f8f955..324714fa49 100644 > --- a/gdb/testsuite/gdb.fortran/logical.exp > +++ b/gdb/testsuite/gdb.fortran/logical.exp > @@ -43,7 +43,7 @@ foreach_with_prefix var { l l1 l2 l4 l8 } { > > for { set i 0 } { $i < $len } { incr i } { > with_test_prefix "byte $i" { > - gdb_test_no_output "set *((uint8_t *) ${addr}) = 0xff" \ > + gdb_test_no_output "set *((character *) ${addr}) = 0xff" \ > "set contents of byte at offset $i" > gdb_test "p l" " = \\.TRUE\\." > incr addr > diff --git a/gdb/testsuite/gdb.fortran/logical.f90 b/gdb/testsuite/gdb.fortran/logical.f90 > index aea78e7089..175dfd1fc5 100644 > --- a/gdb/testsuite/gdb.fortran/logical.f90 > +++ b/gdb/testsuite/gdb.fortran/logical.f90 > @@ -21,10 +21,12 @@ program test > logical (kind=2) :: l2 > logical (kind=4) :: l4 > logical (kind=8) :: l8 > + character :: c > l = .TRUE. > l1 = .TRUE. > l2 = .TRUE. > l4 = .TRUE. > l8 = .TRUE. > l = .FALSE. ! stop-here > + c = 'a' > end