aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Biener <rguenth@gcc.gnu.org>2010-06-03 16:08:49 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-06-03 16:08:49 +0000
commitddf54e5aa0dac6956f9fa42a7e11c2915236cad0 (patch)
tree1436a158a648be25d38bfc6ee88a83f4fce39130 /gcc
parentf5f92f6d3bc3e0d1758cc7ae8e8ccc9f2850895e (diff)
downloadgcc-ddf54e5aa0dac6956f9fa42a7e11c2915236cad0.zip
gcc-ddf54e5aa0dac6956f9fa42a7e11c2915236cad0.tar.gz
gcc-ddf54e5aa0dac6956f9fa42a7e11c2915236cad0.tar.bz2
re PR lto/41921 (Cross language don't work with typedef unnamed structs)
2010-06-03 Richard Guenther <rguenther@suse.de> PR lto/41921 * lib/lto.exp: Always load gcc.exp. (lto-obj): For C source files invoke gcc_target_compile. * g++.dg/lto/20100603-1_0.C: New testcase. * g++.dg/lto/20100603-1_1.c: Likewise. From-SVN: r160227
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/lib/lto.exp9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp
index 7b51fdd..282b57f 100644
--- a/gcc/testsuite/lib/lto.exp
+++ b/gcc/testsuite/lib/lto.exp
@@ -110,6 +110,7 @@ set lto_skip_list $LTO_SKIPS
load_lib dg.exp
load_lib gcc-dg.exp
+load_lib gcc.exp
# lto-obj -- compile to an object file
#
@@ -137,7 +138,13 @@ proc lto-obj { source dest optall optfile optstr xfaildata } {
lappend options "additional_flags=$optall $optfile"
set compiler_conditional_xfail_data $xfaildata
- set comp_output [${tool}_target_compile "$source" "$dest" object $options]
+
+ # Allow C source files to mix freely with other languages
+ if [ string match "*.c" $source ] then {
+ set comp_output [gcc_target_compile "$source" "$dest" object $options]
+ } else {
+ set comp_output [${tool}_target_compile "$source" "$dest" object $options]
+ }
# Prune unimportant visibility warnings before checking output.
set comp_output [lto_prune_warns $comp_output]
${tool}_check_compile "$testcase $dest assemble" $optstr $dest $comp_output