This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Add some more builtins opts for sqrt/cbrt
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: dave at hiauly1 dot hia dot nrc dot ca, gcc-patches at gcc dot gnu dot org, jh at suse dot cz
- Date: Wed, 7 Apr 2004 12:17:37 -0400 (EDT)
- Subject: Re: [PATCH]: Add some more builtins opts for sqrt/cbrt
- References: <200404071456.i37Eu8iY002799@hiauly1.hia.nrc.ca>
> From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
>
> The following tests are failing under hppa-unknown-linux-gnu:
>
> FAIL: gcc.dg/torture/builtin-power-1.c -O0 (test for excess errors)
> FAIL: gcc.dg/torture/builtin-power-1.c -O1 (test for excess errors)
> FAIL: gcc.dg/torture/builtin-power-1.c -O2 (test for excess errors)
> FAIL: gcc.dg/torture/builtin-power-1.c -O3 -fomit-frame-pointer (test for exce
> ss errors)
> FAIL: gcc.dg/torture/builtin-power-1.c -O3 -g (test for excess errors)
> FAIL: gcc.dg/torture/builtin-power-1.c -Os (test for excess errors)
>
> On hppa-linux, DOUBLE_TYPE_SIZE and LONG_DOUBLE_TYPE_SIZE are currently
> the same size (as defined in defaults.h). It has C99 functions.
>
> I removed the long double tests from builtin-power-1.c and the tests
> then pass. I think this points to a problem with the builtins when two
> types (double and long double) have the same size.
Yes, I know about this one. See
http://gcc.gnu.org/ml/gcc-patches/2004-03/msg02216.html
The discussion died off waiting for an explanation from Jan about
mathfn_built_in.
This failure is harmless from a code correctness standpoint. It's
simply that when sizeof double and long double are are equal the
testcase doesn't reliably predict the transformed result.
Fixing this can either occur by the patch I submitted in the above
thread, or by changing mathfn_built_in to give predictable results no
matter what the relative sizes of the FP types are.
--Kaveh
--
Kaveh R. Ghazi ghazi@caip.rutgers.edu