teststuite - avoid parts of builtin-has-attribute tests requireing alias support.
2019-01-08 Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite/ * c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol alias support. * c-c++-common/builtin-has-attribute-4.c: Likewise. Append match for warning that ‘protected’ attribute is not supported. From-SVN: r267674
This commit is contained in:
parent
2e81e6e929
commit
e32ba3f7ab
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,10 @@
|
|||
2019-01-08 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
* c-c++-common/builtin-has-attribute-3.c: Skip tests requiring symbol
|
||||
alias support.
|
||||
* c-c++-common/builtin-has-attribute-4.c: Likewise.
|
||||
Append match for warning that ‘protected’ attribute is not supported.
|
||||
|
||||
2019-01-08 Iain Sandoe <iain@sandoe.co.uk>
|
||||
|
||||
* gcc.dg/Wmissing-attributes.c: Require alias support.
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/* Verify __builtin_has_attribute return value for functions.
|
||||
{ dg-do compile }
|
||||
{ dg-options "-Wall -ftrack-macro-expansion=0" }
|
||||
{ dg-options "-Wall -Wno-narrowing -Wno-unused-local-typedefs -ftrack-macro-expansion=0" { target c++ } } */
|
||||
{ dg-options "-Wall -Wno-narrowing -Wno-unused-local-typedefs -ftrack-macro-expansion=0" { target c++ } }
|
||||
{ dg-additional-options "-DSKIP_ALIAS" { target *-*-darwin* } }
|
||||
*/
|
||||
|
||||
#define ATTR(...) __attribute__ ((__VA_ARGS__))
|
||||
|
||||
|
@ -27,7 +29,9 @@ extern "C"
|
|||
#endif
|
||||
ATTR (noreturn) void fnoreturn (void) { __builtin_abort (); }
|
||||
|
||||
#ifndef SKIP_ALIAS
|
||||
ATTR (alias ("fnoreturn")) void falias (void);
|
||||
#endif
|
||||
|
||||
#define A(expect, sym, attr) \
|
||||
typedef int Assert [1 - 2 * !(__builtin_has_attribute (sym, attr) == expect)]
|
||||
|
@ -114,7 +118,7 @@ void test_alloc_size_malloc (void)
|
|||
A (1, fmalloc_size_3, malloc);
|
||||
}
|
||||
|
||||
|
||||
#ifndef SKIP_ALIAS
|
||||
void test_alias (void)
|
||||
{
|
||||
A (0, fnoreturn, alias);
|
||||
|
@ -123,7 +127,7 @@ void test_alias (void)
|
|||
A (0, falias, alias ("falias"));
|
||||
A (0, falias, alias ("fnone"));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void test_cold_hot (void)
|
||||
{
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
/* Verify __builtin_has_attribute return value for variables.
|
||||
{ dg-do compile }
|
||||
{ dg-options "-Wall -ftrack-macro-expansion=0" }
|
||||
{ dg-options "-Wall -Wno-narrowing -Wno-unused -ftrack-macro-expansion=0" { target c++ } } */
|
||||
{ dg-options "-Wall -Wno-narrowing -Wno-unused -ftrack-macro-expansion=0" { target c++ } }
|
||||
{ dg-additional-options "-DSKIP_ALIAS" { target *-*-darwin* } }
|
||||
*/
|
||||
|
||||
#define ATTR(...) __attribute__ ((__VA_ARGS__))
|
||||
|
||||
|
@ -45,6 +47,7 @@ void test_aligned (void)
|
|||
}
|
||||
|
||||
|
||||
#ifndef SKIP_ALIAS
|
||||
int vtarget;
|
||||
extern ATTR (alias ("vtarget")) int valias;
|
||||
|
||||
|
@ -55,7 +58,7 @@ void test_alias (void)
|
|||
A (1, valias, alias ("vtarget"));
|
||||
A (0, valias, alias ("vnone"));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void test_cleanup (void)
|
||||
{
|
||||
|
@ -280,6 +283,6 @@ void test_weak (void)
|
|||
|
||||
A (1, var_init_weak, weak);
|
||||
A (1, var_uninit_weak, weak);
|
||||
}
|
||||
} /* { dg-warning "protected visibility attribute not supported" "" { target { *-*-darwin* } } } */
|
||||
|
||||
/* { dg-prune-output "specifies less restrictive attribute" } */
|
||||
|
|
Loading…
Add table
Reference in a new issue