This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/44589] New: Missing not-set diagnositic (as READ arguments are clobbered)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Jun 2010 09:24:55 -0000
- Subject: [Bug fortran/44589] New: Missing not-set diagnositic (as READ arguments are clobbered)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Follow up to PR 44582
No warning is printed for the following program. Expected:
a) A warning about the unset return value
b) A warning about using the variable uninitialized.
There are two issues:
a) It should be found by the front end
b) It should be found by the middle end. The reason that the latter does not
work is that gfortran uses:
_gfortran_transfer_integer (&dt_parm.1, &a, 4);
as the transfer function is called for both READ and WRITE it is annotated only
such that the pointer do not escape; for reading it should also be marked as
read only/unclobbered. Cf. http://gcc.gnu.org/ml/fortran/2010-05/msg00124.html
, http://gcc.gnu.org/ml/fortran/2010-04/msg00012.html and PR 43665
function ddx()
double precision:: ddx(2,2)
print *, ddx(1,1)
end function ddx
--
Summary: Missing not-set diagnositic (as READ arguments are
clobbered)
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
BugsThisDependsOn: 43665
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44589