[Bug middle-end/52493] [4.8 Regression] tree check fail in ptr_derefs_may_alias_p
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Mar 6 10:59:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52493
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-03-06 10:58:55 UTC ---
Reduced testcase, fails at -O -ftree-vectorize:
struct Time {
long int sec;
long usec;
};
struct Flow {
unsigned short iif;
struct Time mtime;
};
struct NetFlow {
unsigned MaxFlows;
unsigned HeaderFields;
unsigned short *HeaderFormat;
};
static struct NetFlow *netflow;
static struct Time start_time;
static unsigned char emit_packet[1500];
inline long int cmpmtime(struct Time *t1, struct Time *t2)
{
return (t1->sec - t2->sec) * 1000 + (t1->usec - t2->usec) / 1000;
}
static void fill(int fields, unsigned short *format,
struct Flow *flow, void *p)
{
int i;
for (i = 0; i < fields; i++)
if (format[i] == 21)
{
unsigned int __v;
__v = cmpmtime(&flow->mtime, &start_time);
*((unsigned int *) p) = __v;
}
}
void emit_thread()
{
fill(netflow->HeaderFields, netflow->HeaderFormat, 0, &emit_packet);
}
I have a patch.
More information about the Gcc-bugs
mailing list