This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/44589] New: Missing not-set diagnositic (as READ arguments are clobbered)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]