This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite] Fix gcc.target/i386/avx512f-vrndscaless-2.c on Solaris 9/x86
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 5 Feb 2014 17:19:00 +0100
- Subject: Re: [testsuite] Fix gcc.target/i386/avx512f-vrndscaless-2.c on Solaris 9/x86
- Authentication-results: sourceware.org; auth=none
- References: <ydda9e5sgn2 dot fsf at lokon dot CeBiTec dot Uni-Bielefeld dot DE> <CAFULd4Z+BYPWRStz2+TJqX4JZLJ3CRk4Abyzn4qyB07+Cy0OqQ at mail dot gmail dot com> <20140205161112 dot GE12671 at tucnak dot redhat dot com>
On Wed, Feb 5, 2014 at 5:11 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> > gcc.target/i386/avx512f-vrndscaless-2.c currently FAILs on Solaris 9/x86
>> > with gas:
>> >
>> > FAIL: gcc.target/i386/avx512f-vrndscaless-2.c (test for excess errors)
>> > Excess errors:
>> > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.
>> > c:21:14: warning: incompatible implicit declaration of built-in function 'floorf
>> > ' [enabled by default]
>> > /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.
>> > c:24:14: warning: incompatible implicit declaration of built-in function 'ceilf'
>> > [enabled by default]
>> >
>> > The platform lacks C99 support, but this can easily be avoided by using
>> > the builtins instead. The following patch does just that; tested
>> > with the appropriate runtest invocation on i386-pc-solaris2.9 and
>> > x86_64-unknown-linux-gnu.
>>
>> Let's solve this in the way sse4_1-floorf-vec.c solves it and simply add
>>
>> extern float floorf (float);
>
> Won't that break if math.h defines floorf as a macro?
> You'd at least need then
> extern float (floorf) (float);
Looks like using builtins should be the correct way, so the original
patch is OK.
Rainer, can you please add the same cure to sse4_1-floor*.vec tests?
Thanks,
Uros.