+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>
* gcc.target/i386/stack-check-11.c: Update test and regexp
/* { dg-require-ifunc "" } */
/* { dg-options "" } */
-typedef int F (void);
-
static int implementation (void)
{
__builtin_printf ("'ere I am JH\n");
return 0;
}
-static F* resolver (void)
+static __typeof__ (implementation)* resolver (void)
{
return implementation;
}
/* { dg-require-ifunc "" } */
-static void *resolver ()
+typedef int F (void);
+
+static F *resolver ()
{
return 0;
}
return 0;
}
-static void *resolver (void)
+static __typeof__ (implementation) *resolver (void)
{
return (void *)implementation;
}
#include <stdio.h>
-static void *implementation (void)
+static int implementation (void)
{
printf ("'ere I am JH\n");
return 0;
}
-static void *resolver (void)
+static __typeof__ (implementation)* resolver (void)
{
- return (void *)implementation;
+ return implementation;
}
static int magic (void) __attribute__ ((ifunc ("resolver")));
#include <stdio.h>
-static void *implementation (void)
+static int implementation (void)
{
printf ("'ere I am JH\n");
return 0;
}
-static void *resolver (void)
+static __typeof__ (implementation)* resolver (void)
{
return (void *)implementation;
}
/* 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")))
f0 (void); /* { dg-error "alias between function and variable" } */
#ifdef __cplusplus
extern "C"
#endif
- void g() {}
+ typedef void F (void);
+ F* g() {}
void f() __attribute__((ifunc("g")));
}]
}