Bug 31284 - Uninitialized variable not detected
Summary: Uninitialized variable not detected
Status: RESOLVED DUPLICATE of bug 19430
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2007-03-20 17:37 UTC by Tobias Burnus
Modified: 2007-03-20 17:43 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2007-03-20 17:37:34 UTC
In the following program, the uninitialized "i" is only detected if one uncomments the print statement.

program test
implicit none
integer :: i,j
j = i*5
print*,i
end program test
Comment 1 Tobias Burnus 2007-03-20 17:38:26 UTC
Forgot to write that this is a Fortran program. Use
  gfortran -Wall -O
to compile it.
Comment 2 Andrew Pinski 2007-03-20 17:43:00 UTC
And the issue here is really PR19430

For some reason gfortran decided that print will cause a pass via reference :).

*** This bug has been marked as a duplicate of 19430 ***