Bug 31279 - Uninitialized warning for call-by-reference arguments with known intent(in)
Uninitialized warning for call-by-reference arguments with known intent(in)
Status: NEW
Product: gcc
Classification: Unclassified
Component: middle-end
4.3.0
: P3 enhancement
: ---
Assigned To: Not yet assigned to anyone
: diagnostic
Depends on: 31094
Blocks: Wuninitialized
  Show dependency treegraph
 
Reported: 2007-03-20 15:41 UTC by Tobias Burnus
Modified: 2013-06-25 09:10 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2012-02-02 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2007-03-20 15:41:56 UTC
In Fortran one can specify the intent of variables thus if all arguments have INTENT(IN) then GCC should be able to detect that alist in the call to cshift is uninitialized.

This depends on the middle end support of intents (PR31094) plus using these in gfortran.

Example (using an intrinsic function):

program testcshft
  integer :: alist(4)
  alist =cshift(alist,-1)
  write(*,*) alist
end program testcshft
Comment 1 Andrew Pinski 2012-02-02 17:49:32 UTC
Confirmed.
Comment 2 Dominique d'Humieres 2013-06-25 09:10:09 UTC
Still no warning at revision 200371.