This might be related to PR20447 or PR18592. $ m68k-linux-gcc -O -S iso-2022-cn-ext.i iso-2022-cn-ext.i: In function ‘gconv’: iso-2022-cn-ext.i:85: internal compiler error: output_operand: invalid expression as operand Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 8430 [details] Testcase
That's the same one I mentioned in http://gcc.gnu.org/ml/gcc/2005-03/msg00991.html I was going to report it, but you beat me to it, and you did a better job of minimizing the test case thank I did. Thanks! What does it take to confirm the bug?
Still seeing this on 4.0.0-rc1.
Confirmed.
Still seeing this on gcc-4.0.1-20050702.
m68k is not a primary or secondary platform; removing target milestone.
Reduced down to: void bar (unsigned int); void foo (void) { char buf[1] = { 3 }; const char *p = buf; const char **q = &p; unsigned int ch; switch (**q) { case 1: ch = 5; break; case 2: ch = 4; break; case 3: ch = 3; break; case 4: ch = 2; break; case 5: ch = 1; break; default: ch = 0; break; } bar (ch); } This is one of those rare cases where CSE1 folds a switch statement.
Subject: Bug 20583 Author: kazu Date: Mon Nov 21 04:41:38 2005 New Revision: 107278 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107278 Log: gcc/ PR middle-end/20583 * cse.c (cse_insn): Reject invalid forms of CONST earlier. gcc/testsuite/ PR middle-end/20583 * gcc.c-torture/compile/pr20583.c: New. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr20583.c Modified: trunk/gcc/ChangeLog trunk/gcc/cse.c trunk/gcc/testsuite/ChangeLog
Subject: Bug 20583 Author: kazu Date: Mon Nov 21 06:52:01 2005 New Revision: 107281 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107281 Log: gcc/ PR middle-end/20583 * cse.c (cse_insn): Reject invalid forms of CONST earlier. gcc/testsuite/ PR middle-end/20583 * gcc.c-torture/compile/pr20583.c: New. Added: branches/gcc-4_1-branch/gcc/testsuite/gcc.c-torture/pr20583.c Modified: branches/gcc-4_1-branch/gcc/ChangeLog branches/gcc-4_1-branch/gcc/cse.c branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
Fixed in 4.1.0 and above for now.
Unassignining myself.
*** Bug 28092 has been marked as a duplicate of this bug. ***
Fixed in 4.1.0.