public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: dmalcolm@redhat.com
Cc: gcc-patches@gcc.gnu.org
Subject: Re: (Still) ICE for cris-elf at r214710
Date: Fri, 29 Aug 2014 14:49:00 -0000	[thread overview]
Message-ID: <201408291448.s7TEmv55006629@ignucius.se.axis.com> (raw)
In-Reply-To: <1409311619.31600.11.camel@surprise> (message from David Malcolm	on Fri, 29 Aug 2014 13:26:59 +0200)

> From: David Malcolm <dmalcolm@redhat.com>
> Date: Fri, 29 Aug 2014 13:26:59 +0200
> On Fri, 2014-08-29 at 06:13 +0200, Hans-Peter Nilsson wrote:
> > /tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/xgcc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/./gcc/ -nostdinc -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/ -isystem /tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/newlib/targ-include -isystem /tmp/hpautotest-gcc1/gcc/newlib/libc/include -B/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/cris -L/tmp/hpautotest-gcc1/cris-elf/gccobj/cris-elf/libgloss/libnosys -L/tmp/hpautotest-gcc1/gcc/libgloss/cris -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/bin/ -B/tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/lib/ -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/include -isystem /tmp/hpautotest-gcc1/cris-elf/pre/cris-elf/sys-include    -g -O2 -march=v8 -mbest-lib-options -O2  -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../../../.
 /!
>  gcc
> >   -I/tmp/
> >  hpautotest-gcc1/gcc/libgcc -I/tmp/hpautotest-gcc1/gcc/libgcc/. -I/tmp/hpautotest-gcc1/gcc/libgcc/../gcc -I/tmp/hpautotest-gcc1/gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _lshrdi3.o -MT _lshrdi3.o -MD -MP -MF _lshrdi3.dep -DL_lshrdi3 -c /tmp/hpautotest-gcc1/gcc/libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
> > /tmp/hpautotest-gcc1/gcc/libgcc/libgcc2.c: In function '__lshrdi3':
> > /tmp/hpautotest-gcc1/gcc/libgcc/libgcc2.c:426:1: internal compiler error: in safe_as_a, at is-a.h:205
> >  }
> >  ^
> > 0x9119c2 safe_as_a<rtx_insn*, rtx_def>
> >         /tmp/hpautotest-gcc1/gcc/gcc/is-a.h:205
> > 0x9119c2 JUMP_LABEL_AS_INSN
> >         /tmp/hpautotest-gcc1/gcc/gcc/rtl.h:1663
> > 0x9119c2 find_dead_or_set_registers
> >         /tmp/hpautotest-gcc1/gcc/gcc/resource.c:500
> > 0x912408 mark_target_live_regs(rtx_insn*, rtx_insn*, resources*)
> >         /tmp/hpautotest-gcc1/gcc/gcc/resource.c:1115
> > 0x90cb4b fill_slots_from_thread
> >         /tmp/hpautotest-gcc1/gcc/gcc/reorg.c:2404
> > 0x90ff45 fill_eager_delay_slots
> >         /tmp/hpautotest-gcc1/gcc/gcc/reorg.c:2933
> > 0x90ff45 dbr_schedule
> >         /tmp/hpautotest-gcc1/gcc/gcc/reorg.c:3742
> > 0x9108ef rest_of_handle_delay_slots
> >         /tmp/hpautotest-gcc1/gcc/gcc/reorg.c:3885
> > 0x9108ef execute
> >         /tmp/hpautotest-gcc1/gcc/gcc/reorg.c:3916
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > Please include the complete backtrace with any bug report.
> > See <http://gcc.gnu.org/bugs.html> for instructions.
> > make[4]: *** [_lshrdi3.o] Error 1
> > 
> > Use "./cc1 -fpreprocessed this.i -O2" to repeat.

> Sorry about this.
> 
> Looks like I introduced this bug in r214693 (aka patch #225).
> 
> The issue is within resource.c:
> 499			{
> 500			  next = JUMP_LABEL_AS_INSN (this_jump_insn);
> 501			  if (ANY_RETURN_P (next))
> 502			    next = NULL;
> 
> where "next" is an rtx_insn *, but the JUMP_LABEL of this_jump_insn is a
> RETURN, rather than an insn (several such issues in that commit).
> 
> Patch attached, which fixes the above testcase; bootstrap in progress:
> 
> gcc/
> 	  * resource.h (mark_target_live_regs): Undo erroneous conversion
> 	  of second param of r214693, converting it back from rtx_insn * to
> 	  rtx, since it could be a RETURN.
> 
> 	  * resource.c (find_dead_or_set_registers): Similarly, convert
> 	  param "jump_target" back from an rtx_insn ** to an rtx *, as we
> 	  could be writing back a RETURN.  Rename local rtx_insn * "next" to
> 	  "next_insn", and introduce "lab_or_return" as a local rtx,
> 	  handling the case where JUMP_LABEL (this_jump_insn) is a RETURN.
> 	  (mark_target_live_regs): Undo erroneous conversion
> 	  of second param of r214693, converting it back from rtx_insn * to
> 	  rtx, since it could be a RETURN.  Rename it from "target" to
> 	  "target_maybe_return", reintroducing the name "target" as a local
> 	  rtx_insn * with a checked cast, after we've handled the case of
> 	  ANY_RETURN_P.

Sorry, but that didn't help.  I still get the exact same error.
(Yep, I double-checked that I didn't goof testing...)

brgds, H-P

  parent reply	other threads:[~2014-08-29 14:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29  4:14 Hans-Peter Nilsson
2014-08-29 11:30 ` David Malcolm
2014-08-29 11:44   ` David Malcolm
2014-08-29 13:41     ` Hans-Peter Nilsson
2014-08-29 14:49   ` Hans-Peter Nilsson [this message]
2014-08-29 15:37     ` PR62304 (was Re: (Still) ICE for cris-elf at r214710) David Malcolm
2014-08-29 16:16       ` Hans-Peter Nilsson
2014-08-29 18:10         ` [PATCH v2] " David Malcolm
2014-08-29 20:27           ` Hans-Peter Nilsson
2014-08-30  5:42           ` Jeff Law
2014-08-30 14:38             ` David Malcolm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201408291448.s7TEmv55006629@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).