From 24b830b6cde4ed227661d29ba985565f23a2bf96 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 8 Mar 2018 10:26:24 +0100 Subject: [PATCH] Fix ifunc detection in target-supports.exp file. 2018-03-08 Thomas Schwinge * lib/target-supports.exp: Do not return zero from a ifunc function. From-SVN: r258362 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/lib/target-supports.exp | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4d3535d9633..3d12b6b2a47 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-08 Thomas Schwinge + + * lib/target-supports.exp: Do not return zero from a ifunc + function. + 2018-03-08 Richard Biener PR tree-optimization/84746 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 8479290f62b..a3ce690efa8 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -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 } -- 2.30.2