Fix ifunc detection in target-supports.exp file.
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 8 Mar 2018 09:26:24 +0000 (10:26 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Thu, 8 Mar 2018 09:26:24 +0000 (09:26 +0000)
2018-03-08  Thomas Schwinge  <thomas@codesourcery.com>

* lib/target-supports.exp: Do not return zero from a ifunc
function.

From-SVN: r258362

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index 4d3535d..3d12b6b 100644 (file)
@@ -1,3 +1,8 @@
+2018-03-08  Thomas Schwinge  <thomas@codesourcery.com>
+
+       * lib/target-supports.exp: Do not return zero from a ifunc
+       function.
+
 2018-03-08  Richard Biener  <rguenther@suse.de>
 
        PR tree-optimization/84746
index 8479290..a3ce690 100644 (file)
@@ -448,8 +448,9 @@ proc check_ifunc_available { } {
        #ifdef __cplusplus
        extern "C" {
        #endif
-       typedef void F (void);
-       F* g (void) { return 0; }
+       extern void f_ ();
+       typedef void F (void);
+       F* g (void) { return &f_; }     
        void f () __attribute__ ((ifunc ("g")));
        #ifdef __cplusplus
        }