aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.opt/inline-bt.exp
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-07-19 17:51:05 +0100
committerPedro Alves <palves@redhat.com>2016-07-19 17:51:05 +0100
commit1f960ced9a3e4aa0823dcc234d9de49aebaee055 (patch)
tree45af369fc6b8311d228cee5a0eac38e6d4ccdf71 /gdb/testsuite/gdb.opt/inline-bt.exp
parenta6ebf6169a1bd14724b9ac49990089542396f576 (diff)
downloadgdb-1f960ced9a3e4aa0823dcc234d9de49aebaee055.zip
gdb-1f960ced9a3e4aa0823dcc234d9de49aebaee055.tar.gz
gdb-1f960ced9a3e4aa0823dcc234d9de49aebaee055.tar.bz2
Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline))
A test recently added to gdb.opt/inline-cmds.exp fails for arm-none-eabi targets because -O2 leads to instructions to be reordered widely. I guess it might have made sense years ago to enable optimization in these tests, but I fail to see the need for that nowadays. Using -O0 while relying on __attribute__((always_inline)), which is already used in the tests [1] [2], avoids this sort of trouble, while still exercising the inlining-related use cases that are the focus of these tests. I think that nowadays we can safely assume that all compilers we care about support __attribute__((always_inline)) or similar. [1] - Except one spot that missed it. [2] - Note that the .exp files make sure the frames that should have been inlined are indeed inlined, with "info frame". gdb/testsuite/ChangeLog: 2016-07-19 Pedro Alves <palves@redhat.com> * gdb.opt/inline-break.exp: Remove optimize=-O2. * gdb.opt/inline-bt.exp: Likewise. * gdb.opt/inline-cmds.exp: Remove optimize=-O2 and add additional_flags=-Winline. * gdb.opt/inline-locals.exp: Likewise. * gdb.opt/inline-markers.c (ATTR): Define. (inlined_fn): Use it.
Diffstat (limited to 'gdb/testsuite/gdb.opt/inline-bt.exp')
-rw-r--r--gdb/testsuite/gdb.opt/inline-bt.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.opt/inline-bt.exp b/gdb/testsuite/gdb.opt/inline-bt.exp
index 63d76e2..13c6993 100644
--- a/gdb/testsuite/gdb.opt/inline-bt.exp
+++ b/gdb/testsuite/gdb.opt/inline-bt.exp
@@ -17,7 +17,7 @@ standard_testfile .c inline-markers.c
if {[prepare_for_testing $testfile.exp $testfile \
[list $srcfile $srcfile2] \
- {debug optimize=-O2 additional_flags=-Winline}]} {
+ {debug additional_flags=-Winline}]} {
return -1
}