diff options
author | Jakub Jelinek <jakub@redhat.com> | 2020-04-24 19:14:27 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2020-04-24 19:14:27 +0200 |
commit | 9407f0c32b215d55d3474a234b0043bddc185b1c (patch) | |
tree | ad1035682b884c8c35a72db8d39d67bf4c21614b | |
parent | 01f5d5e8f9bc4df0b99dd5b825b39e10af543304 (diff) | |
download | gcc-9407f0c32b215d55d3474a234b0043bddc185b1c.zip gcc-9407f0c32b215d55d3474a234b0043bddc185b1c.tar.gz gcc-9407f0c32b215d55d3474a234b0043bddc185b1c.tar.bz2 |
testsuite: C++14 vs. C++17 struct-layout-1.exp testing with ALT_CXX_UNDER_TEST [PR94383]
> I haven't added (yet) checks if the alternate compiler does support these
> options (I think that can be done incrementally), so for now this testing is
> done only if the alternate compiler is not used.
This patch does that, so now when testing against not too old compiler
it can do the -std=c++14 vs. -std=c++17 testing also between under test and
alt compilers.
2020-04-24 Jakub Jelinek <jakub@redhat.com>
PR c++/94383
* g++.dg/compat/struct-layout-1.exp: Use the -std=c++14 vs. -std=c++17
ABI compatibility testing even with ALT_CXX_UNDER_TEST, as long as
that compiler accepts -std=c++14 and -std=c++17 options.
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/compat/struct-layout-1.exp | 14 |
2 files changed, 20 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ec14119..099c76a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2020-04-24 Jakub Jelinek <jakub@redhat.com> + + PR c++/94383 + * g++.dg/compat/struct-layout-1.exp: Use the -std=c++14 vs. -std=c++17 + ABI compatibility testing even with ALT_CXX_UNDER_TEST, as long as + that compiler accepts -std=c++14 and -std=c++17 options. + 2020-04-24 Andrew Stubbs <ams@codesourcery.com> * lib/target-supports.exp (available_vector_sizes): Add amdgcn. diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp index 99bfdbe..f2a20aa 100644 --- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp +++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp @@ -142,7 +142,19 @@ if { $status == 0 } then { file delete -force $tstobjdir file mkdir $tstobjdir set generator_args "-s $srcdir/$subdir -d $tstobjdir" - if { $use_alt == 0 } then { + set test_cxx14_vs_cxx17 1 + if { $use_alt != 0 } then { + compat-use-alt-compiler + if { [check_no_compiler_messages_nocache compat_alt_has_cxx14 object { + int dummy; } "-std=c++14"] == 0 } { + set test_cxx14_vs_cxx17 0 + } elseif { [check_no_compiler_messages_nocache compat_alt_has_cxx17 object { + int dummy; } "-std=c++17"] == 0 } { + set test_cxx14_vs_cxx17 0 + } + compat-use-tst-compiler + } + if { $test_cxx14_vs_cxx17 != 0 } then { set generator_args "$generator_args -c" } if [info exists env(RUN_ALL_COMPAT_TESTS) ] then { |