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
This commit is contained in:
parent
5df445a2a5
commit
fa26da2236
@ -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>
|
2015-12-02 Markus Trippelsdorf <markus@trippelsdorf.de>
|
||||||
|
|
||||||
PR c++/67337
|
PR c++/67337
|
||||||
|
@ -145,9 +145,15 @@ c++.srcman: doc/g++.1
|
|||||||
# check targets. However, our DejaGNU framework requires 'check-g++' as its
|
# check targets. However, our DejaGNU framework requires 'check-g++' as its
|
||||||
# entry point. We feed the former to the latter here.
|
# entry point. We feed the former to the latter here.
|
||||||
check-c++ : check-g++
|
check-c++ : check-g++
|
||||||
# Run the testsute in C++0x mode.
|
|
||||||
check-c++0x:
|
# Run the testsuite in C++1z mode.
|
||||||
@echo Normal 'make check' now runs the testsuite in C++11 mode as well as C++98.
|
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.
|
# Run the testsuite with garbage collection at every opportunity.
|
||||||
check-g++-strict-gc:
|
check-g++-strict-gc:
|
||||||
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --extra_opts,--param,ggc-min-heapsize=0,--param,ggc-min-expand=0" \
|
$(MAKE) RUNTESTFLAGS="$(RUNTESTFLAGS) --extra_opts,--param,ggc-min-heapsize=0,--param,ggc-min-expand=0" \
|
||||||
|
@ -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>
|
2015-12-02 Tobias Burnus <burnus@net-b.de>
|
||||||
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
|
Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
|
||||||
|
|
||||||
|
@ -43,9 +43,20 @@ proc g++-dg-runtest { testcases flags default-extra-flags } {
|
|||||||
# if there's a dg-options line.
|
# if there's a dg-options line.
|
||||||
if ![search_for $test "-std=*++"] {
|
if ![search_for $test "-std=*++"] {
|
||||||
if [search_for $test "dg-options"] {
|
if [search_for $test "dg-options"] {
|
||||||
set option_list { -std=gnu++98 -std=gnu++11 -std=gnu++14 }
|
set std_prefix "-std=gnu++"
|
||||||
} else {
|
} 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 {
|
} else {
|
||||||
set option_list { "" }
|
set option_list { "" }
|
||||||
|
@ -32,6 +32,7 @@ load_lib target-libpath.exp
|
|||||||
|
|
||||||
|
|
||||||
set gpp_compile_options ""
|
set gpp_compile_options ""
|
||||||
|
set gpp_std_list { }
|
||||||
|
|
||||||
#
|
#
|
||||||
# g++_version -- extract and print the version number of the compiler
|
# 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"
|
verbose -log "gpp_compile_options set to $gpp_compile_options"
|
||||||
return 1
|
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 {
|
} else {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user