diff options
author | Jason Merrill <jason@redhat.com> | 2015-12-02 17:18:18 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-12-02 17:18:18 -0500 |
commit | fa26da223666589dee005765740ed40ee290c22f (patch) | |
tree | 13af6a1d0567068242f4b871e5aca4fd35d2ab95 | |
parent | 5df445a2a52cf954d3f124f5001ce4faaf01f042 (diff) | |
download | gcc-fa26da223666589dee005765740ed40ee290c22f.zip gcc-fa26da223666589dee005765740ed40ee290c22f.tar.gz gcc-fa26da223666589dee005765740ed40ee290c22f.tar.bz2 |
Allow running the testsuite in C++1z mode.
gcc/cp/
* Make-lang.in (check-c++1z, check-c++-all): New.
gcc/testsuite/
* lib/g++.exp: Handle --stds= option.
* lib/g++-dg.exp (g++-dg-runtest): Use it.
From-SVN: r231209
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/Make-lang.in | 12 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/g++-dg.exp | 15 | ||||
-rw-r--r-- | gcc/testsuite/lib/g++.exp | 9 |
5 files changed, 40 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index ce26e5d..f7483c0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2015-12-02 Jason Merrill <jason@redhat.com> + + * Make-lang.in (check-c++1z, check-c++-all): New. + 2015-12-02 Markus Trippelsdorf <markus@trippelsdorf.de> PR c++/67337 diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in index a16f228..50a1359 100644 --- a/gcc/cp/Make-lang.in +++ b/gcc/cp/Make-lang.in @@ -145,9 +145,15 @@ c++.srcman: doc/g++.1 # check targets. However, our DejaGNU framework requires 'check-g++' as its # entry point. We feed the former to the latter here. check-c++ : check-g++ -# Run the testsute in C++0x mode. -check-c++0x: - @echo Normal 'make check' now runs the testsuite in C++11 mode as well as C++98. + +# Run the testsuite in C++1z mode. +check-c++1z: + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=1z" check-g++ + +# Run the testsuite in all standard conformance levels. +check-c++-all: + $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --stds=98,11,14,1z" check-g++ + # Run the testsuite with garbage collection at every opportunity. check-g++-strict-gc: $(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --extra_opts,--param,ggc-min-heapsize=0,--param,ggc-min-expand=0" \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 517b23e..299250b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-12-02 Jason Merrill <jason@redhat.com> + + * lib/g++.exp: Handle --stds= option. + * lib/g++-dg.exp (g++-dg-runtest): Use it. + 2015-12-02 Tobias Burnus <burnus@net-b.de> Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp index 421f8b6..be63dea 100644 --- a/gcc/testsuite/lib/g++-dg.exp +++ b/gcc/testsuite/lib/g++-dg.exp @@ -43,9 +43,20 @@ proc g++-dg-runtest { testcases flags default-extra-flags } { # if there's a dg-options line. if ![search_for $test "-std=*++"] { if [search_for $test "dg-options"] { - set option_list { -std=gnu++98 -std=gnu++11 -std=gnu++14 } + set std_prefix "-std=gnu++" } else { - set option_list { -std=c++98 -std=c++11 -std=c++14 } + set std_prefix "-std=c++" + } + + global gpp_std_list + if { [llength $gpp_std_list] > 0 } { + set std_list $gpp_std_list + } else { + set std_list { 98 11 14 } + } + set option_list { } + foreach x $std_list { + lappend option_list "${std_prefix}$x" } } else { set option_list { "" } diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp index 229fbc3..0b99903 100644 --- a/gcc/testsuite/lib/g++.exp +++ b/gcc/testsuite/lib/g++.exp @@ -32,6 +32,7 @@ load_lib target-libpath.exp set gpp_compile_options "" +set gpp_std_list { } # # g++_version -- extract and print the version number of the compiler @@ -367,6 +368,14 @@ proc ${tool}_option_proc { option } { } verbose -log "gpp_compile_options set to $gpp_compile_options" return 1 + } elseif [regexp "^--stds=" $option] { + global gpp_std_list + regsub "^--stds=" $option "" option + foreach x [split $option ","] { + lappend gpp_std_list "$x" + } + verbose -log "gpp_std_list set to $gpp_std_list" + return 1 } else { return 0 } |