From 073809a7187bba6eb3a775d45a248754e9f37a64 Mon Sep 17 00:00:00 2001 From: Martin Sebor Date: Wed, 20 Sep 2017 22:46:49 +0000 Subject: [PATCH] Fix C++ testsuite fallout from r252976. gcc/testsuite/ChangeLog: PR c/81854 * g++.dg/ext/attr-ifunc-2.C: Correct type errors. * g++.dg/ext/attr-ifunc-4.C: Ditto. * lib/target-supports.exp: Adjust for C++. From-SVN: r253041 --- gcc/testsuite/ChangeLog | 7 ++++++- gcc/testsuite/g++.dg/ext/attr-ifunc-2.C | 2 +- gcc/testsuite/g++.dg/ext/attr-ifunc-4.C | 2 +- gcc/testsuite/lib/target-supports.exp | 5 ++++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index fd89f9ec878..94696c91b93 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-09-20 Martin Sebor + PR c/81854 + * g++.dg/ext/attr-ifunc-2.C: Correct type errors. + * g++.dg/ext/attr-ifunc-4.C: Ditto. + * lib/target-supports.exp: Adjust for C++. + PR c/81854 * gcc.dg/attr-ifunc-1.c: Correct type errors. * gcc.dg/attr-ifunc-2.c: Ditto. @@ -7,7 +12,7 @@ * 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. + * lib/target-supports.exp: Correct type error. 2017-09-20 Jeff Law diff --git a/gcc/testsuite/g++.dg/ext/attr-ifunc-2.C b/gcc/testsuite/g++.dg/ext/attr-ifunc-2.C index 49872e0cbea..1fc940bb7dd 100644 --- a/gcc/testsuite/g++.dg/ext/attr-ifunc-2.C +++ b/gcc/testsuite/g++.dg/ext/attr-ifunc-2.C @@ -20,7 +20,7 @@ int Klass::implementation (void) return 0; } -Klass::memFuncPtr Klass::resolver (void) +Klass::MemFuncPtr Klass::resolver (void) { return &Klass::implementation; } diff --git a/gcc/testsuite/g++.dg/ext/attr-ifunc-4.C b/gcc/testsuite/g++.dg/ext/attr-ifunc-4.C index b8d8e5879b4..3127193147e 100644 --- a/gcc/testsuite/g++.dg/ext/attr-ifunc-4.C +++ b/gcc/testsuite/g++.dg/ext/attr-ifunc-4.C @@ -14,7 +14,7 @@ struct Klassier : Klass int implementation (); int magic (); - typedef int (Klass::*MemFuncPtr)(); + typedef int (Klassier::*MemFuncPtr)(); static MemFuncPtr resolver (); }; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index f04687f382c..5b40058e2d7 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -437,11 +437,14 @@ proc check_effective_target_alias { } { proc check_ifunc_available { } { return [check_no_compiler_messages ifunc_available object { #ifdef __cplusplus - extern "C" + extern "C" { #endif typedef void F (void); F* g() {} void f() __attribute__((ifunc("g"))); + #ifdef __cplusplus + } + #endif }] } -- 2.30.2