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.

Dave

--
John David Anglin  dave.ang...@bell.net

2016-01-11 John David Anglin  <dang...@gcc.gnu.org>

        * gcc.dg/torture/builtin-integral-1.c: Require c99_runtime.

Index: gcc.dg/torture/builtin-integral-1.c
===================================================================
--- gcc.dg/torture/builtin-integral-1.c (revision 232191)
+++ gcc.dg/torture/builtin-integral-1.c (working copy)
@@ -10,6 +10,8 @@
    that various math functions are marked const/pure and can be
    folded.  */
 /* { dg-options "-ffinite-math-only -fno-math-errno" } */
+/* { dg-add-options c99_runtime } */
+/* { dg-require-effective-target c99_runtime } */
 /* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
 
 extern int link_failure (int);

Reply via email to