Bug 44626 - [4.4 regression] ICE in output_operand: invalid expression as operand
Summary: [4.4 regression] ICE in output_operand: invalid expression as operand
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.4
: P3 normal
Target Milestone: 4.5.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2010-06-22 08:57 UTC by Matthias Klose
Modified: 2012-03-13 13:04 UTC (History)
2 users (show)

See Also:
Host:
Target: arm-linux-gnueabi
Build:
Known to work: 4.3.5 4.5.0
Known to fail: 4.4.4
Last reconfirmed: 2010-07-03 00:03:10


Attachments
preprocessed source (64.05 KB, application/x-gzip)
2010-06-22 08:57 UTC, Matthias Klose
Details
backport Nathan Sidwell's movw fix to 4.4 (1.54 KB, patch)
2010-06-22 18:14 UTC, Mikael Pettersson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2010-06-22 08:57:37 UTC
seen with 4.4 with -O1 -march=armv7-a -mthumb, works with 4.3 and 4.5, work around in 4.4 with -O0, -O2, or -O1 -marm

$ gcc-4.4 -fno-strict-aliasing -O1 -g -c afs_vnop_link.i 
/home/packages/tmp/openafs-1.4.12.1+dfsg/src/afs/VNOPS/afs_vnop_link.c: In function 'afs_link':
/home/packages/tmp/openafs-1.4.12.1+dfsg/src/afs/VNOPS/afs_vnop_link.c:164: internal compiler error: output_operand: invalid expression as operand
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 1 Matthias Klose 2010-06-22 08:57:57 UTC
Created attachment 20975 [details]
preprocessed source
Comment 2 Mikael Pettersson 2010-06-22 18:14:14 UTC
Created attachment 20982 [details]
backport Nathan Sidwell's movw fix to 4.4

This ICE was fixed for 4.5 by r148788, Nathan Sidwell's "[ARM] movw fix", see http://gcc.gnu.org/ml/gcc-patches/2009-06/msg01358.html.

The attached patch backports that fix to current 4.4, which fixes the ICE.  I've had this in my 4.4 tree since July 2009, so I'm confident it's solid.

Matthias, does this patch work for you?
Comment 3 Matthias Klose 2010-06-22 22:05:30 UTC
yes, the ICE is fixed with this patch
Comment 4 Ramana Radhakrishnan 2010-07-03 00:03:10 UTC
Can this patch be submitted to gcc-patches@gcc.gnu.org after due testing ? 
Comment 5 Mikael Pettersson 2010-07-03 19:53:39 UTC
(In reply to comment #4)
> Can this patch be submitted to gcc-patches@gcc.gnu.org after due testing ? 

Yes.  Although I've tested this many times it's always been together with many other patches.  I'm now running a 4.4 bootstrap+regtest with only this one applied.  Will submit the patch once that succeeds, which should be less than 24 hours from now.
Comment 6 Mikael Pettersson 2010-07-04 19:54:17 UTC
Patch posted after successful (re)testing:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00331.html
Comment 7 Jakub Jelinek 2012-03-13 13:04:38 UTC
Fixed in 4.5+, 4.4 is no longer supported.