GCC Bugzilla will be upgraded from version 4.4.9 to 5.0rc3 on Saturday, April 25, starting around 17:00 UTC. The upgrade process should only last a few minutes. Check bug 64968 for details.
Bug 35234 - Undetected "use before definition".
Undetected "use before definition".
Status: RESOLVED DUPLICATE of bug 27120
Product: gcc
Classification: Unclassified
Component: fortran
4.3.0
: P3 enhancement
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-02-17 15:44 UTC by Dominique d'Humieres
Modified: 2009-03-28 13:39 UTC (History)
3 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 Dominique d'Humieres 2008-02-17 15:44:32 UTC
In the code from

http://groups.google.fr/group/comp.lang.fortran/browse_thread/thread/120303aae031b672/7dd83bc30a9f19a3#7dd83bc30a9f19a3

gfortran detect the problems coming from the undefined 'j', but not the fact that 'df4_dxi'  is used before it is defined.  Am I missing a relevant option or is it a missing feature/bug in gfortran/gcc?
Comment 1 Dominique d'Humieres 2008-03-16 13:46:39 UTC
Reduced test case:

      program prandtl meyer 
      implicit none 
      integer :: i, j 
      integer, parameter :: imax = 100 
      integer, parameter :: jmax =  40 
      real, dimension(0:jmax,0:imax) :: f1, f1_bar
      do i = 0, imax-1 
         do j = 1, jmax-1 
            f1_bar(j,i+1) = f1(j,i)
         end do 
      end do 
      stop 
      end program prandtl meyer 

[ibook-dhum] f90/bug% gfc -O -Wuninitialized -Wall timing/prandtl_red.f
[ibook-dhum] f90/bug%

I think it is a duplicate of PR27120.

Comment 2 Francois-Xavier Coudert 2009-03-28 13:39:48 UTC
It's indeed a duplicate of 27120.

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