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:
Rafael Avila de Espindola 2008-08-14 16:05:36 +00:00 committed by Rafael Espindola
parent 0450a9665e
commit 6eefb96d46
7 changed files with 62 additions and 0 deletions

View file

@ -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

View 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();
}

View 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;
}

View 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;
}

View 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;
}

View 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;

View 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;