Am 19.08.2012 21:19, schrieb Thomas Koenig:
Build and regtested on x86-64-gnu-linux.
OK for the trunk?
I would exclude pointers on the lhs of the pointer assignment,
I assume you mean RHS – excluding LHS pointers in pointer assignments is
kind of difficult ;-)
RHS pointers are excluded via:
+ if (gfc_option.warn_target_lifetime
+ && rvalue->expr_type == EXPR_VARIABLE
+ && !rvalue->symtree->n.sym->attr.save
+ && !attr.pointer && !rvalue->symtree->n.sym->attr.host_assoc
the attr is set via:
attr = gfc_expr_attr (rvalue);
to make sure that warnings for code such as
are not emitted.
There is no warning with the patch.
Tobias