[PATCH] gdb.fortran: Allow Flang kind printing in fortran testing

Sharma, Alok Kumar AlokKumar.Sharma@amd.com
Tue Mar 3 05:31:00 GMT 2020


[AMD Official Use Only - Internal Distribution Only]

Hi Andrew,

Thanks for your comments.

    Earlier patch was incomplete and based on assumption that flang should be changed to dump a type with kind like the way gfortan does. Later it was realized that the way flang dumps this info is not incorrect but different. And instead of changing flang, changes in gdb test framework are finalized. So yes, earlier patch is incorrect and need to be changed to current one.

I have updated the patch with modified comment with this info. Please have a look.

Regards,
Alok

-----Original Message-----
From: Andrew Burgess <andrew.burgess@embecosm.com> 
Sent: Tuesday, March 3, 2020 12:14 AM
To: Sharma, Alok Kumar <AlokKumar.Sharma@amd.com>
Cc: gdb-patches@sourceware.org; George, Jini Susan <JiniSusan.George@amd.com>; Achra, Nitika <Nitika.Achra@amd.com>
Subject: Re: [PATCH] gdb.fortran: Allow Flang kind printing in fortran testing

[CAUTION: External Email]

* Sharma, Alok Kumar <AlokKumar.Sharma@amd.com> [2020-03-02 17:27:58 +0000]:

>
> diff --git a/gdb/testsuite/lib/fortran.exp 
> b/gdb/testsuite/lib/fortran.exp index 54f3293677..549ed65790 100644
> --- a/gdb/testsuite/lib/fortran.exp
> +++ b/gdb/testsuite/lib/fortran.exp
> @@ -32,9 +32,10 @@ proc set_lang_fortran {} {  proc fortran_int4 {} {
>      if {[test_compiler_info {gcc-4-[012]-*}]} {
>       return "int4"
> -    } elseif {[test_compiler_info {gcc-*}]
> -           || [test_compiler_info {clang-*}]} {
> +    } elseif {[test_compiler_info {gcc-*}]} {
>       return "integer\\(kind=4\\)"
> +    } elseif {[test_compiler_info {clang-*}]} {
> +     return "integer"

The clang-* line that is being removed was added by this commit:

  commit c3b149eb7697b376df1b3a47d0102afda389ee6d
  Author: Alok Kumar Sharma <alokkumar.sharma@amd.com>
  Date:   Tue Feb 4 17:17:20 2020 +0000

      gdb/fortran: Allow for using Flang in Fortran testing

So I wonder what the story is here?  Do different versions of Flang print the values differently? Should we be checking for specific Flang versions like we do with GCC, or was the first patch just wrong?
Which would be absolutely fine, it would just be nice if the commit message explained why this patch is changing something that was only committed a month ago.

Thanks,
Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb.fortran-Allow-Flang-kind-printing-in-fortran-tes.patch
Type: application/octet-stream
Size: 5269 bytes
Desc:  0001-gdb.fortran-Allow-Flang-kind-printing-in-fortran-tes.patch
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20200303/a809ffc0/attachment.obj>


More information about the Gdb-patches mailing list