public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RTL sharing bootstrap failure on sparc-sun-solaris2.10
@ 2007-09-06 17:19 Kaveh R. GHAZI
  2007-09-06 17:23 ` Andreas Tobler
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Kaveh R. GHAZI @ 2007-09-06 17:19 UTC (permalink / raw)
  To: gcc-patches, gcc, jh

[-- Attachment #1: Type: TEXT/PLAIN, Size: 4846 bytes --]

(Sorry, first one bounced from gcc@ because it was over 400k)

Hi Jan,

On sparc-sun-solaris2.10, I'm getting new bootstrap failures in stage2
complaining several times about rtl sharing.  I've included four .i files
for modules that ICEed during stage2, and the cc1 invocations below.

Would you please take a look?

		Thanks,
		--Kaveh


c-format.c: In function 'check_format_string':
c-format.c:150: error: invalid rtl sharing found in the insn
(insn 341 337 342 c-format.c:145 (sequence [
            (jump_insn 338 337 216 c-format.c:145 (return) 394 {*return_internal} (expr_list:REG_BR_PRED (const_int 12 [0xc])
                    (nil)))
            (insn 216 338 342 (set (reg:QI 24 %i0 [orig:111 D.16017 ] [111])
                    (const_int 0 [0x0])) 47 {*movqi_insn} (expr_list:REG_EQUAL (const_int 0 [0x0])
                    (nil)))
        ]) -1 (nil))
c-format.c:150: error: shared rtx
(insn 216 338 342 (set (reg:QI 24 %i0 [orig:111 D.16017 ] [111])
        (const_int 0 [0x0])) 47 {*movqi_insn} (expr_list:REG_EQUAL (const_int 0 [0x0])
        (nil)))
c-format.c:150: internal compiler error: internal consistency failure


tree.c: In function 'maybe_canonicalize_argtypes':
tree.c:5769: error: invalid rtl sharing found in the insn
(insn 572 568 573 tree.c:5758 (sequence [
            (jump_insn 569 568 289 (return) 394 {*return_internal} (expr_list:REG_BR_PRED (const_int 12 [0xc])
                    (nil)))
            (insn 289 569 573 (set (reg/v/f:SI 24 %i0 [orig:108 canon_argtypes.3985 ] [108])
                    (reg:SI 8 %o0)) 50 {*movsi_insn} (nil))
        ]) -1 (nil))
tree.c:5769: error: shared rtx
(insn 289 569 573 (set (reg/v/f:SI 24 %i0 [orig:108 canon_argtypes.3985 ] [108])
        (reg:SI 8 %o0)) 50 {*movsi_insn} (nil))
tree.c:5769: internal compiler error: internal consistency failure


cp/mangle.c: In function 'write_CV_qualifiers_for_type':
cp/mangle.c:1738: error: invalid rtl sharing found in the insn
(insn 338 334 339 cp/mangle.c:1734 (sequence [
            (jump_insn 335 334 245 cp/mangle.c:1733 (return) 394 {*return_internal} (expr_list:REG_BR_PRED (const_int 12 [0xc])
                    (nil)))
            (insn 245 335 339 (set (reg/v:SI 24 %i0 [orig:123 num_qualifiers ] [123])
                    (plus:SI (reg/v:SI 24 %i0 [orig:123 num_qualifiers ] [123])
                        (const_int 1 [0x1]))) 172 {addsi3} (nil))
        ]) -1 (nil))
cp/mangle.c:1738: error: shared rtx
(insn 245 335 339 (set (reg/v:SI 24 %i0 [orig:123 num_qualifiers ] [123])
        (plus:SI (reg/v:SI 24 %i0 [orig:123 num_qualifiers ] [123])
            (const_int 1 [0x1]))) 172 {addsi3} (nil))
cp/mangle.c:1738: internal compiler error: internal consistency failure


java/constants.c: In function 'find_tree_constant':
java/constants.c:122: error: invalid rtl sharing found in the insn
(insn 154 150 155 java/constants.c:120 (sequence [
            (jump_insn 151 150 96 java/constants.c:120 (return) 394 {*return_internal} (expr_list:REG_BR_PRED (const_int 12 [0xc])
                    (nil)))
            (insn 96 151 155 (set (reg/v:SI 24 %i0 [orig:110 i ] [110])
                    (reg/v:SI 17 %l1 [orig:107 i.661 ] [107])) 50 {*movsi_insn} (nil))
        ]) -1 (nil))
java/constants.c:122: error: shared rtx
(insn 96 151 155 (set (reg/v:SI 24 %i0 [orig:110 i ] [110])
        (reg/v:SI 17 %l1 [orig:107 i.661 ] [107])) 50 {*movsi_insn} (nil))
java/constants.c:122: internal compiler error: internal consistency failure


cc1 -fpreprocessed c-format.i -quiet -dumpbase c-format.c -mcpu=v9 -auxbase-strip c-format.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -version -fno-common -o c-format.s

cc1 -fpreprocessed tree.i -quiet -dumpbase tree.c -mcpu=v9 -auxbase-strip tree.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -version -fno-common -o tree.s

cc1 -fpreprocessed mangle.i -quiet -dumpbase mangle.c -mcpu=v9 -auxbase-strip cp/mangle.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wc++-compat -version -fno-common -o mangle.s

cc1 -fpreprocessed constants.i -quiet -dumpbase constants.c -mcpu=v9 -auxbase-strip java/constants.o -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -version -fno-common -o constants.s

--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

[-- Attachment #2: files.tbz --]
[-- Type: APPLICATION/octet-stream, Size: 286206 bytes --]

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:19 RTL sharing bootstrap failure on sparc-sun-solaris2.10 Kaveh R. GHAZI
@ 2007-09-06 17:23 ` Andreas Tobler
  2007-09-06 17:43 ` Jan Hubicka
  2007-09-07  6:03 ` Christian Joensson
  2 siblings, 0 replies; 14+ messages in thread
From: Andreas Tobler @ 2007-09-06 17:23 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches, gcc, jh

Kaveh R. GHAZI wrote:
> (Sorry, first one bounced from gcc@ because it was over 400k)
> 
> Hi Jan,
> 
> On sparc-sun-solaris2.10, I'm getting new bootstrap failures in stage2
> complaining several times about rtl sharing.  I've included four .i files
> for modules that ICEed during stage2, and the cc1 invocations below.
> 
> Would you please take a look?

Jan proposed the below patch.
I successfully tested it and I'm testing now.

Regards,
Andreas

Index: reorg.c
===================================================================
--- reorg.c     (revision 128181)
+++ reorg.c     (working copy)
@@ -3991,6 +3991,9 @@
           if (GET_CODE (pat) == SEQUENCE)
             insn = XVECEXP (pat, 0, 0);
         }
+       if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
+         && INSN_P (XEXP (PATTERN (insn), 0)))
+       delete_insn (insn);
        if (!JUMP_P (insn))
         continue;

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:19 RTL sharing bootstrap failure on sparc-sun-solaris2.10 Kaveh R. GHAZI
  2007-09-06 17:23 ` Andreas Tobler
@ 2007-09-06 17:43 ` Jan Hubicka
  2007-09-06 17:50   ` Jan Hubicka
                     ` (2 more replies)
  2007-09-07  6:03 ` Christian Joensson
  2 siblings, 3 replies; 14+ messages in thread
From: Jan Hubicka @ 2007-09-06 17:43 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches, gcc, jh

> (Sorry, first one bounced from gcc@ because it was over 400k)
> 
> Hi Jan,
> 
> On sparc-sun-solaris2.10, I'm getting new bootstrap failures in stage2
> complaining several times about rtl sharing.  I've included four .i files
> for modules that ICEed during stage2, and the cc1 invocations below.
> 
> Would you please take a look?

Hi,
I already have fix for this just waiting for Andreas Tobler to verify
that it does what expected.  If you could give it a try, it would be
nice.

The problem is 

/* Called when INSN is being moved from a location near the target of a jump.
   We leave a marker of the form (use (INSN)) immediately in front
   of WHERE for mark_target_live_regs.  These markers will be deleted when
   reorg finishes.

   We used to try to update the live status of registers if WHERE is at
   the start of a basic block, but that can't work since we may remove a
   BARRIER in relax_delay_slots.  */

static void
update_block (rtx insn, rtx where)
{
  /* Ignore if this was in a delay slot and it came from the target of
     a branch.  */
  if (INSN_FROM_TARGET_P (insn))
    return;

  emit_insn_before (gen_rtx_USE (VOIDmode, insn), where);

  /* INSN might be making a value live in a block where it didn't use to
     be.  So recompute liveness information for this block.  */

  incr_ticks_for_insn (insn);
}

Producing USE expressions embedding whole INSN.  The comment promise
that those will be removed before reorg ends, but they are not.  This
patch just adds simple code to remove them in very last dbr_schedule
pass. 

Honza

Index: reorg.c
===================================================================
--- reorg.c	(revision 128145)
+++ reorg.c	(working copy)
@@ -3991,6 +3991,9 @@ dbr_schedule (rtx first)
 	  if (GET_CODE (pat) == SEQUENCE)
 	    insn = XVECEXP (pat, 0, 0);
 	}
+      if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
+	  && INSN_P (XEXP (PATTERN (insn), 0)))
+	delete_insn (insn);
       if (!JUMP_P (insn))
 	continue;
 

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:43 ` Jan Hubicka
@ 2007-09-06 17:50   ` Jan Hubicka
  2007-09-06 18:01   ` Ian Lance Taylor
  2007-09-07  2:10   ` Kaveh R. GHAZI
  2 siblings, 0 replies; 14+ messages in thread
From: Jan Hubicka @ 2007-09-06 17:50 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Kaveh R. GHAZI, gcc-patches, gcc, jh

> Hi,
> I already have fix for this just waiting for Andreas Tobler to verify
> that it does what expected.  If you could give it a try, it would be
> nice.
> 
> The problem is 
> 
> /* Called when INSN is being moved from a location near the target of a jump.
>    We leave a marker of the form (use (INSN)) immediately in front
>    of WHERE for mark_target_live_regs.  These markers will be deleted when
>    reorg finishes.
> 
>    We used to try to update the live status of registers if WHERE is at
>    the start of a basic block, but that can't work since we may remove a
>    BARRIER in relax_delay_slots.  */
> 
> static void
> update_block (rtx insn, rtx where)
> {
>   /* Ignore if this was in a delay slot and it came from the target of
>      a branch.  */
>   if (INSN_FROM_TARGET_P (insn))
>     return;
> 
>   emit_insn_before (gen_rtx_USE (VOIDmode, insn), where);
> 
>   /* INSN might be making a value live in a block where it didn't use to
>      be.  So recompute liveness information for this block.  */
> 
>   incr_ticks_for_insn (insn);
> }
> 
> Producing USE expressions embedding whole INSN.  The comment promise
> that those will be removed before reorg ends, but they are not.  This
> patch just adds simple code to remove them in very last dbr_schedule
> pass. 
> 
> Honza

Since patch seems to work for Andreas, would it be OK?
	* recog.c (dbr_schedule): Remove placeholder USE insns
	previously inserted by update_block.
> 
> Index: reorg.c
> ===================================================================
> --- reorg.c	(revision 128145)
> +++ reorg.c	(working copy)
> @@ -3991,6 +3991,9 @@ dbr_schedule (rtx first)
>  	  if (GET_CODE (pat) == SEQUENCE)
>  	    insn = XVECEXP (pat, 0, 0);
>  	}
> +      if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> +	  && INSN_P (XEXP (PATTERN (insn), 0)))
> +	delete_insn (insn);
>        if (!JUMP_P (insn))
>  	continue;
>  

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:43 ` Jan Hubicka
  2007-09-06 17:50   ` Jan Hubicka
@ 2007-09-06 18:01   ` Ian Lance Taylor
  2007-09-06 18:46     ` Jan Hubicka
  2007-09-07  2:10   ` Kaveh R. GHAZI
  2 siblings, 1 reply; 14+ messages in thread
From: Ian Lance Taylor @ 2007-09-06 18:01 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Kaveh R. GHAZI, gcc-patches, gcc, jh

Jan Hubicka <hubicka@ucw.cz> writes:

> Producing USE expressions embedding whole INSN.  The comment promise
> that those will be removed before reorg ends, but they are not.  This
> patch just adds simple code to remove them in very last dbr_schedule
> pass. 

I see code in dbr_schedule to delete them:

  /* Delete any USE insns made by update_block; subsequent passes don't need
     them or know how to deal with them.  */
  for (insn = first; insn; insn = next)
    {
      next = NEXT_INSN (insn);

      if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
	  && INSN_P (XEXP (PATTERN (insn), 0)))
	next = delete_related_insns (insn);
    }

Why is that not working?

Ian

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 18:01   ` Ian Lance Taylor
@ 2007-09-06 18:46     ` Jan Hubicka
  2007-09-06 18:58       ` Ian Lance Taylor
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Hubicka @ 2007-09-06 18:46 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Jan Hubicka, Kaveh R. GHAZI, gcc-patches, gcc, jh

> Jan Hubicka <hubicka@ucw.cz> writes:
> 
> > Producing USE expressions embedding whole INSN.  The comment promise
> > that those will be removed before reorg ends, but they are not.  This
> > patch just adds simple code to remove them in very last dbr_schedule
> > pass. 
> 
> I see code in dbr_schedule to delete them:
> 
>   /* Delete any USE insns made by update_block; subsequent passes don't need
>      them or know how to deal with them.  */
>   for (insn = first; insn; insn = next)
>     {
>       next = NEXT_INSN (insn);
> 
>       if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> 	  && INSN_P (XEXP (PATTERN (insn), 0)))
> 	next = delete_related_insns (insn);
>     }
> 
> Why is that not working?

Hmm, good catch. I didn't noticed that code.
The problem is that update_block is still called after this loop is
done, at least moving that loop down past the loop just bellow it solves
the ICE too.

I must admit I have no idea what those placeholders are good for...

Honza
> 
> Ian

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 18:46     ` Jan Hubicka
@ 2007-09-06 18:58       ` Ian Lance Taylor
  2007-09-06 19:24         ` Jan Hubicka
  0 siblings, 1 reply; 14+ messages in thread
From: Ian Lance Taylor @ 2007-09-06 18:58 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Jan Hubicka, Kaveh R. GHAZI, gcc-patches, gcc

Jan Hubicka <jh@suse.cz> writes:

> > Jan Hubicka <hubicka@ucw.cz> writes:
> > 
> > > Producing USE expressions embedding whole INSN.  The comment promise
> > > that those will be removed before reorg ends, but they are not.  This
> > > patch just adds simple code to remove them in very last dbr_schedule
> > > pass. 
> > 
> > I see code in dbr_schedule to delete them:
> > 
> >   /* Delete any USE insns made by update_block; subsequent passes don't need
> >      them or know how to deal with them.  */
> >   for (insn = first; insn; insn = next)
> >     {
> >       next = NEXT_INSN (insn);
> > 
> >       if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> > 	  && INSN_P (XEXP (PATTERN (insn), 0)))
> > 	next = delete_related_insns (insn);
> >     }
> > 
> > Why is that not working?
> 
> Hmm, good catch. I didn't noticed that code.
> The problem is that update_block is still called after this loop is
> done, at least moving that loop down past the loop just bellow it solves
> the ICE too.

Ah, it's from the calls to fill_simple_delay_slots in
make_return_insns.  The "Delete any USE insns" loop needs to move
below that.

> I must admit I have no idea what those placeholders are good for...

They tell mark_target_live_regs that the registers used by the insn
which was moved are live.

Ian

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 18:58       ` Ian Lance Taylor
@ 2007-09-06 19:24         ` Jan Hubicka
  2007-09-06 19:28           ` Ian Lance Taylor
  2007-09-07 15:28           ` Kaveh R. GHAZI
  0 siblings, 2 replies; 14+ messages in thread
From: Jan Hubicka @ 2007-09-06 19:24 UTC (permalink / raw)
  To: Ian Lance Taylor
  Cc: Jan Hubicka, Jan Hubicka, Kaveh R. GHAZI, gcc-patches, gcc

> Jan Hubicka <jh@suse.cz> writes:
> 
> > > Jan Hubicka <hubicka@ucw.cz> writes:
> > > 
> > > > Producing USE expressions embedding whole INSN.  The comment promise
> > > > that those will be removed before reorg ends, but they are not.  This
> > > > patch just adds simple code to remove them in very last dbr_schedule
> > > > pass. 
> > > 
> > > I see code in dbr_schedule to delete them:
> > > 
> > >   /* Delete any USE insns made by update_block; subsequent passes don't need
> > >      them or know how to deal with them.  */
> > >   for (insn = first; insn; insn = next)
> > >     {
> > >       next = NEXT_INSN (insn);
> > > 
> > >       if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> > > 	  && INSN_P (XEXP (PATTERN (insn), 0)))
> > > 	next = delete_related_insns (insn);
> > >     }
> > > 
> > > Why is that not working?
> > 
> > Hmm, good catch. I didn't noticed that code.
> > The problem is that update_block is still called after this loop is
> > done, at least moving that loop down past the loop just bellow it solves
> > the ICE too.
> 
> Ah, it's from the calls to fill_simple_delay_slots in
> make_return_insns.  The "Delete any USE insns" loop needs to move
> below that.
> 
> > I must admit I have no idea what those placeholders are good for...
> 
> They tell mark_target_live_regs that the registers used by the insn
> which was moved are live.

Ah, I see.
The attached patch seems to work on my testcase too.

Honza

Index: reorg.c
===================================================================
--- reorg.c	(revision 128145)
+++ reorg.c	(working copy)
@@ -3863,17 +3863,6 @@ dbr_schedule (rtx first)
       relax_delay_slots (first);
     }
 
-  /* Delete any USE insns made by update_block; subsequent passes don't need
-     them or know how to deal with them.  */
-  for (insn = first; insn; insn = next)
-    {
-      next = NEXT_INSN (insn);
-
-      if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
-	  && INSN_P (XEXP (PATTERN (insn), 0)))
-	next = delete_related_insns (insn);
-    }
-
   /* If we made an end of function label, indicate that it is now
      safe to delete it by undoing our prior adjustment to LABEL_NUSES.
      If it is now unused, delete it.  */
@@ -3885,6 +3874,17 @@ dbr_schedule (rtx first)
     make_return_insns (first);
 #endif
 
+  /* Delete any USE insns made by update_block; subsequent passes don't need
+     them or know how to deal with them.  */
+  for (insn = first; insn; insn = next)
+    {
+      next = NEXT_INSN (insn);
+
+      if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
+	  && INSN_P (XEXP (PATTERN (insn), 0)))
+	next = delete_related_insns (insn);
+    }
+
   obstack_free (&unfilled_slots_obstack, unfilled_firstobj);
 
   /* It is not clear why the line below is needed, but it does seem to be.  */

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 19:24         ` Jan Hubicka
@ 2007-09-06 19:28           ` Ian Lance Taylor
  2007-09-07 15:28           ` Kaveh R. GHAZI
  1 sibling, 0 replies; 14+ messages in thread
From: Ian Lance Taylor @ 2007-09-06 19:28 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Jan Hubicka, Kaveh R. GHAZI, gcc-patches, gcc

Jan Hubicka <jh@suse.cz> writes:

> The attached patch seems to work on my testcase too.

This patch is OK if it passes testing and gets a ChangeLog entry.

Thanks.

Ian

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:43 ` Jan Hubicka
  2007-09-06 17:50   ` Jan Hubicka
  2007-09-06 18:01   ` Ian Lance Taylor
@ 2007-09-07  2:10   ` Kaveh R. GHAZI
  2 siblings, 0 replies; 14+ messages in thread
From: Kaveh R. GHAZI @ 2007-09-07  2:10 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: gcc-patches, gcc, jh

On Thu, 6 Sep 2007, Jan Hubicka wrote:

> Hi,
> I already have fix for this just waiting for Andreas Tobler to verify
> that it does what expected.  If you could give it a try, it would be
> nice.
> Honza
>
> Index: reorg.c
> ===================================================================
> --- reorg.c	(revision 128145)
> +++ reorg.c	(working copy)
> @@ -3991,6 +3991,9 @@ dbr_schedule (rtx first)
>  	  if (GET_CODE (pat) == SEQUENCE)
>  	    insn = XVECEXP (pat, 0, 0);
>  	}
> +      if (INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> +	  && INSN_P (XEXP (PATTERN (insn), 0)))
> +	delete_insn (insn);
>        if (!JUMP_P (insn))
>  	continue;

FWIW, this patch fixes the problem.  Test results here:
http://gcc.gnu.org/ml/gcc-testresults/2007-09/msg00313.html

I'll try again with your updated version tonight.

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 17:19 RTL sharing bootstrap failure on sparc-sun-solaris2.10 Kaveh R. GHAZI
  2007-09-06 17:23 ` Andreas Tobler
  2007-09-06 17:43 ` Jan Hubicka
@ 2007-09-07  6:03 ` Christian Joensson
  2007-09-07 13:06   ` Christian Joensson
  2 siblings, 1 reply; 14+ messages in thread
From: Christian Joensson @ 2007-09-07  6:03 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches, gcc, jh

2007/9/6, Kaveh R. GHAZI <ghazi@caip.rutgers.edu>:
> (Sorry, first one bounced from gcc@ because it was over 400k)
>
> Hi Jan,
>
> On sparc-sun-solaris2.10, I'm getting new bootstrap failures in stage2
> complaining several times about rtl sharing.  I've included four .i files
> for modules that ICEed during stage2, and the cc1 invocations below.
>
> Would you please take a look?
>
>                 Thanks,
>                 --Kaveh

FWIW, I get a similar problem on sparc/sparc64 linux.

-- 
Cheers,

/ChJ

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-07  6:03 ` Christian Joensson
@ 2007-09-07 13:06   ` Christian Joensson
  0 siblings, 0 replies; 14+ messages in thread
From: Christian Joensson @ 2007-09-07 13:06 UTC (permalink / raw)
  To: Kaveh R. GHAZI; +Cc: gcc-patches, gcc, jh

2007/9/7, Christian Joensson <christian.joensson@gmail.com>:
> 2007/9/6, Kaveh R. GHAZI <ghazi@caip.rutgers.edu>:
> > (Sorry, first one bounced from gcc@ because it was over 400k)
> >
> > Hi Jan,
> >
> > On sparc-sun-solaris2.10, I'm getting new bootstrap failures in stage2
> > complaining several times about rtl sharing.  I've included four .i files
> > for modules that ICEed during stage2, and the cc1 invocations below.
> >
> > Would you please take a look?
> >
> >                 Thanks,
> >                 --Kaveh
>
> FWIW, I get a similar problem on sparc/sparc64 linux.

maybe I should have included this before:

/usr/local/src/trunk/objdir/./prev-gcc/xgcc
-B/usr/local/src/trunk/objdir/./prev-gcc/
-B/usr/local/sparc64-unknown-linux-gnu/bin/ -c   -g -O2 -DIN_GCC   -W
-Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros          -Wno-overlength-strings
-Werror -fno-common   -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc
-I../../gcc/gcc/. -I../../gcc/gcc/../include
-I../../gcc/gcc/../libcpp/include -I/usr/local/gmp-mpfr/include
-I/usr/local/gmp-mpfr/include -I../../gcc/gcc/../libdecnumber
-I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
../../gcc/gcc/c-format.c -o c-format.o
../../gcc/gcc/c-format.c: In function 'check_format_string':
../../gcc/gcc/c-format.c:150: error: invalid rtl sharing found in the insn
(insn 341 337 342 ../../gcc/gcc/c-format.c:145 (sequence [
            (jump_insn 338 337 216 (return) 394 {*return_internal}
(expr_list:REG_BR_PRED (const_int 12 [0xc])
                    (nil)))
            (insn 216 338 342 (set (reg:QI 24 %i0 [orig:111 D.17641 ] [111])
                    (const_int 0 [0x0])) 47 {*movqi_insn}
(expr_list:REG_EQUAL (const_int 0 [0x0])
                    (nil)))
        ]) -1 (nil))
../../gcc/gcc/c-format.c:150: error: shared rtx
(insn 216 338 342 (set (reg:QI 24 %i0 [orig:111 D.17641 ] [111])
        (const_int 0 [0x0])) 47 {*movqi_insn} (expr_list:REG_EQUAL
(const_int 0 [0x0])
        (nil)))
../../gcc/gcc/c-format.c:150: internal compiler error: internal
consistency failure
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [c-format.o] Error 1
make[3]: Leaving directory `/usr/local/src/trunk/objdir/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/usr/local/src/trunk/objdir'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/usr/local/src/trunk/objdir'
make: *** [all] Error 2

This is using Fri Sep  7 05:44:14 UTC 2007 (revision 128228)

-- 
Cheers,

/ChJ

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-06 19:24         ` Jan Hubicka
  2007-09-06 19:28           ` Ian Lance Taylor
@ 2007-09-07 15:28           ` Kaveh R. GHAZI
  2007-09-07 15:32             ` Jan Hubicka
  1 sibling, 1 reply; 14+ messages in thread
From: Kaveh R. GHAZI @ 2007-09-07 15:28 UTC (permalink / raw)
  To: Jan Hubicka; +Cc: Ian Lance Taylor, Jan Hubicka, gcc-patches, gcc

On Thu, 6 Sep 2007, Jan Hubicka wrote:

> Ah, I see.
> The attached patch seems to work on my testcase too.
>
> Honza
>
> Index: reorg.c
> ===================================================================
> --- reorg.c	(revision 128145)
> +++ reorg.c	(working copy)
> @@ -3863,17 +3863,6 @@ dbr_schedule (rtx first)
>        relax_delay_slots (first);
>      }
>
> -  /* Delete any USE insns made by update_block; subsequent passes don't need
> -     them or know how to deal with them.  */
> -  for (insn = first; insn; insn = next)
> -    {
> -      next = NEXT_INSN (insn);
> -
> -      if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> -	  && INSN_P (XEXP (PATTERN (insn), 0)))
> -	next = delete_related_insns (insn);
> -    }
> -
>    /* If we made an end of function label, indicate that it is now
>       safe to delete it by undoing our prior adjustment to LABEL_NUSES.
>       If it is now unused, delete it.  */
> @@ -3885,6 +3874,17 @@ dbr_schedule (rtx first)
>      make_return_insns (first);
>  #endif
>
> +  /* Delete any USE insns made by update_block; subsequent passes don't need
> +     them or know how to deal with them.  */
> +  for (insn = first; insn; insn = next)
> +    {
> +      next = NEXT_INSN (insn);
> +
> +      if (NONJUMP_INSN_P (insn) && GET_CODE (PATTERN (insn)) == USE
> +	  && INSN_P (XEXP (PATTERN (insn), 0)))
> +	next = delete_related_insns (insn);
> +    }
> +
>    obstack_free (&unfilled_slots_obstack, unfilled_firstobj);
>
>    /* It is not clear why the line below is needed, but it does seem to be.  */


This second patch also allows bootstrap to complete on my sparc box.

		Thanks,
		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

* Re: RTL sharing bootstrap failure on sparc-sun-solaris2.10
  2007-09-07 15:28           ` Kaveh R. GHAZI
@ 2007-09-07 15:32             ` Jan Hubicka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Hubicka @ 2007-09-07 15:32 UTC (permalink / raw)
  To: Kaveh R. GHAZI
  Cc: Jan Hubicka, Ian Lance Taylor, Jan Hubicka, gcc-patches, gcc

> 
> 
> This second patch also allows bootstrap to complete on my sparc box.

Thanks for testing and good news,
I will commit the patch

Honza
> 
> 		Thanks,
> 		--Kaveh
> --
> Kaveh R. Ghazi			ghazi@caip.rutgers.edu

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

end of thread, other threads:[~2007-09-07 15:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-06 17:19 RTL sharing bootstrap failure on sparc-sun-solaris2.10 Kaveh R. GHAZI
2007-09-06 17:23 ` Andreas Tobler
2007-09-06 17:43 ` Jan Hubicka
2007-09-06 17:50   ` Jan Hubicka
2007-09-06 18:01   ` Ian Lance Taylor
2007-09-06 18:46     ` Jan Hubicka
2007-09-06 18:58       ` Ian Lance Taylor
2007-09-06 19:24         ` Jan Hubicka
2007-09-06 19:28           ` Ian Lance Taylor
2007-09-07 15:28           ` Kaveh R. GHAZI
2007-09-07 15:32             ` Jan Hubicka
2007-09-07  2:10   ` Kaveh R. GHAZI
2007-09-07  6:03 ` Christian Joensson
2007-09-07 13:06   ` Christian Joensson

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).