public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Don't use O2 for inlining in break-inline-psymtab.exp
@ 2020-04-02 15:12 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2020-04-02 15:12 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=880d97770b63eb722d53b3a0ae2f03deae0c9c72
commit 880d97770b63eb722d53b3a0ae2f03deae0c9c72
Author: Tom de Vries <tdevries@suse.de>
Date: Thu Apr 2 17:12:49 2020 +0200
[gdb/testsuite] Don't use O2 for inlining in break-inline-psymtab.exp
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.
Diff:
---
gdb/testsuite/ChangeLog | 6 ++++++
gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c | 2 +-
gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp | 3 +--
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 99813054d5d..d662727ac5c 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+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 ...
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
index 38c69336f20..b7fe485b3aa 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab-2.c
@@ -19,7 +19,7 @@ extern int foo (void);
int a;
-static inline int
+static inline int __attribute__((always_inline))
bar (void)
{
a = 2;
diff --git a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
index adbe8620aa7..344d7da0d54 100644
--- a/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
+++ b/gdb/testsuite/gdb.dwarf2/break-inline-psymtab.exp
@@ -16,8 +16,7 @@
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
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-04-02 15:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 15:12 [binutils-gdb] [gdb/testsuite] Don't use O2 for inlining in break-inline-psymtab.exp Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).