Commit 6eefb96d by Rafael Avila de Espindola Committed by Rafael Espindola

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
parent 0450a966
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
......
/* 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();
}
/* 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;
}
/* 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;
}
/* 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;
}
/* 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;
/* 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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment