aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-elfvsb
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-06-18 15:41:47 +0000
committerNick Clifton <nickc@redhat.com>2004-06-18 15:41:47 +0000
commit23a75657ad37b290eb7df6ce34de22b1c614f5d6 (patch)
treeb410613f682747ea9a54622e3f859ed8d4d4b49b /ld/testsuite/ld-elfvsb
parentcad48f8ed941582fae2acf284a23db5c8c448f70 (diff)
downloadgdb-23a75657ad37b290eb7df6ce34de22b1c614f5d6.zip
gdb-23a75657ad37b290eb7df6ce34de22b1c614f5d6.tar.gz
gdb-23a75657ad37b290eb7df6ce34de22b1c614f5d6.tar.bz2
* ld-elfvsb/main.c: Ensure visibility_def and visibility_func are
actually referenced (gcc 3.4 eliminates comparisons of addresses of global symbols with NULL). * ld-selective/selective.exp: Suppress -fvtable-gc tests for gcc 3.4.0 and above, as this option and its functionality is no longer supported, making these tests fail).
Diffstat (limited to 'ld/testsuite/ld-elfvsb')
-rw-r--r--ld/testsuite/ld-elfvsb/main.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/ld/testsuite/ld-elfvsb/main.c b/ld/testsuite/ld-elfvsb/main.c
index f071260..b498d43 100644
--- a/ld/testsuite/ld-elfvsb/main.c
+++ b/ld/testsuite/ld-elfvsb/main.c
@@ -74,13 +74,13 @@ extern int visibility_var;
#if !defined (HIDDEN_TEST) && defined (PROTECTED_TEST)
int
-visibility ()
+visibility (void)
{
return 1;
}
static int
-main_visibility_check ()
+main_visibility_check (void)
{
return ((int (*) (void)) visibility_funptr ()) != visibility;
}
@@ -88,7 +88,7 @@ main_visibility_check ()
int visibility_var = 1;
static int
-main_visibility_checkvar ()
+main_visibility_checkvar (void)
{
return visibility_varval () != visibility_var
&& visibility_varptr () != &visibility_var;
@@ -99,7 +99,7 @@ int shared_data = 1;
asm (".protected shared_data");
int
-shared_func ()
+shared_func (void)
{
return 1;
}
@@ -112,7 +112,7 @@ extern func shared_func_p ();
#endif
#else
static int
-main_visibility_check ()
+main_visibility_check (void)
{
#ifdef WEAK_TEST
return visibility_funptr () == NULL;
@@ -122,7 +122,7 @@ main_visibility_check ()
}
static int
-main_visibility_checkvar ()
+main_visibility_checkvar (void)
{
#ifdef WEAK_TEST
return visibility_varval () == 0
@@ -137,7 +137,7 @@ main_visibility_checkvar ()
/* This function is called by the shared library. */
int
-main_called ()
+main_called (void)
{
return 6;
}
@@ -145,7 +145,7 @@ main_called ()
/* This function overrides a function in the shared library. */
int
-shlib_overriddencall2 ()
+shlib_overriddencall2 (void)
{
return 8;
}
@@ -155,19 +155,19 @@ int visibility_com;
asm (".hidden visibility_com");
int
-main_visibility_checkcom ()
+main_visibility_checkcom (void)
{
return visibility_com == 0;
}
int
-main_visibility_checkweak ()
+main_visibility_checkweak (void)
{
return 1;
}
#elif defined (HIDDEN_WEAK_TEST)
int
-main_visibility_checkcom ()
+main_visibility_checkcom (void)
{
return 1;
}
@@ -203,32 +203,32 @@ extern int visibility_func ();
asm (".hidden visibility_func");
int
-main_visibility_checkcom ()
+main_visibility_checkcom (void)
{
- return &visibility_def != NULL;
+ return & visibility_def != NULL && visibility_def == 2;
}
int
-main_visibility_checkweak ()
+main_visibility_checkweak (void)
{
- return &visibility_func != NULL;
+ return & visibility_func != NULL && visibility_func () == 2;
}
#else
int
-main_visibility_checkcom ()
+main_visibility_checkcom (void)
{
return 1;
}
int
-main_visibility_checkweak ()
+main_visibility_checkweak (void)
{
return 1;
}
#endif
int
-main ()
+main (void)
{
int (*p) ();
int ret = 0;