http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45777
--- Comment #6 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2010-11-30 16:40:10 UTC --- At least one problem occurs because the typespec of rref->u.c.sym is not filled out correctly when chasing the refs on the rhs: (gdb) p rref No symbol "rref" in current context. (gdb) up #1 0x000000000054ceaa in gfc_could_be_alias (lss=<value optimized out>, rss=<value optimized out>) at ../../trunk/gcc/fortran/trans-array.c:3501 3501 if (gfc_symbols_could_alias (rref->u.c.sym, lsym)) (gdb) p rref $6 = (gfc_ref *) 0x1458b90 (gdb) p rref->u.c.sym $7 = (gfc_symbol *) 0x1454230 (gdb) p *(rref->u.c.sym) $8 = {name = 0x7ffff5d11f98 "t1", module = 0x7ffff5d11f88 "m1", declared_at = {nextc = 0x14507f0, lb = 0x14507b0}, ts = {type = BT_UNKNOWN, kind = 0, u = {derived = 0x0, cl = 0x0, pad = 0}, (gdb) p rref->u.c.sym.ts $10 = {type = BT_UNKNOWN, kind = 0, u = {derived = 0x0, cl = 0x0, pad = 0}, interface = 0x0, is_c_interop = 0, is_iso_c = 0, f90_type = BT_UNKNOWN, deferred = 0 '\000'} Thus, gfc_symbols_could_alias has no chance of checking for type equivalence.