public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] PR gold/21129: gold: Check if _ZN1AD2Ev/_ZN1AC2Ev exist first
@ 2017-05-01 22:44 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2017-05-01 22:44 UTC (permalink / raw)
  To: binutils

Since GCC 4.2 doesn't generate _ZN1AD2Ev nor _ZN1AC2Ev, check if they
are folded only when they exist.

OK for master?

H.J.
---
	PR gold/21129
	* testsuite/icf_safe_pie_test.sh: Don't check if _ZN1AD2Ev and
	_ZN1AC2Ev are folded when they don't exist.
---
 gold/testsuite/icf_safe_pie_test.sh | 5 ++++-
 gold/testsuite/icf_safe_test.sh     | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/gold/testsuite/icf_safe_pie_test.sh b/gold/testsuite/icf_safe_pie_test.sh
index f91a80c..da726da 100755
--- a/gold/testsuite/icf_safe_pie_test.sh
+++ b/gold/testsuite/icf_safe_pie_test.sh
@@ -71,6 +71,9 @@ arch_specific_safe_fold()
 
 arch_specific_safe_fold icf_safe_pie_test_1.stdout icf_safe_pie_test_2.stdout \
   icf_safe_pie_test.map "kept_func_1" "kept_func_2"
-check_fold   icf_safe_pie_test.map "_ZN1AD2Ev" "_ZN1AC2Ev"
+if grep -q _ZN1A[CD]2Ev icf_safe_pie_test_1.stdout
+then
+    check_fold   icf_safe_pie_test.map "_ZN1AD2Ev" "_ZN1AC2Ev"
+fi
 check_nofold icf_safe_pie_test_1.stdout "kept_func_3" "kept_func_1"
 check_nofold icf_safe_pie_test_1.stdout "kept_func_3" "kept_func_2"
diff --git a/gold/testsuite/icf_safe_test.sh b/gold/testsuite/icf_safe_test.sh
index f048d86..dae8582 100755
--- a/gold/testsuite/icf_safe_test.sh
+++ b/gold/testsuite/icf_safe_test.sh
@@ -69,6 +69,9 @@ arch_specific_safe_fold()
 
 arch_specific_safe_fold icf_safe_test_1.stdout icf_safe_test_2.stdout \
   icf_safe_test.map "kept_func_1" "kept_func_2"
-check_fold   icf_safe_test.map "_ZN1AD2Ev" "_ZN1AC2Ev"
+if grep -q _ZN1A[CD]2Ev icf_safe_test_1.stdout
+then
+    check_fold   icf_safe_test.map "_ZN1AD2Ev" "_ZN1AC2Ev"
+fi
 check_nofold icf_safe_test_1.stdout "kept_func_3" "kept_func_1"
 check_nofold icf_safe_test_1.stdout "kept_func_3" "kept_func_2"
-- 
2.9.3

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-05-01 22:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-01 22:44 [PATCH] PR gold/21129: gold: Check if _ZN1AD2Ev/_ZN1AC2Ev exist first H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).