Bug 20191 - [3.4 Regression] ICE in reload_cse_simplify_operands, on powerpc linux
Summary: [3.4 Regression] ICE in reload_cse_simplify_operands, on powerpc linux
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.4
: P2 normal
Target Milestone: 3.4.5
Assignee: Janis Johnson
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code, patch
: 22081 (view as bug list)
Depends on:
Reported: 2005-02-24 14:50 UTC by Stéphane Goujet
Modified: 2005-07-21 22:25 UTC (History)
4 users (show)

See Also:
Target: powerpc-*-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2005-06-15 18:24:46

preprocessed objective-c file (68.90 KB, application/octet-stream)
2005-02-24 14:51 UTC, Stéphane Goujet

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Goujet 2005-02-24 14:50:00 UTC
Here is the output of gcc when compiling NSTextView.m :

Reading specs from /usr/local/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/specs
Configured with: ../gcc-3.4-20050218/configure --enable-threads --enable-
altivec --enable-languages=c,objc
Thread model: posix
gcc version 3.4.4 20050218 (prerelease)
 /usr/local/libexec/gcc/powerpc-unknown-linux-gnu/3.4.4/cc1obj -E -quiet -v -
I ../Headers/ -I /usr/GNUstep/System/Library/Headers/ -D__unix__ -
D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -
Asystem=unix -Asystem=posix NSTextView.m -fconstant-string-
class=NSConstantString -O2 -o NSTextView.mi
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/lib/gcc/powerpc-unknown-linux-
#include "..." search starts here:
#include <...> search starts here:
End of search list.
 /usr/local/libexec/gcc/powerpc-unknown-linux-gnu/3.4.4/cc1obj -fpreprocessed 
NSTextView.mi -quiet -dumpbase NSTextView.m -auxbase NSTextView -O2 -version -
fconstant-string-class=NSConstantString -o NSTextView.s
GNU Objective-C version 3.4.4 20050218 (prerelease) (powerpc-unknown-linux-gnu)
	compiled by GNU C version 4.0.0 20050213 (experimental).
GGC heuristics: --param ggc-min-expand=51 --param ggc-min-heapsize=39686
NSTextView.m: In function `-[NSTextView(GSTextView) sync::updateState:]':
NSTextView.m:371: warning: `NSTextView' may not respond to `-
NSTextView.m:371: warning: (Messages without a matching method signature
NSTextView.m:371: warning: will be assumed to return `id' and accept
NSTextView.m:371: warning: `...' as arguments.)
NSTextView.m: At top level:
NSTextView.m:2341: warning: incomplete implementation of class `NSTextView'
NSTextView.m:2341: warning: method definition for `-selectedRange' not found
NSTextView.m:2341: warning: class `NSTextView' does not fully implement the 
`NSTextInput' protocol
NSTextView.m: In function `-[NSTextView setConstrainedFrameSize:]':
NSTextView.m:1574: error: insn does not satisfy its constraints:
(insn:HI 144 139 140 14 (set (reg:SF 66 ctr [orig:164 
<variable>._maxSize.width ] [164])
        (reg:SF 66 ctr [162])) 252 {*movsf_hardfloat} (nil)
NSTextView.m:1574: internal compiler error: in reload_cse_simplify_operands, 
at postreload.c:391
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Stéphane Goujet 2005-02-24 14:51:56 UTC
Created attachment 8270 [details]
preprocessed objective-c file
Comment 2 Andrew Pinski 2005-02-24 15:01:21 UTC
(insn:HI 144 139 140 14 (set (reg:SF 66 ctr [orig:164 
<variable>._maxSize.width ] [164])
        (reg:SF 66 ctr [162])) 252 {*movsf_hardfloat} (nil)

This looks like either a target problem or a reload problem.  The reason why it is hard to reduce is 
because you need the right situation to reproduce this bug, mainly using the ctr register for floating 
point which really does not work.
Comment 3 David Edelsohn 2005-02-24 15:51:23 UTC
The 0->!h alternative should match.

Completely preventing SFmode from being placed in CTR can cause more problems,
but we can do a better job to avoid preferencing that class.  I would suggest
trying changing




so that the register allocator does not use those special registers for
preferencing decisions.  See if that helps.
Comment 4 Andrew Pinski 2005-06-15 18:19:03 UTC
*** Bug 22081 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Pinski 2005-06-15 18:20:53 UTC
From the dup bug:
GCC 3.3.5 doesn't get the error, so it's a regression.  GCC 4.0.x and
mainline don't get the error; it was fixed this this patch to mainline
by dalej:
Comment 6 Janis Johnson 2005-06-15 18:24:46 UTC
I'm about to submit dalej's patch for the 3.4 branch, so I'll take this (the
duplicate 22081 was mine).
Comment 7 Andrew Pinski 2005-06-15 20:16:10 UTC
Patch posted here: <http://gcc.gnu.org/ml/gcc-patches/2005-06/msg01302.html>.
Comment 8 CVS Commits 2005-07-21 21:57:15 UTC
Subject: Bug 20191

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	janis@gcc.gnu.org	2005-07-21 21:57:05

Modified files:
	gcc            : ChangeLog 
	gcc/config/rs6000: rs6000.md 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.c-torture/compile: 20050721-1.c 

Log message:
	PR target/20191
	Backport from mainline:
	2004-04-23  Dale Johannesen  <dalej@apple.com>
	* config/rs6000.md (movsf_hardfloat): Add POWER form of nop.
	(movdf_hardfloat64):  Ditto.
	(movdf_softfloat64):  Ditto.
	* config/rs6000.md (movsf_hardfloat): Accept CTR-to-CTR copy.
	(movdf_hardfloat64):  Ditto.
	PR target/20191
	* gcc.c-torture/compile/20050721-1.c: New test.


Comment 9 Janis Johnson 2005-07-21 22:25:58 UTC
Fixed on the 3.4 branch.