http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59344
Bug ID: 59344
Summary: warning for needless pointer attribute
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: Joost.VandeVondele at mat dot ethz.ch
In many cases, using variables with a POINTER attribute is neither necessary
nor beneficial. I wonder if the Fortran FE could generate a warning for
variables with the POINTER attribute that could as well be ALLOCATABLE without
changing the semantics of the program.
my guess would be that it is sufficient to track if a local variables with the
pointer attribute has been
1) part of a pointer assignment (lhs/rhs)
2) passed to a procedure with an explicit interface and pointer attribute
3) ?
Such a warning would be useful to clean codes of pointer 'abuse'