Skip to content
Snippets Groups Projects
Commit 3cd383fd authored by Alexander Ivchenko's avatar Alexander Ivchenko Committed by Kirill Yukhin
Browse files

target-supports.exp (error_h): New check.

gcc/testsuite/
	* lib/target-supports.exp (error_h): New check.
	(libc_has_complex_functions): Ditto.
	(tgmath_h): Ditto.
	* gcc.dg/builtins-59.c: Add libc_has_complex_functions check.
	* gcc.dg/builtins-61.c: Likewise.
	* gcc.dg/builtins-67.c: Disable test for Bionic.
	* gcc.dg/strlenopt-14g.c: Likewise.
	* gcc.dg/strlenopt-14gf.c: Likewise.
	* gcc.dg/c99-tgmath-1.c: Add tgmath_h check.
	* gcc.dg/c99-tgmath-2.c: Likewise.
	* gcc.dg/c99-tgmath-3.c: Likewise.
	* gcc.dg/c99-tgmath-4.c: Likewise.
	* gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check.

From-SVN: r217467
parent 96994de0
No related branches found
No related tags found
No related merge requests found
2014-11-12 Alexander Ivchenko <alexander.ivchenko@intel.com>
* lib/target-supports.exp (error_h): New check.
(libc_has_complex_functions): Ditto.
(tgmath_h): Ditto.
* gcc.dg/builtins-59.c: Add libc_has_complex_functions check.
* gcc.dg/builtins-61.c: Likewise.
* gcc.dg/builtins-67.c: Disable test for Bionic.
* gcc.dg/strlenopt-14g.c: Likewise.
* gcc.dg/strlenopt-14gf.c: Likewise.
* gcc.dg/c99-tgmath-1.c: Add tgmath_h check.
* gcc.dg/c99-tgmath-2.c: Likewise.
* gcc.dg/c99-tgmath-3.c: Likewise.
* gcc.dg/c99-tgmath-4.c: Likewise.
* gcc.dg/dfp/convert-dfp-round-thread.c: Add error_h check.
2014-11-12 Jakub Jelinek <jakub@redhat.com> 2014-11-12 Jakub Jelinek <jakub@redhat.com>
   
PR ipa/63838 PR ipa/63838
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-fdump-tree-gimple" } */ /* { dg-options "-fdump-tree-gimple" } */
/* { dg-require-effective-target c99_runtime } */ /* { dg-require-effective-target c99_runtime } */
/* { dg-require-effective-target libc_has_complex_functions } */
double test (double x) double test (double x)
{ {
......
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-options "-O -ffast-math -fdump-tree-optimized" } */ /* { dg-options "-O -ffast-math -fdump-tree-optimized" } */
/* { dg-require-effective-target c99_runtime } */ /* { dg-require-effective-target c99_runtime } */
/* { dg-require-effective-target libc_has_complex_functions } */
double test1 (double x) double test1 (double x)
{ {
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
/* { dg-do link } */ /* { dg-do link } */
/* { dg-options "-ffast-math -lm" } */ /* { dg-options "-ffast-math -lm" } */
/* { dg-add-options c99_runtime } */ /* { dg-add-options c99_runtime } */
/* Bionic doesn't have rintl */
/* { dg-require-effective-target non_bionic } */
#include "builtins-config.h" #include "builtins-config.h"
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-do preprocess { target c99_runtime } } */ /* { dg-do preprocess { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */ /* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */ /* { dg-add-options c99_runtime } */
/* { dg-require-effective-target tgmath_h } */
/* Test that tgmath defines the macros it's supposed to. */ /* Test that tgmath defines the macros it's supposed to. */
#include <tgmath.h> #include <tgmath.h>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-do compile { target c99_runtime } } */ /* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */ /* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */ /* { dg-add-options c99_runtime } */
/* { dg-require-effective-target tgmath_h } */
/* Test that invoking type-generic sin on a float invokes sinf. */ /* Test that invoking type-generic sin on a float invokes sinf. */
#include <tgmath.h> #include <tgmath.h>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-do compile { target c99_runtime } } */ /* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */ /* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */ /* { dg-add-options c99_runtime } */
/* { dg-require-effective-target tgmath_h } */
/* Test that invoking type-generic exp on a complex invokes cexp. */ /* Test that invoking type-generic exp on a complex invokes cexp. */
#include <tgmath.h> #include <tgmath.h>
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
/* { dg-do compile { target c99_runtime } } */ /* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */ /* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */ /* { dg-add-options c99_runtime } */
/* { dg-require-effective-target tgmath_h } */
/* Test that invoking type-generic pow on complex float invokes cpowf. */ /* Test that invoking type-generic pow on complex float invokes cpowf. */
#include <tgmath.h> #include <tgmath.h>
......
/* { dg-options "-std=gnu99 -D_GNU_SOURCE -pthread" } */ /* { dg-options "-std=gnu99 -D_GNU_SOURCE -pthread" } */
/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */ /* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* { dg-require-effective-target error_h } */
/* N1150 5.2: Conversions among decimal floating types and between /* N1150 5.2: Conversions among decimal floating types and between
decimal floating types and generic floating types. decimal floating types and generic floating types.
......
/* This test needs runtime that provides stpcpy and mempcpy functions. */ /* This test needs runtime that provides stpcpy and mempcpy functions. */
/* { dg-do run { target *-*-linux* *-*-gnu* } } */ /* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */ /* { dg-options "-O2 -fdump-tree-strlen" } */
/* Bionic targets don't have mempcpy */
/* { dg-require-effective-target non_bionic } */
#define USE_GNU #define USE_GNU
#include "strlenopt.h" #include "strlenopt.h"
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
functions. */ functions. */
/* { dg-do run { target *-*-linux* *-*-gnu* } } */ /* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */ /* { dg-options "-O2 -fdump-tree-strlen" } */
/* Bionic targets don't have mempcpy */
/* { dg-require-effective-target non_bionic } */
#define FORTIFY_SOURCE 2 #define FORTIFY_SOURCE 2
#include "strlenopt-14g.c" #include "strlenopt-14g.c"
......
...@@ -5124,6 +5124,30 @@ proc check_effective_target_non_bionic {} { ...@@ -5124,6 +5124,30 @@ proc check_effective_target_non_bionic {} {
}] }]
} }
# Return true if this target has error.h header.
proc check_effective_target_error_h {} {
return [check_no_compiler_messages error_h object {
#include <error.h>
}]
}
# Return true if this target has tgmath.h header.
proc check_effective_target_tgmath_h {} {
return [check_no_compiler_messages tgmath_h object {
#include <tgmath.h>
}]
}
# Return true if target's libc supports complex functions.
proc check_effective_target_libc_has_complex_functions {} {
return [check_no_compiler_messages libc_has_complex_functions object {
#include <complex.h>
}]
}
# Return 1 if # Return 1 if
# (a) an error of a few ULP is expected in string to floating-point # (a) an error of a few ULP is expected in string to floating-point
# conversion functions; and # conversion functions; and
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment