This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix math transformation on targets without c99 math functions
- From: Christophe Lyon <christophe dot lyon at linaro dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: John David Anglin <dave dot anglin at bell dot net>, Joseph Myers <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Jan 2016 14:16:31 +0100
- Subject: Re: [PATCH] Fix math transformation on targets without c99 math functions
- Authentication-results: sourceware.org; auth=none
- References: <DF2450C6-D371-4A2C-B679-9961E2021431 at bell dot net> <alpine dot DEB dot 2 dot 10 dot 1512302346060 dot 23923 at digraph dot polyomino dot org dot uk> <02962534-F59F-4084-AD8C-28F99A07938A at bell dot net> <20160109164856 dot GQ18720 at tucnak dot redhat dot com>
On 9 January 2016 at 17:48, Jakub Jelinek <jakub@redhat.com> wrote:
> On Thu, Dec 31, 2015 at 12:52:21PM -0500, John David Anglin wrote:
>> On 2015-12-30, at 6:46 PM, Joseph Myers wrote:
>>
>> > On Mon, 28 Dec 2015, John David Anglin wrote:
>> >
>> >> The attach change fixes PR middle-end/68743 on hppa*-*-hpux*. In compiling
>> >> c99_functions.c in libgfortran, floor ((double)x) was transformed to floorf(x) but
>> >> floorf is not available on hppa*-*-hpux*. The change simply adds a libc_has_function
>> >> check to prevent the transformation.
>> >
>> > These are real functions, not complex. I think you want to use
>> > function_c99_misc, not function_c99_complex.
>>
>>
>> The composition of the classes isn't documented, so I wasn't sure which functions where in
>> each class. Thought function_c99_math_complex might have been math and complex.
>>
>> In any case, we have no_c99_libc_has_function on hpux and everything on linux. So, I
>> don't think testing with function_c99_misc on hppa will show any difference.
>>
>> Okay with function_c99_misc?
>
> Ok (but please make sure to adjust ChangeLog too).
>
This patch made gcc.dg/torture/builtin-integral-1.c FAIL on
bare metal targets (e.g. arm-non-eabi, aarch64-none-elf,
using Newlib).
The logs show link errors:
/ccOMzAOC.o: In function `test':
builtin-integral-1.c:(.text+0x3c): undefined reference to `link_failure'
collect2: error: ld returned 1 exit status
Christophe
> Jakub