------- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-14 16:45 ------- Reduced testcase:
typedef struct { char ch[3]; } pstr; const pstr ao = { "OK" }; const pstr * const a = &ao; void test1(void) { ((char *)a->ch)[2] = 0; } aliasing chokes on gimplification stripping 02.original *((char *) (const char *) &ao.ch + 2B) = 0; down to 03.gimple char * D.1238; D.1238 = &ao.ch[0] + 2B; *D.1238 = 0; which has "confused" types for the rhs of D.1238 = &ao.ch[0] + 2B; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21541