public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/12958] New: Cannot compile flac, unable to find register
@ 2003-11-08  4:10 aaronw at attbi dot com
  2003-11-08  4:11 ` [Bug c/12958] " aaronw at attbi dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 17+ messages in thread
From: aaronw at attbi dot com @ 2003-11-08  4:10 UTC (permalink / raw)
  To: gcc-bugs

When I attempt to compile FLAC for Solaris using GCC 3.3.2 I get the following 
error: 
 
gcc -fomit-frame-pointer -funroll-loops -finline-functions -g -O2 -fPIC -o 
seekable_stream_encoder.o seekable_stream_encoder2.c 
seekable_stream_encoder.c: In function `metadata_callback_': 
seekable_stream_encoder.c:864: error: unable to find a register to spill in 
class `I64_REGS' 
seekable_stream_encoder.c:864: error: this is the insn: 
(insn 367 360 315 20 ff0ea5c0 (parallel [ 
            (set (reg:DI 240) 
                (lshiftrt:DI (reg:DI 16 %l0 [222]) 
                    (const_int 48 [0x30]))) 
            (clobber (scratch:SI)) 
        ]) 314 {lshrdi3_v8plus} (insn_list 313 (nil)) 
    (expr_list:REG_UNUSED (scratch:SI) 
        (nil))) 
seekable_stream_encoder.c:864: confused by earlier errors, bailing out 
 
 
I will attempt to attach the preprocessed C file to this bug.  I removed most 
of the code.

-- 
           Summary: Cannot compile flac, unable to find register
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aaronw at attbi dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: sparc-sun-solaris2.8


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


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

* [Bug c/12958] Cannot compile flac, unable to find register
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
@ 2003-11-08  4:11 ` aaronw at attbi dot com
  2003-11-08  4:12 ` aaronw at attbi dot com
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: aaronw at attbi dot com @ 2003-11-08  4:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aaronw at attbi dot com  2003-11-08 04:11 -------
Created an attachment (id=5098)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5098&action=view)
Preprocessed file that causes the problem


-- 


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


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

* [Bug c/12958] Cannot compile flac, unable to find register
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
  2003-11-08  4:11 ` [Bug c/12958] " aaronw at attbi dot com
@ 2003-11-08  4:12 ` aaronw at attbi dot com
  2003-11-08  4:16 ` aaronw at attbi dot com
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: aaronw at attbi dot com @ 2003-11-08  4:12 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aaronw at attbi dot com  2003-11-08 04:12 -------
Created an attachment (id=5099)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=5099&action=view)
Original file from flac-1.1.0/src/libFLAC with extra code iffed out


-- 


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


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

* [Bug c/12958] Cannot compile flac, unable to find register
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
  2003-11-08  4:11 ` [Bug c/12958] " aaronw at attbi dot com
  2003-11-08  4:12 ` aaronw at attbi dot com
@ 2003-11-08  4:16 ` aaronw at attbi dot com
  2003-11-08  4:42 ` [Bug optimization/12958] " pinskia at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: aaronw at attbi dot com @ 2003-11-08  4:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From aaronw at attbi dot com  2003-11-08 04:16 -------
Note that if I change from -O2 to -O1 that the bug no longer occurs. 

-- 


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


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

* [Bug optimization/12958] Cannot compile flac, unable to find register
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (2 preceding siblings ...)
  2003-11-08  4:16 ` aaronw at attbi dot com
@ 2003-11-08  4:42 ` pinskia at gcc dot gnu dot org
  2003-11-08 15:45 ` falk at debian dot org
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-08  4:42 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |optimization
           Keywords|                            |ice-on-valid-code


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


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

* [Bug optimization/12958] Cannot compile flac, unable to find register
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (3 preceding siblings ...)
  2003-11-08  4:42 ` [Bug optimization/12958] " pinskia at gcc dot gnu dot org
@ 2003-11-08 15:45 ` falk at debian dot org
  2003-11-10 15:18 ` [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC ebotcazou at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: falk at debian dot org @ 2003-11-08 15:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From falk at debian dot org  2003-11-08 15:45 -------
Confirmed with 3.3.2 and mainline on sparc-sun-solaris2.8. I also need -mcpu=v9.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (4 preceding siblings ...)
  2003-11-08 15:45 ` falk at debian dot org
@ 2003-11-10 15:18 ` ebotcazou at gcc dot gnu dot org
  2003-11-11 18:11 ` ebotcazou at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-11-10 15:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-11-10 15:18 -------
Confirmed with Falk's reduced testcase (-O2 -mcpu=v9) on GCC 3.2.2 and above. It
doesn't ICE with GCC 2.95.3 but fails to assemble so we have kind of a regression.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot gnu dot
                   |                            |org
           Severity|normal                      |critical
  GCC build triplet|                            |sparc-sun-solaris2.8
 GCC target triplet|                            |sparc-sun-solaris2.8
   Last reconfirmed|0000-00-00 00:00:00         |2003-11-10 15:18:58
               date|                            |
            Summary|Cannot compile flac, unable |[3.3/3.4 regression] Spill
                   |to find register            |failure when compiling FLAC
   Target Milestone|---                         |3.3.3


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (5 preceding siblings ...)
  2003-11-10 15:18 ` [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC ebotcazou at gcc dot gnu dot org
@ 2003-11-11 18:11 ` ebotcazou at gcc dot gnu dot org
  2003-11-11 20:45 ` gdr at integrable-solutions dot net
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-11-11 18:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2003-11-11 18:11 -------
The compiler fails to find a register in the class I64_REGS although %o5 and %o7
are available, because HARD_REGNO_MODE_OK returns 0 for them on DImode. It turns
out that hard_regno_mode_classes is hard_32bit_mode_classes even with -mcpu=v9
so, since %o5 and %o7 are odd-numbered, they can't hold a double-word quantity.

Tweaking HARD_REGNO_MODE_OK is not sufficient, because HARD_REGNO_NREGS returns
2 for both registers on DImode and %o6 and %l0 are not usable.

I think this is fixable neither for 3.3.x nor for the upcoming 3.4 release
because this would be too pervasive a change. The workaround is to compile with
-mcpu=v8.

David, I think this would be a good testcase for the "64-bit operations with
32-bit ABI" stuff.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |davem at redhat dot com
           Severity|critical                    |normal
   Target Milestone|3.3.3                       |tree-ssa


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (6 preceding siblings ...)
  2003-11-11 18:11 ` ebotcazou at gcc dot gnu dot org
@ 2003-11-11 20:45 ` gdr at integrable-solutions dot net
  2003-11-14  7:08 ` steven at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-11-11 20:45 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at integrable-solutions dot net  2003-11-11 20:45 -------
Subject: Re:  [3.3/3.4 regression] Spill failure when compiling FLAC

"ebotcazou at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

[...]

| I think this is fixable neither for 3.3.x nor for the upcoming 3.4 release
| because this would be too pervasive a change. The workaround is to
| compile with -mcpu=v8.

Thanks for this detective work!

-- Gaby


-- 


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (7 preceding siblings ...)
  2003-11-11 20:45 ` gdr at integrable-solutions dot net
@ 2003-11-14  7:08 ` steven at gcc dot gnu dot org
  2003-12-01  8:59 ` ebotcazou at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: steven at gcc dot gnu dot org @ 2003-11-14  7:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2003-11-14 07:08 -------
Not a tree-ssa bug, move target to 3.5 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|tree-ssa                    |3.5


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (8 preceding siblings ...)
  2003-11-14  7:08 ` steven at gcc dot gnu dot org
@ 2003-12-01  8:59 ` ebotcazou at gcc dot gnu dot org
  2004-01-14  4:28 ` giovannibajo at libero dot it
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2003-12-01  8:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical


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


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

* [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (9 preceding siblings ...)
  2003-12-01  8:59 ` ebotcazou at gcc dot gnu dot org
@ 2004-01-14  4:28 ` giovannibajo at libero dot it
  2004-02-03  8:48 ` [Bug target/12958] [3.3/3.4/3.5 " ebotcazou at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-14  4:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-01-14 04:28 -------
Given Eric's detailed report, I have no doubt that Mark will postpone the 
milestone, but until then this has to be targeted to 3.4.0. I get Gaby's 
comment as an agreement that this will not be fixed for 3.3.x.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |3.4.0


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


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

* [Bug target/12958] [3.3/3.4/3.5 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (10 preceding siblings ...)
  2004-01-14  4:28 ` giovannibajo at libero dot it
@ 2004-02-03  8:48 ` ebotcazou at gcc dot gnu dot org
  2004-03-15 20:15 ` ebotcazou at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-02-03  8:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-02-03 08:48 -------
This is a problem in the SPARC back-end.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|optimization                |target


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


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

* [Bug target/12958] [3.3/3.4/3.5 regression] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (11 preceding siblings ...)
  2004-02-03  8:48 ` [Bug target/12958] [3.3/3.4/3.5 " ebotcazou at gcc dot gnu dot org
@ 2004-03-15 20:15 ` ebotcazou at gcc dot gnu dot org
  2004-03-16  2:56 ` [Bug target/12958] " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-15 20:15 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ebotcazou at gcc dot gnu dot org  2004-03-15 20:15 -------
Mark, as I said in the initial analysis, I don't think the bug can be fixed on
the 3.4 branch.  This is a consequence of the "64-bit insns with 32-bit ABI"
trick on SPARC, which was IMHO poorly designed.  Moreover, this is not really a
regression since the code produced by GCC 2.95.3 with the same options is not
assemblable.

Am I allowed to degrade its status from regression to normal bug and re-target
it to 3.5?  Thanks in advance.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mark at codesourcery dot com


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


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

* [Bug target/12958] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (12 preceding siblings ...)
  2004-03-15 20:15 ` ebotcazou at gcc dot gnu dot org
@ 2004-03-16  2:56 ` mmitchel at gcc dot gnu dot org
  2004-03-20 22:07 ` ebotcazou at gcc dot gnu dot org
  2004-07-04 23:35 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-16  2:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-16 02:56 -------
On the basis of Eric's analysis, I've downgraded this to an ordinary bug (as
opposed to a regression), removed the target milestone, and removed the
known-to-work entry.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|2.95.3                      |
            Summary|[3.3/3.4/3.5 regression]    |Spill failure when compiling
                   |Spill failure when compiling|FLAC
                   |FLAC                        |
   Target Milestone|3.4.0                       |3.5.0


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


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

* [Bug target/12958] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (13 preceding siblings ...)
  2004-03-16  2:56 ` [Bug target/12958] " mmitchel at gcc dot gnu dot org
@ 2004-03-20 22:07 ` ebotcazou at gcc dot gnu dot org
  2004-07-04 23:35 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2004-03-20 22:07 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


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


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

* [Bug target/12958] Spill failure when compiling FLAC
  2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
                   ` (14 preceding siblings ...)
  2004-03-20 22:07 ` ebotcazou at gcc dot gnu dot org
@ 2004-07-04 23:35 ` pinskia at gcc dot gnu dot org
  15 siblings, 0 replies; 17+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-07-04 23:35 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.5.0                       |---


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


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

end of thread, other threads:[~2004-07-04 23:35 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-08  4:10 [Bug c/12958] New: Cannot compile flac, unable to find register aaronw at attbi dot com
2003-11-08  4:11 ` [Bug c/12958] " aaronw at attbi dot com
2003-11-08  4:12 ` aaronw at attbi dot com
2003-11-08  4:16 ` aaronw at attbi dot com
2003-11-08  4:42 ` [Bug optimization/12958] " pinskia at gcc dot gnu dot org
2003-11-08 15:45 ` falk at debian dot org
2003-11-10 15:18 ` [Bug optimization/12958] [3.3/3.4 regression] Spill failure when compiling FLAC ebotcazou at gcc dot gnu dot org
2003-11-11 18:11 ` ebotcazou at gcc dot gnu dot org
2003-11-11 20:45 ` gdr at integrable-solutions dot net
2003-11-14  7:08 ` steven at gcc dot gnu dot org
2003-12-01  8:59 ` ebotcazou at gcc dot gnu dot org
2004-01-14  4:28 ` giovannibajo at libero dot it
2004-02-03  8:48 ` [Bug target/12958] [3.3/3.4/3.5 " ebotcazou at gcc dot gnu dot org
2004-03-15 20:15 ` ebotcazou at gcc dot gnu dot org
2004-03-16  2:56 ` [Bug target/12958] " mmitchel at gcc dot gnu dot org
2004-03-20 22:07 ` ebotcazou at gcc dot gnu dot org
2004-07-04 23:35 ` pinskia 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).