projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a0eb19
)
fix gdb.base/access-mem-running.exp for clang testing
author
Bruno Larsen
<blarsen@redhat.com>
Wed, 20 Jul 2022 19:44:32 +0000
(16:44 -0300)
committer
Bruno Larsen
<blarsen@redhat.com>
Mon, 12 Sep 2022 12:08:44 +0000
(14:08 +0200)
Clang was optimizing global_var away because it was not being used
anywhere. this commit fixes that by adding the attribute used it.
gdb/testsuite/gdb.base/access-mem-running.c
patch
|
blob
|
history
diff --git
a/gdb/testsuite/gdb.base/access-mem-running.c
b/gdb/testsuite/gdb.base/access-mem-running.c
index 6335f1bf1997649f4e2d105a247accf1c9928d42..cff6f0da820fdb94c3180d7e7fafff781fa7724f 100644
(file)
--- a/
gdb/testsuite/gdb.base/access-mem-running.c
+++ b/
gdb/testsuite/gdb.base/access-mem-running.c
@@
-19,7
+19,7
@@
static unsigned int global_counter = 1;
-static volatile unsigned int global_var = 123;
+static volatile unsigned int
__attribute__((used))
global_var = 123;
static void
maybe_stop_here ()