From: "Heckel, Bernhard" <bernhard.heckel@intel.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org, brobecker@adacore.com
Subject: Re: [PATCH V2 2/2] fortran: Testsuite, fix different type naming across compilers.
Date: Mon, 18 Apr 2016 07:15:00 -0000 [thread overview]
Message-ID: <57148996.3000107@intel.com> (raw)
In-Reply-To: <86oa9bkk8m.fsf@gmail.com>
On 15/04/2016 16:41, Yao Qi wrote:
> Bernhard Heckel <bernhard.heckel@intel.com> writes:
>
>> -# Depending on the compiler version being used, the name of the 4-byte integer
>> -# and real types can be printed differently. For instance, gfortran-4.1 uses
>> -# "int4" whereas gfortran-4.3 uses "int(kind=4)".
>> -set int4 "(int4|integer\\(kind=4\\))"
>> -set real4 "(real4|real\\(kind=4\\))"
>> -
>> -gdb_test "ptype p" "type = Type bar\r\n *${int4} :: c\r\n *${real4} :: d\r\n *End Type bar"
>> +gdb_test "ptype p" "type = Type bar\r\n *$int :: c\r\n *$real :: d\r\n *End Type bar"
>
>> +
>> +proc fortran_int4 {} {
>> + if {[test_compiler_info {gcc-4-[012]-*}]} {
>> + return "int4"
>> + } elseif {[test_compiler_info {gcc-*}]} {
>> + return "integer\\(kind=4\\)"
>> + } elseif {[test_compiler_info {icc-*}]} {
>> + return "INTEGER\\(4\\)"
>> + } else {
>> + return "unknown"
>> + }
>> +}
>> +
>> +
>> +if ![info exists int4] then {
>> + set int4 [fortran_int4]
>> +}
> Why do you prefer to define these info? In each test, we can do
>
> set int4 [fortran_int4],
>
> IMO, that is much cleaner than your current approach (define int4
> globally in lib/fortran.exp and use it everywhere).
>
I wanted to avoid copy in the same code in several testcases but when I
look again, it's
better to get rid of the globals here.
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928
prev parent reply other threads:[~2016-04-18 7:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-15 12:46 [PATCH V2 0/2] " Bernhard Heckel
2016-04-15 12:47 ` [PATCH V2 1/2] testsuite: Support detection of Intel compilers via test_compiler_version Bernhard Heckel
2016-04-15 15:00 ` Yao Qi
2016-04-18 6:26 ` Heckel, Bernhard
2016-04-18 9:29 ` Yao Qi
2016-04-15 12:47 ` [PATCH V2 2/2] fortran: Testsuite, fix different type naming across compilers Bernhard Heckel
2016-04-15 14:41 ` Yao Qi
2016-04-18 7:15 ` Heckel, Bernhard [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=57148996.3000107@intel.com \
--to=bernhard.heckel@intel.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).