------- Comment #1 from acahalan at gmail dot com 2006-10-12 01:20 ------- Other ways to ICE gcc:
/////////////////////// typedef struct S { unsigned long flags; }S_t; typedef S_t __attribute__((__may_alias__)) cmonkey; S_t *handler(void *vp) { cmonkey *cm = vp; return cm; } //////////////////////// typedef struct S { unsigned long flags; }S_t; typedef S_t __attribute__((__may_alias__)) cmonkey; S_t handler(void *vp) { cmonkey *cm = vp; return *cm; } ////////////////////// typedef struct S { unsigned long flags; }S_t; typedef S_t __attribute__((__may_alias__)) cmonkey; int handler(void *vp) { S_t dp; cmonkey *cm = vp; dp = *cm; } /////////////////// typedef struct S { unsigned long flags; }S_t; typedef S_t __attribute__((__may_alias__)) cmonkey; int handler(void *vp) { S_t * dp; cmonkey *cm = vp; *dp = *cm; } //////////////////////// Besides a fix, I could use some workaround suggestions. This itself is an attempted workaround for a suspected bug involving memcpy, so that won't do. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29436