http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46937
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2010.12.14 14:36:06 CC| |burnus at gcc dot gnu.org Target Milestone|--- |4.6.0 Ever Confirmed|0 |1 --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> 2010-12-14 14:36:06 UTC --- Confirmed. Thanks for the report! The function annotation patch (PR 43665) was seemingly too eager. The problem is that the object itself ("t") may not be changed - but pointers it contains may. In that sense, it resembles a bit PR 45586. Patch: --- a/gcc/fortran/trans-types.c +++ b/gcc/fortran/trans-types.c @@ -2325,7 +2325,11 @@ create_fn_spec (gfc_symbol *sym, tree fntype) if (spec_len < sizeof (spec)) { if (!f->sym || f->sym->attr.pointer || f->sym->attr.target - || f->sym->attr.external || f->sym->attr.cray_pointer) + || f->sym->attr.external || f->sym->attr.cray_pointer + || (f->sym->ts.type == BT_DERIVED + && f->sym->ts.u.derived->attr.pointer_comp) + || (f->sym->ts.type == BT_CLASS + && CLASS_DATA (f->sym)->ts.u.derived->attr.pointer_comp)) spec[spec_len++] = '.'; else if (f->sym->attr.intent == INTENT_IN) spec[spec_len++] = 'r';