* RE: __java_double expressions promote to float
@ 2002-04-09 18:13 Boehm, Hans
0 siblings, 0 replies; only message in thread
From: Boehm, Hans @ 2002-04-09 18:13 UTC (permalink / raw)
To: 'Andrew Haley'
Cc: 'java@gcc.gnu.org', Boehm, Hans, 'tromey@redhat.com'
Thanks. Gij appears to run Scimark correctly on IA64 with this patch.
Hans
> -----Original Message-----
> From: Andrew Haley [mailto:aph@cambridge.redhat.com]
> Sent: Tuesday, April 09, 2002 10:51 AM
> To: gcc-patches@gcc.gnu.org
> Cc: 'java@gcc.gnu.org'; Boehm, Hans
> Subject: C++: __java_double expressions promote to float
>
>
> TYPE_MAIN_VARIANT for __java_double is __java_double.
> type_after_usual_arithmetic_conversions() doesn't know anything about
> that type, so it converts to float. Therefore, expressions whose
> operands are all of type __java_double are of type float. I think
> that's wrong...
>
> Andrew.
>
> 2002-04-09 Andrew Haley <aph@cambridge.redhat.com>
>
> * typeck.c (type_after_usual_arithmetic_conversions):
> __java_double expressions promote to __java_double, not float.
>
> Index: typeck.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/cp/typeck.c,v
> retrieving revision 1.393
> diff -c -2 -p -r1.393 typeck.c
> *** typeck.c 22 Mar 2002 22:03:04 -0000 1.393
> --- typeck.c 9 Apr 2002 17:46:18 -0000
> *************** type_after_usual_arithmetic_conversions
> *** 443,446 ****
> --- 443,450 ----
> return build_type_attribute_variant (double_type_node,
> attributes);
> + if (same_type_p (TYPE_MAIN_VARIANT (t1),
> java_double_type_node)
> + || same_type_p (TYPE_MAIN_VARIANT (t2),
> java_double_type_node))
> + return build_type_attribute_variant (java_double_type_node,
> + attributes);
> else
> return build_type_attribute_variant (float_type_node,
>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-10 1:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-09 18:13 __java_double expressions promote to float Boehm, Hans
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).