visibility-14.c: New test.
2008-08-14 Rafael Avila de Espindola <espindola@google.com> * gcc.dg/visibility-14.c: New test. * gcc.dg/visibility-15.c: New test. * gcc.dg/visibility-16.c: New test. * gcc.dg/visibility-17.c: New test. * gcc.dg/visibility-18.c: New test. * gcc.dg/visibility-19.c: New test. From-SVN: r139100
This commit is contained in:
parent
0450a9665e
commit
6eefb96d46
7 changed files with 62 additions and 0 deletions
|
@ -1,3 +1,12 @@
|
|||
2008-08-14 Rafael Avila de Espindola <espindola@google.com>
|
||||
|
||||
* gcc.dg/visibility-14.c: New test.
|
||||
* gcc.dg/visibility-15.c: New test.
|
||||
* gcc.dg/visibility-16.c: New test.
|
||||
* gcc.dg/visibility-17.c: New test.
|
||||
* gcc.dg/visibility-18.c: New test.
|
||||
* gcc.dg/visibility-19.c: New test.
|
||||
|
||||
2008-08-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/34600
|
||||
|
|
9
gcc/testsuite/gcc.dg/visibility-14.c
Normal file
9
gcc/testsuite/gcc.dg/visibility-14.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* Test that called external functions are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern void foo(void) __attribute__ ((visibility ("hidden")));
|
||||
int f () {
|
||||
foo();
|
||||
}
|
11
gcc/testsuite/gcc.dg/visibility-15.c
Normal file
11
gcc/testsuite/gcc.dg/visibility-15.c
Normal file
|
@ -0,0 +1,11 @@
|
|||
/* Test that accessed external functions are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern void foo(void) __attribute__ ((visibility ("hidden")));
|
||||
typedef void (*foo_t)(void);
|
||||
|
||||
foo_t g(void) {
|
||||
return foo;
|
||||
}
|
9
gcc/testsuite/gcc.dg/visibility-16.c
Normal file
9
gcc/testsuite/gcc.dg/visibility-16.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* Test that accessed external variables are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern int foo __attribute__ ((visibility ("hidden")));
|
||||
int f () {
|
||||
return foo;
|
||||
}
|
9
gcc/testsuite/gcc.dg/visibility-17.c
Normal file
9
gcc/testsuite/gcc.dg/visibility-17.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/* Test that external variable whose address is taken are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern int foo __attribute__ ((visibility ("hidden")));
|
||||
int *f () {
|
||||
return &foo;
|
||||
}
|
7
gcc/testsuite/gcc.dg/visibility-18.c
Normal file
7
gcc/testsuite/gcc.dg/visibility-18.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* Test that external variable whose address is taken are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern int foo __attribute__ ((visibility ("hidden")));
|
||||
int *test = &foo;
|
8
gcc/testsuite/gcc.dg/visibility-19.c
Normal file
8
gcc/testsuite/gcc.dg/visibility-19.c
Normal file
|
@ -0,0 +1,8 @@
|
|||
/* Test that accessed external functions are marked. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-require-visibility "" } */
|
||||
/* { dg-final { scan-hidden "foo" } } */
|
||||
|
||||
extern void foo(void) __attribute__ ((visibility ("hidden")));
|
||||
typedef void (*foo_t)(void);
|
||||
foo_t test = foo;
|
Loading…
Add table
Reference in a new issue