Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* testsuite gdb.base/constvars: force allocation of local variables
@ 2006-11-08 13:52 Christophe LYON
  2006-11-08 15:06 ` Daniel Jacobowitz
  2006-11-08 16:15 ` Daniel Jacobowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Christophe LYON @ 2006-11-08 13:52 UTC (permalink / raw)
  To: gdb-patches

Hello,

I propose the following patch in order to force allocation of variables 
'crass' and 'crisp'.

Christophe.


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 */
    /*



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-11-09  9:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-08 13:52 testsuite gdb.base/constvars: force allocation of local variables Christophe LYON
2006-11-08 15:06 ` Daniel Jacobowitz
2006-11-08 16:16   ` Christophe LYON
2006-11-08 16:15 ` Daniel Jacobowitz
2006-11-08 16:43   ` Christophe LYON
2006-11-08 16:53     ` Daniel Jacobowitz
2006-11-09  9:25       ` Frederic RISS

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox