Bug 34688

Summary: [4.1/4.2] ICE: output_operand: invalid expression as operand
Product: gcc Reporter: Martin Michlmayr <tbm>
Component: middle-endAssignee: Maxim Kuvyrkov <mkuvyrkov>
Status: RESOLVED FIXED    
Severity: normal CC: debian-gcc, gcc-bugs, mkuvyrkov, zippel
Priority: P3    
Version: 4.2.3   
Target Milestone: 4.2.4   
Host: Target: m68k-linux-gnu
Build: Known to work: 4.2.4 4.3.0
Known to fail: 4.1.3 4.2.3 Last reconfirmed: 2008-01-07 14:04:18
Attachments: preprocessed source

Description Martin Michlmayr 2008-01-06 18:21:53 UTC
[ Forwarded from http://bugs.debian.org/459429 ]

With 4.1 and 4.2 we get the following ICE on m68k with -O2.  This doesn't
happen with 4.3.

(etch)3889:tbm@em64t: ..-m68k-20080106-r131352/gcc] ./xgcc -B. -c -O2 ~/erlexec.preprocessed.4.2.c
./erlexec.c: In function ‘build_args_from_string’:
./erlexec.c:1364: internal compiler error: output_operand: invalid expression as operand
Please submit a full bug report,
Comment 1 Martin Michlmayr 2008-01-06 18:23:51 UTC
Created attachment 14887 [details]
preprocessed source
Comment 2 Richard Biener 2008-01-25 20:25:40 UTC
If this isn't a regression please close it as fixed in 4.3.  Otherwise please
adjust the Summary and the target milestone.
Comment 3 Maxim Kuvyrkov 2008-01-26 23:09:44 UTC
Subject: Bug 34688

Author: mkuvyrkov
Date: Sat Jan 26 23:08:54 2008
New Revision: 131878

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131878
Log:
	PR middle-end/34688
	* final.c (output_addr_const): Handle TRUNCATE.

	* gcc.c-torture/compile/pr34688: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr34688.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/final.c
    trunk/gcc/testsuite/ChangeLog

Comment 4 Maxim Kuvyrkov 2008-01-27 18:47:25 UTC
Fixed in the above revision.
Comment 5 Debian GCC Maintainers 2008-01-27 19:27:52 UTC
the fix was checked in on the trunk only; please reopen the report
Comment 6 Maxim Kuvyrkov 2008-01-27 21:32:34 UTC
Right, sorry.
Comment 7 Maxim Kuvyrkov 2008-03-25 15:26:23 UTC
Subject: Bug 34688

Author: mkuvyrkov
Date: Tue Mar 25 15:25:37 2008
New Revision: 133521

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133521
Log:
	Backport from mainline:
	
	PR middle-end/34688
	* final.c (output_addr_const): Handle TRUNCATE.

	PR middle-end/34688
	* gcc.c-torture/compile/pr34688: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/compile/pr34688.c
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/final.c
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog

Comment 8 Maxim Kuvyrkov 2008-03-25 15:26:28 UTC
Fixed on 4.2 as well.
Comment 9 Richard Biener 2008-03-25 15:48:51 UTC
wontfix on the 4.1 branch.