mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-11 13:02:10 +08:00
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. |
||
---|---|---|
.. | ||
clobbered-registers-O2.c | ||
clobbered-registers-O2.exp | ||
inline-break.c | ||
inline-break.exp | ||
inline-bt.c | ||
inline-bt.exp | ||
inline-cmds.c | ||
inline-cmds.exp | ||
inline-locals.c | ||
inline-locals.exp | ||
inline-markers.c | ||
solib-intra-step-lib.c | ||
solib-intra-step-main.c | ||
solib-intra-step.exp |