Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [rfa/testsuite] ptype.exp: fix FAILs for unused types
@ 2003-03-26 18:04 Michael Elizabeth Chastain
  2003-03-26 20:14 ` Daniel Jacobowitz
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2003-03-26 18:04 UTC (permalink / raw)
  To: gdb-patches

This patch fixes two FAILs in gdb.base/ptype.exp with gcc HEAD
-gdwarf-2.

  gdb.base/ptype.exp: ptype t_char_array
  gdb.base/ptype.exp: ptype func_type

gdb.base/ptype.c typedef's some types but then does not actually use
them.  Recent versions of gcc HEAD with -gdwarf-2 optimize away the type
information.  So this patch simply uses the types.

Tested on my usual testbed: native i686-pc-linux-gnu with gcc v2 and v3,
-gdward-2 and -gstabs+.  I specifically checked that it fixes the
FAILs associated with gcc HEAD.

OK to commit?

Michael C

2003-03-26  Michael Chastain  <mec@shout.net>

	* gdb.base/ptype.exp: Actually use some typedef'd types.

Index: ptype.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/ptype.c,v
retrieving revision 1.2
diff -u -r1.2 ptype.c
--- ptype.c	21 Feb 2002 20:34:16 -0000	1.2
+++ ptype.c	26 Mar 2003 17:39:21 -0000
@@ -59,6 +59,7 @@
 
 /* PR 3742 */
 typedef char t_char_array[];
+t_char_array *pv_char_array;
 
 /**** pointers *******/
 
@@ -236,6 +237,8 @@
 int (*xptr) (int (*) (), int (*) (void), int);
 int (*(*ffptr) (char)) (short);
 int (*(*(*fffptr) (char)) (short)) (long);
+
+func_type v_func_type;
 
 /* Here are the sort of stabs we expect to see for the above:
 


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: [rfa/testsuite] ptype.exp: fix FAILs for unused types
@ 2003-03-26 22:11 Michael Elizabeth Chastain
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Elizabeth Chastain @ 2003-03-26 22:11 UTC (permalink / raw)
  To: drow; +Cc: gdb-patches

Committed.

Michael C

> 2003-03-26  Michael Chastain  <mec@shout.net>
> 
> 	* gdb.base/ptype.exp: Actually use some typedef'd types.


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

end of thread, other threads:[~2003-03-26 22:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-26 18:04 [rfa/testsuite] ptype.exp: fix FAILs for unused types Michael Elizabeth Chastain
2003-03-26 20:14 ` Daniel Jacobowitz
2003-03-26 22:11 Michael Elizabeth Chastain

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