This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.

If the compiler evaluates the whole value, val==16, then GDB will print
something different than what the compiler evaluates.


Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]