* [RFC] Unused variables in testsuite
@ 2006-04-28 15:01 Christophe LYON
2006-05-02 13:02 ` Christophe LYON
2006-05-05 18:05 ` Daniel Jacobowitz
0 siblings, 2 replies; 3+ messages in thread
From: Christophe LYON @ 2006-04-28 15:01 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 149 bytes --]
Hi all,
Following my message on the "gdb" list
(http://sources.redhat.com/ml/gdb/2006-04/msg00327.html),
here is the patch I propose.
Christophe.
[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 1426 bytes --]
2006-04-28 Christophe Lyon <christophe.lyon@st.com>
* gdb.cp/m-static.h (class gnu_obj_4): Add dummy member.
* gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4
is allocated by the compiler.
* gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s,
anons, e, anone to force their allocation by the compiler.
Index: gdb.cp/m-static.cc
===================================================================
--- gdb.cp/m-static.cc (revision 96)
+++ gdb.cp/m-static.cc (working copy)
@@ -68,5 +68,6 @@ int main()
gnu_obj_3<long> test3(greek);
gnu_obj_4 test4;
- return 0; // breakpoint: constructs-done
+ test4.dummy = 0;
+ return test4.dummy; // breakpoint: constructs-done
}
Index: gdb.cp/m-static.h
===================================================================
--- gdb.cp/m-static.h (revision 96)
+++ gdb.cp/m-static.h (working copy)
@@ -7,5 +7,8 @@ class gnu_obj_4
static const int nowhere;
// At some point, perhaps:
// static const int everywhere = 317;
+
+ // try to ensure test4 is actually allocated
+ int dummy;
};
Index: gdb.mi/var-cmd.c
===================================================================
--- gdb.mi/var-cmd.c (revision 96)
+++ gdb.mi/var-cmd.c (working copy)
@@ -301,6 +301,12 @@ do_special_tests (void)
int a;
a = 1;
+ u.integer = a;
+ anonu.a = a;
+ s.integer = a;
+ anons.a = a;
+ e = bar;
+ anone = A;
incr_a(2);
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Unused variables in testsuite
2006-04-28 15:01 [RFC] Unused variables in testsuite Christophe LYON
@ 2006-05-02 13:02 ` Christophe LYON
2006-05-05 18:05 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Christophe LYON @ 2006-05-02 13:02 UTC (permalink / raw)
To: gdb-patches
I forgot to mention that I need someone to check it in for me, if approved.
Thanks,
Christophe.
Christophe LYON wrote:
> Hi all,
>
> Following my message on the "gdb" list
> (http://sources.redhat.com/ml/gdb/2006-04/msg00327.html),
> here is the patch I propose.
>
> Christophe.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC] Unused variables in testsuite
2006-04-28 15:01 [RFC] Unused variables in testsuite Christophe LYON
2006-05-02 13:02 ` Christophe LYON
@ 2006-05-05 18:05 ` Daniel Jacobowitz
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2006-05-05 18:05 UTC (permalink / raw)
To: Christophe LYON; +Cc: gdb-patches
On Fri, Apr 28, 2006 at 05:01:38PM +0200, Christophe LYON wrote:
> 2006-04-28 Christophe Lyon <christophe.lyon@st.com>
>
> * gdb.cp/m-static.h (class gnu_obj_4): Add dummy member.
> * gdb.cp/m-static.cc (main): Write to test4.dummy, so that test4
> is allocated by the compiler.
> * gdb.mi/var-cmd.c: (do_special_tests): Write to u, anonu, s,
> anons, e, anone to force their allocation by the compiler.
Thanks - approved and applied, after making sure it didn't affect the
test results elsewhere.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-05-05 18:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-28 15:01 [RFC] Unused variables in testsuite Christophe LYON
2006-05-02 13:02 ` Christophe LYON
2006-05-05 18:05 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox