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]

Re: patch for core dump in cse with -O2 on x86


On Thu, 15 Oct 1998 19:21:26 -0600, Jeffrey A Law wrote:
>
>  In message <199810152125.RAA03116@blastula.phys.columbia.edu>you write:
>  > 
>  > The appended patch fixes a core dump in cse.  If HAVE_cc0 is defined,
>  > fold_rtx may try to call equiv_constant with a null rtx.  This case is
>  > triggered by skip_comment() in cpplib.c in the current source tree.
>  > 
>  > The patch makes equiv_constant return 0 in this case, which should be
>  > sane.
>  > 
>  > zw
>  > 
>  > 1998-10-15 17:20 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
>  > 
>  > 	* cse.c (equiv_constant): Check for null argument.
>Well, I'd like to know how this happened.  ie, is it supposed to be possible
>for the compiler to get to equiv_constant with a null argument?
>
>If yes, then the patch would be OK.
>
>If no, then the problem lies elsewhere.
>
>I can't judge which is correct without more information.

fold_rtx calls equiv_constant on prev_insn_cc0, which is allowed
to be null (or anyway it's set to null all over the place).  I don't
know if fold_rtx should be doing that;  I don't have a clue about most
of the back end.

The relevant section of cse.c is around line 5312.  I posted the code
provoking the problem in another message.

zw


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