public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/35768]  New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
@ 2008-03-30 17:28 danglin at gcc dot gnu dot org
  2008-03-30 23:59 ` [Bug middle-end/35768] " danglin at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-03-30 17:28 UTC (permalink / raw)
  To: gcc-bugs

Executing on host: /home/dave/gnu/gcc-4.4/objdir/gcc/xgcc
-B/home/dave/gnu/gcc-4.4/objdir/gcc/   -O0  -w -fno-show-column -c  -o
20010226-1.o /home/dave/gnu/gcc
-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c    (timeout = 300)
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c: In 
function 'foo':
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22: 
error: VOIDmode on an output
(insn 30 29 31 2
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/
20010226-1.c:6 (parallel [
            (const_int 1 [0x1])
            (unspec_volatile [
                    (mem:BLK (scratch) [0 A8])                ] 1)
            (use (reg:SI 20 %r20 [108]))
            (use (reg:SI 19 %r19 [109]))            (use (reg:SI 28 %r28
[110]))            (clobber (scratch))
        ]) 244 {dcacheflush}
(nil))/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22:
internal compiler error: in do_output_reload, at reload1.c:7331
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c: In
function 'foo':
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22:
error: VOIDmode on an output
(insn 30 29 31 2
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:6
(parallel [
            (const_int 1 [0x1])
            (unspec_volatile [
                    (mem:BLK (scratch) [0 A8])
                ] 1)
            (use (reg:SI 20 %r20 [108]))
            (use (reg:SI 19 %r19 [109]))
            (use (reg:SI 28 %r28 [110]))
            (clobber (scratch))
        ]) 244 {dcacheflush} (nil))
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22:
internal compiler error: in do_output_reload, at reload1.c:7331
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

FAIL: gcc.c-torture/compile/20010226-1.c  -O0  (internal compiler error)
FAIL: gcc.c-torture/compile/20010226-1.c  -O0  (test for excess errors)
Excess errors:
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22:
error: VOIDmode on an output
(insn 30 29 31 2
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:6
(parallel [
            (const_int 1 [0x1])
            (unspec_volatile [
                    (mem:BLK (scratch) [0 A8])
                ] 1)
            (use (reg:SI 20 %r20 [108]))
            (use (reg:SI 19 %r19 [109]))
            (use (reg:SI 28 %r28 [110]))
            (clobber (scratch))
        ]) 244 {dcacheflush} (nil))
/home/dave/gnu/gcc-4.4/gcc/gcc/testsuite/gcc.c-torture/compile/20010226-1.c:22:
internal compiler error: in do_output_reload, at reload1.c:7331


-- 
           Summary: gcc.c-torture/compile/20010226-1.c:22: ICE: in
                    do_output_reload, at reload1.c:7331
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danglin at gcc dot gnu dot org
 GCC build triplet: hppa*-*-*
  GCC host triplet: hppa*-*-*
GCC target triplet: hppa*-*-*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
@ 2008-03-30 23:59 ` danglin at gcc dot gnu dot org
  2008-03-31  0:03 ` danglin at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-03-30 23:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danglin at gcc dot gnu dot org  2008-03-30 23:58 -------
(gdb) p debug_rtx (rl->out)
(scratch)


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
  2008-03-30 23:59 ` [Bug middle-end/35768] " danglin at gcc dot gnu dot org
@ 2008-03-31  0:03 ` danglin at gcc dot gnu dot org
  2008-03-31 16:07 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-03-31  0:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from danglin at gcc dot gnu dot org  2008-03-31 00:03 -------
Richard, does match_scratch now require a mode?  The pattern causing
the problem was written without a mode so that it could handle both
SImode and DImode.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at nildram dot co
                   |                            |dot uk


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
  2008-03-30 23:59 ` [Bug middle-end/35768] " danglin at gcc dot gnu dot org
  2008-03-31  0:03 ` danglin at gcc dot gnu dot org
@ 2008-03-31 16:07 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-03-31 16:11 ` rsandifo at nildram dot co dot uk
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-03-31 16:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dave at hiauly1 dot hia dot nrc dot ca  2008-03-31 16:06 -------
Subject: Re:  gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload,
at reload1.c:7331

This was introduced in revision 133531.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2008-03-31 16:07 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-03-31 16:11 ` rsandifo at nildram dot co dot uk
  2008-03-31 23:06 ` dave at hiauly1 dot hia dot nrc dot ca
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at nildram dot co dot uk @ 2008-03-31 16:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from rsandifo at nildram dot co dot uk  2008-03-31 16:11 -------
Subject: Re:  gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload,
at reload1.c:7331

"danglin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> Richard, does match_scratch now require a mode?  The pattern causing
> the problem was written without a mode so that it could handle both
> SImode and DImode.

Hmm.  Well, the use of a modeless "match_scratch" in a matching context
is OK.  It's the use of a modeless "(scratch)" rtx (and thus a modeless
"match_scratch" in an expander or named insn) that's the problem.

It does seem odd for an output "(scratch)" to have no mode.  From a
quick check, it seems PA is the only port to use voidless "(scratch)"
rtxes for output operands that really do need reloads.  Other ports
either add the mode to the "match_scratch" or get the associated
expander to call "gen_rtx_SCRATCH (mode)".  See s390.md for an
example of the latter.

I suppose the assumption in pa.md is that the scratch output reload
should be in the same mode as the input operand.  However, the point
of my patch was that they needn't be: matched input-output operands
can have different modes, and in every other case except the PA one,
the mode of the output value determines the mode of the output reload
register.

If we want to continue to allow this, the fix is to change:

  if (rl->out && reg_rtx)

into:

  if (rl->out
      && reg_rtx
      && !(GET_CODE (rl->out) == SCRATCH && GET_MODE (rl->out) == VOIDmode))

in reload1.c.

What do you think?  Should pa.md be changed (probably along the same
lines as s390.md) or do you want to go with the reload change?

Richard


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2008-03-31 16:11 ` rsandifo at nildram dot co dot uk
@ 2008-03-31 23:06 ` dave at hiauly1 dot hia dot nrc dot ca
  2008-04-01  8:52 ` rsandifo at nildram dot co dot uk
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2008-03-31 23:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca  2008-03-31 23:06 -------
Subject: Re:  gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload,
at reload1.c:7331

> I suppose the assumption in pa.md is that the scratch output reload
> should be in the same mode as the input operand.

I think the constraint should be changed from "=&0" to "+&0" to indicate
that the operand is both read and written.  Possibly, this will fix the
problem.

Dave


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug middle-end/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2008-03-31 23:06 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2008-04-01  8:52 ` rsandifo at nildram dot co dot uk
  2008-04-05 23:31 ` [Bug target/35768] " danglin at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rsandifo at nildram dot co dot uk @ 2008-04-01  8:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from rsandifo at nildram dot co dot uk  2008-04-01 08:52 -------
Subject: Re:  gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload,
at reload1.c:7331

"dave at hiauly1 dot hia dot nrc dot ca" <gcc-bugzilla@gcc.gnu.org> writes:
>> I suppose the assumption in pa.md is that the scratch output reload
>> should be in the same mode as the input operand.
>
> I think the constraint should be changed from "=&0" to "+&0" to indicate
> that the operand is both read and written.  Possibly, this will fix the
> problem.

Well, "=" is correct for matching operands; "+" isn't.  As I say,
the problem is simply that we have something that is logically an
output value -- (scratch) -- but that does not have a mode.
Changing "=" to "+" wouldn't solve that; the (scratch) would
still be an output value.

Richard


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug target/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-04-01  8:52 ` rsandifo at nildram dot co dot uk
@ 2008-04-05 23:31 ` danglin at gcc dot gnu dot org
  2008-04-10 22:52 ` danglin at gcc dot gnu dot org
  2008-04-10 22:53 ` danglin at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-04-05 23:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from danglin at gcc dot gnu dot org  2008-04-05 23:30 -------
Testing backend fix.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |target


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug target/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-04-05 23:31 ` [Bug target/35768] " danglin at gcc dot gnu dot org
@ 2008-04-10 22:52 ` danglin at gcc dot gnu dot org
  2008-04-10 22:53 ` danglin at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-04-10 22:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from danglin at gcc dot gnu dot org  2008-04-10 22:51 -------
Subject: Bug 35768

Author: danglin
Date: Thu Apr 10 22:50:49 2008
New Revision: 134182

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=134182
Log:
        PR target/35768
        * pa.md: Define mode iterator P.  Define mode attribute dwc.
        (dcacheflush): Update pattern to use iterator P and attribute dwc.
        (icacheflush): Likewise.
        * pa.h (INITIALIZE_TRAMPOLINE): Use dcacheflushsi/icacheflushsi if
        !TARGET_64BIT, and dcacheflushdi/icacheflushdi if TARGET_64BIT.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.h
    trunk/gcc/config/pa/pa.md


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

* [Bug target/35768] gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331
  2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-04-10 22:52 ` danglin at gcc dot gnu dot org
@ 2008-04-10 22:53 ` danglin at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-04-10 22:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from danglin at gcc dot gnu dot org  2008-04-10 22:52 -------
Fixed.


-- 

danglin at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35768


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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-30 17:28 [Bug middle-end/35768] New: gcc.c-torture/compile/20010226-1.c:22: ICE: in do_output_reload, at reload1.c:7331 danglin at gcc dot gnu dot org
2008-03-30 23:59 ` [Bug middle-end/35768] " danglin at gcc dot gnu dot org
2008-03-31  0:03 ` danglin at gcc dot gnu dot org
2008-03-31 16:07 ` dave at hiauly1 dot hia dot nrc dot ca
2008-03-31 16:11 ` rsandifo at nildram dot co dot uk
2008-03-31 23:06 ` dave at hiauly1 dot hia dot nrc dot ca
2008-04-01  8:52 ` rsandifo at nildram dot co dot uk
2008-04-05 23:31 ` [Bug target/35768] " danglin at gcc dot gnu dot org
2008-04-10 22:52 ` danglin at gcc dot gnu dot org
2008-04-10 22:53 ` danglin at gcc dot gnu dot org

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