aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/pr-574.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.cp/pr-574.exp')
-rw-r--r--gdb/testsuite/gdb.cp/pr-574.exp8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/pr-574.exp b/gdb/testsuite/gdb.cp/pr-574.exp
index dab52fd..da596f1 100644
--- a/gdb/testsuite/gdb.cp/pr-574.exp
+++ b/gdb/testsuite/gdb.cp/pr-574.exp
@@ -32,7 +32,13 @@ if [get_compiler_info "c++"] {
return -1
}
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
+set flags [list debug c++]
+if { [test_compiler_info gcc-*] && [gcc_major_version] >= 10 } {
+ # Work around PR gcc/101452.
+ lappend flags additional_flags=-fno-eliminate-unused-debug-types
+}
+
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile $flags]} {
return -1
}