Port c-c++-common support from 4.5

* g++.dg/dg.exp: Port c-c++-common support from 4.5.
	* gcc.dg/dfp/dfp.exp: Likewise.
	* gcc.dg/dg.exp: Likewise.
	* gcc/testsuite/lib/target-supports.exp: Likewise.

From-SVN: r153859
This commit is contained in:
Dodji Seketeli 2009-11-03 17:59:43 +00:00 committed by Dodji Seketeli
parent 7faff37381
commit 548f865e33
5 changed files with 41 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2009-11-03 Dodji Seketeli <dodji@redhat.com>
* g++.dg/dg.exp: Port c-c++-common support from 4.5.
* gcc.dg/dfp/dfp.exp: Likewise.
* gcc.dg/dg.exp: Likewise.
* gcc/testsuite/lib/target-supports.exp: Likewise.
2009-11-03 Dodji Seketeli <dodji@redhat.com>
PR c++/41856

View File

@ -48,5 +48,9 @@ set tests [prune $tests $srcdir/$subdir/graphite/*]
# Main loop.
dg-runtest $tests "" $DEFAULT_CXXFLAGS
# C/C++ common tests.
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/*.\[cSi\]]] \
"" ""
# All done.
dg-finish

View File

@ -46,10 +46,14 @@ if ![info exists DEFAULT_CFLAGS] then {
# Initialize `dg'.
dg-init
# Main loop.
# Main loop; run the C-only tests.
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
"" $DEFAULT_CFLAGS
# Run the tests that are shared with C++ testing.
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/dfp/*c]] \
"" $DEFAULT_CFLAGS
# All done.
dg-finish

View File

@ -32,5 +32,9 @@ dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cSi\]]] \
"" $DEFAULT_CFLAGS
# C/C++ common tests.
dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/*.\[cSi\]]] \
" -Wc++-compat " ""
# All done.
dg-finish

View File

@ -2894,3 +2894,24 @@ proc check_effective_target_correct_iso_cpp_string_wchar_protos { } {
#endif
}]
}
# Return 1 if the language for the compiler under test is C.
proc check_effective_target_c { } {
global tool
if [string match $tool "gcc"] {
return 1
}
return 0
}
# Return 1 if the language for the compiler under test is C++.
proc check_effective_target_c++ { } {
global tool
if [string match $tool "g++"] {
return 1
}
return 0
}