public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Weinmann, Christoph T" <christoph.t.weinmann@intel.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: "qiyaoltc@gmail.com" <qiyaoltc@gmail.com>,
	"gdb-patches@sourceware.org"	<gdb-patches@sourceware.org>
Subject: RE: [PATCH] fortran: Print logical values as either .FALSE. or .TRUE.
Date: Wed, 13 Jul 2016 13:32:00 -0000	[thread overview]
Message-ID: <1E04C56C2A492B449743D653DD4A15BC3BC4E303@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20160713080321.GA22474@host1.jankratochvil.net>

> -----Original Message-----
> From: Jan Kratochvil [mailto:jan.kratochvil@redhat.com]
> Sent: Wednesday, July 13, 2016 10:03 AM
> To: Weinmann, Christoph T <christoph.t.weinmann@intel.com>
> Cc: qiyaoltc@gmail.com; gdb-patches@sourceware.org
> Subject: Re: [PATCH] fortran: Print logical values as either .FALSE. or .TRUE.
> 
> On Wed, 13 Jul 2016 09:56:36 +0200, Christoph Weinmann wrote:
> > A Logical value in Fortran may be either .FALSE. or .TRUE.
> > When converting from integer, a subset of compilers evaluate the whole
> > value, while others only check if the least significant bit is set.
> > This patch unifies the printing output by evaluating only the lsb.
> [...]
> > +	if ((val & 1) == 0)
> > +	  fputs_filtered (f_decorations.false_name, stream);
> > +	else
> > +	  fputs_filtered (f_decorations.true_name, stream);
> 
> Doesn't it need to check DW_AT_producer then?  GDB already does that in
> some cases.
>
Thanks for the hint Jan, I will take a look.

> If the compiler evaluates the whole value, val==16, then GDB will print
> something different than what the compiler evaluates.
>
I will investigate here too, as I confess I was focused on gfortran and ifort here.
 
> 
> Jan

Thanks,
Cchristoph
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

  reply	other threads:[~2016-07-13 13:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13  7:56 Christoph Weinmann
2016-07-13  8:03 ` Jan Kratochvil
2016-07-13 13:32   ` Weinmann, Christoph T [this message]
2016-07-13 13:54     ` Jan Kratochvil
2016-07-13 10:17 ` Andrew Burgess

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=1E04C56C2A492B449743D653DD4A15BC3BC4E303@IRSMSX102.ger.corp.intel.com \
    --to=christoph.t.weinmann@intel.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --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).