[Bug tree-optimization/34113] [4.3 Regression] ICE in get_addr_dereference_operands, at tree-ssa-operands.c:1746
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Nov 16 11:04:00 GMT 2007
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-11-16 11:03 -------
We have wrong types in the IL before forwprop3:
struct sockaddr_in * saddr.3;
struct in_addr * D.1627;
unsigned char * addr;
unsigned char D.1580;
...
<L13>:;
saddr.3_22 = (struct sockaddr_in *) D.1577_5;
D.1627_23 = &saddr.3_22->sin_addr;
addr_4 = D.1627_23;
D.1580_9 = *addr_4;
the conversion between D.1627_23 and addr_4 is not useless.
Reduced testcase:
struct sockaddr_in { int sin_addr; };
static void ConvertAddr (struct sockaddr_in *saddr, void **addr)
{
*addr = (void *) &saddr->sin_addr;
}
unsigned char EnableLocalHost (struct sockaddr_in *ifa_addr)
{
unsigned char * addr;
ConvertAddr(ifa_addr, (void **)&addr);
return addr[0];
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34113
More information about the Gcc-bugs
mailing list