fix gdb.base/access-mem-running.exp for clang testing

Clang was optimizing global_var away because it was not being used
anywhere. this commit fixes that by adding the attribute used it.
This commit is contained in:
Bruno Larsen 2022-07-20 16:44:32 -03:00
parent 8a0eb19943
commit 96ca89d245

View file

@ -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 ()