c-compat.exp (compat-use-alt-compiler): Remove -fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.

* lib/c-compat.exp (compat-use-alt-compiler): Remove
	-fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.
	(compat-use-tst-compiler): Restore TEST_ALWAYS_FLAGS.
	(compat_setup_dfp): Initialize compat_alt_caret and
	compat_save_TEST_ALWAYS_FLAGS.

From-SVN: r194817
This commit is contained in:
Jakub Jelinek 2013-01-02 21:14:53 +01:00 committed by Jakub Jelinek
parent 5f94242299
commit 868f97d5fa
2 changed files with 30 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2013-01-02 Jakub Jelinek <jakub@redhat.com>
* lib/c-compat.exp (compat-use-alt-compiler): Remove
-fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.
(compat-use-tst-compiler): Restore TEST_ALWAYS_FLAGS.
(compat_setup_dfp): Initialize compat_alt_caret and
compat_save_TEST_ALWAYS_FLAGS.
2013-01-02 Richard Sandiford <rdsandiford@googlemail.com>
* gcc.dg/torture/tls/tls-reload-1.c: New test.

View File

@ -1,4 +1,4 @@
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008
# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2013
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@ -35,12 +35,16 @@ load_lib target-supports.exp
#
proc compat-use-alt-compiler { } {
global GCC_UNDER_TEST ALT_CC_UNDER_TEST
global compat_same_alt
global compat_same_alt compat_alt_caret
global TEST_ALWAYS_FLAGS
# We don't need to do this if the alternate compiler is actually
# the same as the compiler under test.
if { $compat_same_alt == 0 } then {
set GCC_UNDER_TEST $ALT_CC_UNDER_TEST
if { $compat_alt_caret == 0 } then {
regsub -- "-fno-diagnostics-show-caret" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
}
}
}
@ -50,12 +54,14 @@ proc compat-use-alt-compiler { } {
proc compat-use-tst-compiler { } {
global GCC_UNDER_TEST compat_save_gcc_under_test
global compat_same_alt
global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
# We don't need to do this if the alternate compiler is actually
# the same as the compiler under test.
if { $compat_same_alt == 0 } then {
set GCC_UNDER_TEST $compat_save_gcc_under_test
set TEST_ALWAYS_FLAGS $compat_save_TEST_ALWAYS_FLAGS
}
}
@ -64,6 +70,11 @@ proc compat_setup_dfp { } {
global compat_use_alt
global compat_same_alt
global compat_have_dfp
global compat_alt_caret
global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
set compat_alt_caret 0
set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
verbose "compat_setup_dfp: $compat_use_alt $compat_same_alt" 2
@ -72,6 +83,15 @@ proc compat_setup_dfp { } {
set compat_have_dfp [check_effective_target_dfprt_nocache]
verbose "compat_have_dfp for tst compiler: $compat_have_dfp" 2
if { $compat_use_alt == 1 && $compat_same_alt == 0 } {
compat-use-alt-compiler
if { [check_no_compiler_messages_nocache compat_alt_has_caret object {
int dummy; } "-fno-diagnostics-show-caret"] != 0 } {
set compat_alt_caret 1
}
compat-use-tst-compiler
}
# If there is an alternate compiler, does it support decimal float types?
if { $compat_have_dfp == 1 && $compat_use_alt == 1 && $compat_same_alt == 0 } {
compat-use-alt-compiler