In test-case gdb.dwarf2/break-inline-psymtab.exp we use O2 to enable inlining
of bar into foo in break-inline-psymtab-2.c.
Instead, enforce inlining using __attribute__((always_inline)), to avoid any
optimization-related test issues.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-04-02 Tom de Vries <tdevries@suse.de>
* gdb.dwarf2/break-inline-psymtab-2.c (bar): Add
__attribute__((always_inline)).
* gdb.dwarf2/break-inline-psymtab.exp: Don't use -O2.
+2020-04-02 Tom de Vries <tdevries@suse.de>
+
+ * gdb.dwarf2/break-inline-psymtab-2.c (bar): Add
+ __attribute__((always_inline)).
+ * gdb.dwarf2/break-inline-psymtab.exp: Don't use -O2.
+
2020-04-02 Tom de Vries <tdevries@suse.de>
* lib/gdbserver-support.exp (gdbserver_exit): Factor out of ...
int a;
-static inline int
+static inline int __attribute__((always_inline))
bar (void)
{
a = 2;
standard_testfile break-inline-psymtab.c break-inline-psymtab-2.c
set sources [list $srcfile $srcfile2]
-set opts {debug optimize=-O2}
-if { [prepare_for_testing "failed to prepare" ${testfile} $sources $opts] } {
+if { [prepare_for_testing "failed to prepare" ${testfile} $sources] } {
return -1
}