This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR debug/41248 [VTA] deal with Pmode != ptr_mode in expand_debug_expr


On Thu, 2009-09-03 at 22:16 -0300, Alexandre Oliva wrote:
> Hi, Steve,
> 
> Thanks for the report.  expand_debug_expr() was not prepared to deal
> with addresses/pointers with different modes.
> 
> This patch fixes it.  I expect machine-dependent pointer extension
> should never arise in debug stmts.  Please let me know if you think this
> expectation is unwarranted.
> 
> Is this ok to install if it passes bootstrap testing?  Could you please
> give it a try on ia64-hpux?  Thanks in advance,

The bootstrap did not work.  Here is a new test case (cut down from
gcov-io.c) that still fails with the assertion at line 2450 of
cfgexpand.c.  The original test case does work for me with your patch.

op0 in this case is:

(subreg:SI (reg/v/f:DI 346 [ summary+-4 ]) 4)

and SImode is ptr_mode, but not Pmode, maybe the gcc_assert should be
changed?  I will try changing Pmode to ptr_mode and see what happens.

Steve Ellcey
sje@cup.hp.com


New test case:

struct gcov_ctr_summary { };
struct gcov_summary {
   unsigned int checksum;
   struct gcov_ctr_summary ctrs[1];
};
void __gcov_write_summary (unsigned int tag, const struct gcov_summary
*summary)
{
   unsigned ix;
   const struct gcov_ctr_summary *csum;
   __gcov_write_unsigned (summary->checksum);
   for (csum = summary->ctrs, ix = 1; ix--; csum++) { }
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]