This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/20583] [4.0/4.1 regression] ICE in output_operand: invalid expression as operand
- From: "kazu at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Nov 2005 02:10:07 -0000
- Subject: [Bug target/20583] [4.0/4.1 regression] ICE in output_operand: invalid expression as operand
- References: <bug-20583-50@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from kazu at gcc dot gnu dot org 2005-11-06 02:10 -------
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.
--
kazu at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kazu at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20583