diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2016-11-30 11:38:46 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@gcc.gnu.org> | 2016-11-30 11:38:46 +0000 |
commit | cc46bc434015f59862e9905c98e9226d3bb1a6d1 (patch) | |
tree | 012a743dab7490f57b4aea335d87806cf990875d | |
parent | 6c8bf066581fe8bbd53e5967a49b6edd622f63b8 (diff) | |
download | gcc-cc46bc434015f59862e9905c98e9226d3bb1a6d1.zip gcc-cc46bc434015f59862e9905c98e9226d3bb1a6d1.tar.gz gcc-cc46bc434015f59862e9905c98e9226d3bb1a6d1.tar.bz2 |
arm/gcc: Tighten checks in check_effective_target_freorder
In check_effective_target_freorder we check to see if the target
supports -freorder-blocks-and-partition. However we disable
-freorder-blocks-and-partition when -fprofile-use is not supplied so for
some targets we'll not see any message about lack of support for
-freorder-blocks-and-partition unless -fprofile-use is also passed.
This commit extends check_effective_target_freorder to first try
-freorder-blocks-and-partition on its own, then try -fprofile-use and
-freorder-blocks-and-partition.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp (check_effective_target_freorder): Check
additional case.
From-SVN: r243009
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/lib/target-supports.exp | 11 |
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 5532ed1..e89bca5 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2016-11-30 Andrew Burgess <andrew.burgess@embecosm.com> + * lib/target-supports.exp (check_effective_target_freorder): Check + additional case. + +2016-11-30 Andrew Burgess <andrew.burgess@embecosm.com> + * gcc.target/arc/arc700-stld-hazard.c: New file. 2016-11-30 Janus Weil <janus@gcc.gnu.org> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2192eb6..ace080e 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1011,12 +1011,19 @@ proc check_effective_target_fstack_protector {} { } # Return 1 if compilation with -freorder-blocks-and-partition is error-free -# for trivial code, 0 otherwise. +# for trivial code, 0 otherwise. As some targets (ARM for example) only +# warn when -fprofile-use is also supplied we test that combination too. proc check_effective_target_freorder {} { - return [check_no_compiler_messages freorder object { + if { [check_no_compiler_messages freorder object { void foo (void) { } } "-freorder-blocks-and-partition"] + && [check_no_compiler_messages fprofile_use_freorder object { + void foo (void) { } + } "-fprofile-use -freorder-blocks-and-partition"] } { + return 1 + } + return 0 } # Return 1 if -fpic and -fPIC are supported, as in no warnings or errors |