Commit 5f2fd590 by Martin Sebor Committed by Martin Sebor

Fix testsuite fallout from r252976.

gcc/testsuite/ChangeLog:

	PR c/81854
	* gcc.dg/attr-ifunc-1.c: Correct type errors.
	* gcc.dg/attr-ifunc-2.c: Ditto.
	* gcc.dg/attr-ifunc-3.c: Ditto.
	* gcc.dg/attr-ifunc-4.c: Ditto.
	* gcc.dg/attr-ifunc-5.c: Ditto.
	* gcc.dg/pr81854.c: Require ifunc support.
	* gcc/testsuite/lib/target-supports.exp: Correct type error.

From-SVN: r253037
parent 329c9aee
2017-09-20 Martin Sebor <msebor@redhat.com>
PR c/81854
* gcc.dg/attr-ifunc-1.c: Correct type errors.
* gcc.dg/attr-ifunc-2.c: Ditto.
* gcc.dg/attr-ifunc-3.c: Ditto.
* gcc.dg/attr-ifunc-4.c: Ditto.
* gcc.dg/attr-ifunc-5.c: Ditto.
* gcc.dg/pr81854.c: Require ifunc support.
* gcc/testsuite/lib/target-supports.exp: Correct type error.
2017-09-20 Jeff Law <law@redhat.com> 2017-09-20 Jeff Law <law@redhat.com>
* gcc.target/i386/stack-check-11.c: Update test and regexp * gcc.target/i386/stack-check-11.c: Update test and regexp
......
...@@ -2,15 +2,13 @@ ...@@ -2,15 +2,13 @@
/* { dg-require-ifunc "" } */ /* { dg-require-ifunc "" } */
/* { dg-options "" } */ /* { dg-options "" } */
typedef int F (void);
static int implementation (void) static int implementation (void)
{ {
__builtin_printf ("'ere I am JH\n"); __builtin_printf ("'ere I am JH\n");
return 0; return 0;
} }
static F* resolver (void) static __typeof__ (implementation)* resolver (void)
{ {
return implementation; return implementation;
} }
......
/* { dg-require-ifunc "" } */ /* { dg-require-ifunc "" } */
static void *resolver () typedef int F (void);
static F *resolver ()
{ {
return 0; return 0;
} }
......
...@@ -14,7 +14,7 @@ static int __attribute__((noinline)) ...@@ -14,7 +14,7 @@ static int __attribute__((noinline))
return 0; return 0;
} }
static void *resolver (void) static __typeof__ (implementation) *resolver (void)
{ {
return (void *)implementation; return (void *)implementation;
} }
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
#include <stdio.h> #include <stdio.h>
static void *implementation (void) static int implementation (void)
{ {
printf ("'ere I am JH\n"); printf ("'ere I am JH\n");
return 0; return 0;
} }
static void *resolver (void) static __typeof__ (implementation)* resolver (void)
{ {
return (void *)implementation; return implementation;
} }
static int magic (void) __attribute__ ((ifunc ("resolver"))); static int magic (void) __attribute__ ((ifunc ("resolver")));
......
...@@ -4,13 +4,13 @@ ...@@ -4,13 +4,13 @@
#include <stdio.h> #include <stdio.h>
static void *implementation (void) static int implementation (void)
{ {
printf ("'ere I am JH\n"); printf ("'ere I am JH\n");
return 0; return 0;
} }
static void *resolver (void) static __typeof__ (implementation)* resolver (void)
{ {
return (void *)implementation; return (void *)implementation;
} }
......
/* PR c/81854 - weak alias of an incompatible symbol accepted /* PR c/81854 - weak alias of an incompatible symbol accepted
{ dg-do compile } */ { dg-do compile }
{ dg-require-ifunc "" } */
const char* __attribute__ ((weak, alias ("f0_target"))) const char* __attribute__ ((weak, alias ("f0_target")))
f0 (void); /* { dg-error "alias between function and variable" } */ f0 (void); /* { dg-error "alias between function and variable" } */
......
...@@ -439,7 +439,8 @@ proc check_ifunc_available { } { ...@@ -439,7 +439,8 @@ proc check_ifunc_available { } {
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
void g() {} typedef void F (void);
F* g() {}
void f() __attribute__((ifunc("g"))); void f() __attribute__((ifunc("g")));
}] }]
} }
......
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