------- 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