Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Fix internal error in value_cast_pointers
@ 2008-07-15 21:40 Andreas Schwab
  2008-07-15 21:47 ` Daniel Jacobowitz
  2008-07-15 21:53 ` Stan Shebs
  0 siblings, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2008-07-15 21:40 UTC (permalink / raw)
  To: gdb-patches

This patch fixes five regressions in bs15503.exp.  value_ind has never
returned a value whose type has typedefs stripped off (the type is
always the direct target of the pointer type).  Tested on ppc-linux.
OK?

Andreas.

2008-07-15  Andreas Schwab  <schwab@suse.de>

	* valops.c (value_cast_pointers): Follow typedefs when checking
	result of coercion.

--- valops.c.~1.191.~	2008-06-08 17:05:35.000000000 +0200
+++ valops.c	2008-07-15 22:59:34.000000000 +0200
@@ -268,7 +268,7 @@ value_cast_pointers (struct type *type,
 	v2 = coerce_ref (arg2);
       else
 	v2 = value_ind (arg2);
-      gdb_assert (TYPE_CODE (value_type (v2)) == TYPE_CODE_STRUCT
+      gdb_assert (TYPE_CODE (check_typedef (value_type (v2))) == TYPE_CODE_STRUCT
 		  && !!"Why did coercion fail?");
       v2 = value_cast_structs (t1, v2);
       /* At this point we have what we can have, un-dereference if needed.  */

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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

end of thread, other threads:[~2008-07-15 22:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-15 21:40 Fix internal error in value_cast_pointers Andreas Schwab
2008-07-15 21:47 ` Daniel Jacobowitz
2008-07-15 21:53 ` Stan Shebs
2008-07-15 22:02   ` Daniel Jacobowitz
2008-07-15 22:10   ` Andreas Schwab

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