[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::fortran

Title:Digital Fortran
Notice:Read notes 1.* for important information
Moderator:QUARK::LIONEL
Created:Thu Jun 01 1995
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1333
Total number of notes:6734

1160.0. "SEPARATE_COMPILATION & LIST don't work together" by CSC32::EHA (Flip) Tue Feb 04 1997 17:03

    Hello,
    
    A customer is seeing something strange with the combination of
    SEPARATE_COMPILATION and LIST qualifiers.  The following log shows the
    problem.
    
    $ create t.for
          subroutine t(i)
          write (6,10)
    00010 format (' In subroutine t')
          return
          end
          subroutine t3
          write (6,10)
    00010 format (' In subroutine t3')
          return
          end
    $ create t2.for
          include 't.for/list'
          subroutine t2(i)
          write (6,10)
    00010 format (' In subroutine t2')
          return
          end
    $ create tmain.for
            program tmain
            call t
            call t2
            call t3
            end
    $ fortran tmain
    $ fortran/list t2
    $ link tmain,t2
    $ fortran/separate_compilation t2
    $ link tmain,t2
    $ fortran/separate_compilation/list t2
    $ link tmain,t2
    %LINK-W-NUDFSYMS, 1 undefined symbol:
    %LINK-I-UDFSYM,         T2
    %LINK-W-USEUNDEF, undefined symbol T2 referenced<CR><LF>        in
    psect $LINK$
    
    
    This is compiled and linked on an Alpha VMS V6.2 machine with the
    Fortran 77 X7.0-42-3278 compiler.  
    
    Thank you!
    Al
    Digital Customer Support
T.RTitleUserPersonal
Name
DateLines
1160.1QUARK::LIONELFree advice is worth every centTue Feb 04 1997 17:243
... and F90 gets a bugcheck when compiling T2 with /SEPARATE/LIST - arrrgh.

					Steve
1160.2LookingTLE::EKLUNDAlways smiling on the inside!Tue Feb 04 1997 17:599
    	Yep, that sure looks like a bug.  We'll take a look.
    There were problems in the past with processing an
    include statement (and losing the next statement).
    However, this looks a little different.  I could not
    find a simple workaround for you.
    
    Cheers!
    Dave Eklund
    
1160.3Thanx!CSC32::EHAFlipThu Feb 06 1997 11:187
    I told the customer to compile the code without the listing qualifier
    and things should work.
    
    Thank you for confirming this feature.  I hate the word "bug".  Please
    let me know when you have something.
    
    Al
1160.4TLE::EKLUNDAlways smiling on the inside!Thu Feb 06 1997 18:0611
    	This one is ugly (in f77 compiler).  It will take some
    time to figure it out and fix it safely.  I'm not sure
    how to characterize the bug, but it's clearly broken.
    I'll keep you posted here.
    
    Cheers!
    Dave Eklund
    
    PS Thanks for the simple example!
    Dave E
    
1160.5FixedTLE::EKLUNDAlways smiling on the inside!Wed Feb 12 1997 11:4921
    	This was a fairly nasty bug to fix.  When you use
    /SEPARATE, the compiler does a lot of work whenever it
    encounters an END statement, processing the program unit
    just completed.  If you have also given /LIST, this
    includes some code which wasn't quite correct.  The
    intent of the code was to close previously open files
    which were no longer needed.  Unfortunately, for cases
    like your example, the code actually closed the file
    containing the INCLUDE statement.  When we attempted to
    return to that source file, we detected that it was
    already closed, and assumed that it was at end-of-file,
    and that we were done.
    
    	This results in the rest of the file (everything
    after the INCLUDE statement) being "lost", as you observed.
    We have fixed this bug.  Removing /LIST is the simplest
    workaround.  Thanks again for the simple example!
    
    Cheers!
    Dave Eklund
    
1160.6Always good hearing that things are fixed! :)CSC32::EHAFlipWed Feb 19 1997 12:277
    Thank you for the bug being fixed.  I assume that it will be out in a
    future release. 
    
    I wish I could say that I came up with the short example, but it was
    the customer and I will pass your thanx to them.
    
    Al