Hi all,
After r228136, flag_reorder_blocks_and_partition is canceled when
-fprofile-use is not specified.
In this case check_effective_target_freorder() is not able to check the
proper target support.
This is a simple patch to add "-fprofile-use" option that effective
target check.
Okay to commit on the trunk?
Regards,
Renlin Li
gcc/testsuite/ChangeLog:
2015-10-26 Renlin Li <renlin...@arm.com>
* lib/target-supports.exp (check_effective_target_freorder): Add
-fprofile-use flag.
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index b543519..0dc13be 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -960,11 +960,12 @@ proc check_effective_target_fstack_protector {} {
# Return 1 if compilation with -freorder-blocks-and-partition is error-free
# for trivial code, 0 otherwise.
+# -freorder-blocks-and-partition has no effect if given without -fprofile-use.
proc check_effective_target_freorder {} {
return [check_no_compiler_messages freorder object {
void foo (void) { }
- } "-freorder-blocks-and-partition"]
+ } "-freorder-blocks-and-partition -fprofile-use"]
}
# Return 1 if -fpic and -fPIC are supported, as in no warnings or errors