This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Split gcc.dg/builtins-20.c


I would split it up even further moving out *l of the *f tests.
Then I would xfails on non linux, not just execute it only on linux.

Thanks,
Andrew Pinski


On Friday, Jun 13, 2003, at 23:17 US/Eastern, Roger Sayle wrote:



My recent test case builtins-20.c is currently failing on sh-elf and presumably several other non-linux platforms (thanks to Joern Rennecke for bringing this to my attention). The problem is that this optimization/test case attempt to synthesize the use of a C99 function that isn't guaranteed to be available on all platforms.

So although "sin(x)/cos(x) != tan(x)" should work everywhere, the
optimizer will only convert "sinf(x)/cosf(x)" into tanf(x) on platforms
where it is known this function will be present.  So this testcase
has been failing on those platforms where GCC can't guarantee a c99
library.

The following patch splits the original testcase gcc.dg/builtins-20.c
into two parts.  One test program for double functions that only
requires c90 functionality remains in builtins-20.c, and a second
test program builtins-22.c that contains the float and long double
tests, which is only executed on *-*-linux*.


[In practice, the test2f and test2l optimizations will be applied everywhere, but the split below is much cleaner conceptually.]

Ok for mainline?


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