User account creation filtered due to spam.

Bug 35234 - Undetected "use before definition".
Summary: Undetected "use before definition".
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: diagnostic
Depends on:
Reported: 2008-02-17 15:44 UTC by Dominique d'Humieres
Modified: 2016-11-30 11:44 UTC (History)
4 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2015-08-12 00:00:00


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

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 
      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 ***
Comment 3 Manuel López-Ibáñez 2015-08-12 14:28:24 UTC
(In reply to Francois-Xavier Coudert from comment #2)
> It's indeed a duplicate of 27120.

It seems it wasn't.