Fix testsuite fallout from r252976.
authorMartin Sebor <msebor@redhat.com>
Wed, 20 Sep 2017 22:19:53 +0000 (22:19 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Wed, 20 Sep 2017 22:19:53 +0000 (16:19 -0600)
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

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-ifunc-1.c
gcc/testsuite/gcc.dg/attr-ifunc-2.c
gcc/testsuite/gcc.dg/attr-ifunc-3.c
gcc/testsuite/gcc.dg/attr-ifunc-4.c
gcc/testsuite/gcc.dg/attr-ifunc-5.c
gcc/testsuite/gcc.dg/pr81854.c
gcc/testsuite/lib/target-supports.exp

index a636327..fd89f9e 100644 (file)
@@ -1,3 +1,14 @@
+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
index 3f7450e..f1a1986 100644 (file)
@@ -2,15 +2,13 @@
 /* { 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;
 }
index 8375af9..8221cd4 100644 (file)
@@ -1,6 +1,8 @@
 /* { dg-require-ifunc "" } */
 
-static void *resolver ()
+typedef int F (void);
+
+static F *resolver ()
 {
   return 0;
 }
index fbd972d..653af85 100644 (file)
@@ -14,7 +14,7 @@ static int __attribute__((noinline))
   return 0;
 }
 
-static void *resolver (void)
+static __typeof__ (implementation) *resolver (void)
 {
   return (void *)implementation;
 }
index 698c06b..5c87445 100644 (file)
@@ -4,15 +4,15 @@
 
 #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")));
index 4dddec4..1ecc391 100644 (file)
@@ -4,13 +4,13 @@
 
 #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;
 }
index 4b0f4da..b8499f8 100644 (file)
@@ -1,5 +1,6 @@
 /* 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" } */
index 43d3c2c..f04687f 100644 (file)
@@ -439,7 +439,8 @@ proc check_ifunc_available { } {
        #ifdef __cplusplus
        extern "C"
        #endif
-       void g() {}
+       typedef void F (void);
+       F* g() {}
        void f() __attribute__((ifunc("g")));
     }]
 }