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: John David Anglin <dave dot anglin at bell dot net>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 11 Jan 2016 17:11:21 +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> <CAKdteOYSHF=fnZRyGOm8HMTOfFD8d7XJhUXE6ZFrwThjv6DeXg at mail dot gmail dot com> <20160111132413 dot GW18720 at tucnak dot redhat dot com> <5693D0AC dot 50307 at bell dot net>
On 11 January 2016 at 16:56, John David Anglin <dave.anglin@bell.net> wrote:
> On 2016-01-11 8:24 AM, Jakub Jelinek wrote:
>>
>> On Mon, Jan 11, 2016 at 02:16:31PM +0100, Christophe Lyon wrote:
>>>>>
>>>>> 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
>>
>> I'd say you want to either split that test into the double and float+long
>> double functions and limit the latter only to c99_runtime targets
>> (and add add_options_for_c99_runtime), or just guard the whole test
>> with c99_runtime and add_options_for_c99_runtime.
>
> Attached is untested patch implementing the latter option. I tend to think
> there's not
> much benefit in testing these tests on non c99 targets.
>
> Will test when current tests complete.
>
I tested a similar version on my side. It just makes the test become
UNSUPPORTED for arm/aarch64 + newlib. They used to pass, though.
I saw that Andre is looking at that from the Newlib pov, too.
Christophe.
>
> Dave
>
> --
> John David Anglin dave.anglin@bell.net
>