This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/29584] [4.0/4.1 Regression] internal compiler error on optimization
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Nov 2006 14:45:14 -0000
- Subject: [Bug middle-end/29584] [4.0/4.1 Regression] internal compiler error on optimization
- References: <bug-29584-13459@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from jakub at gcc dot gnu dot org 2006-11-16 14:45 -------
This has nothing to do with overflows, there are none.
Here is a simplified testcase:
extern void *foo1 (void);
extern void foo2 (void);
extern void foo3 (void *, void *);
extern int foo4 (void);
void
bar (void)
{
int i;
void *s;
for (i = 1; i < 4; i++)
{
if (foo4 ())
foo2 ();
switch (0x8000000UL + i * 0x400)
{
case 0x80000000UL ... 0x80000000UL + 0x3a000000UL - 1:
s = 0;
break;
default:
s = foo1 ();
}
foo3 ((void *) (0x8000000UL + i * 0x400), s);
}
}
The problem is different, dom3 transforms:
void * ivtmp.40;
long unsigned int D.1646;
...
D.1646_28 = (long unsigned int) ivtmp.40_26;
D.1646_7 = D.1646_28;
switch (D.1646_7)
{
case 2147483648 ... 3120562175: goto <L5>;
default : goto <L4>;
}
into:
void * ivtmp.40;
long unsigned int D.1646;
...
D.1646_28 = (long unsigned int) ivtmp.40_26;
D.1646_7 = D.1646_28;
switch (ivtmp.40_26)
{
case 2147483648 ... 3120562175: goto <L5>;
default : goto <L4>;
}
(note, void * type of switch control expression) and expand isn't able to cope
with that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29584