Re: testsuite gdb.base/constvars: force allocation of local variables

Christophe LYON
2006-11-08T16:43:57Z

Daniel Jacobowitz wrote:
> Please, reply to the list next time. This patch is OK if you fix your
> formatting.
>

OK, so here is the revised version:

2006-11-08 Christophe Lyon <christophe.lyon@st.com>

* gdb.base/constvars.c (main): Write to crass and crips, so that
they are allocated by the compiler.

Index: gdb.base/constvars.c
===================================================================
--- gdb.base/constvars.c (revision 96)
+++ gdb.base/constvars.c (working copy)
@@ -169,8 +169,8 @@ main (void)

/* various structs with const members */

- struct crass { char * const ptr; } crass;
- struct crisp { char * const *ptr; } crisp;
+ struct crass { char * const ptr; } crass = { lamprey };
+ struct crisp { char * const *ptr; } crisp = { &lamprey };

/* misc. references */
/*

--
Christophe.