SGI introduced a bug in 7.41 compiler?

From: Bil Kleb (Bil.Kleb_at_NASA.Gov)
Date: 09/21/04


Date: Tue, 21 Sep 2004 11:09:08 -0400

According to ifc, ifort, lf95, nagf95, nasf95, pgf90, and the
7.3.1.2m version of SGI's f90 compiler, the follow code is ok:

module cat
   integer :: a = 1
end module cat

module puppy
contains
   subroutine one
     use cat, only : a_local=>a
     write(*,*) 'a_local = ', a_local
   end subroutine one
   subroutine two
     use cat, only : a_local=>a
     write(*,*) 'a_local = ', a_local
   end subroutine two
end module puppy

program main
   use puppy, only : one, two
   call one
   call two
end program main

However, version 7.41 of SGI's compiler does not think so:

% f90 -version
MIPSpro Compilers: Version 7.41
% f90 local_rename.f90

module puppy
        ^
f90-855 f90: ERROR PUPPY, File = local_rename.f90, Line = 12, Column = 8
   The compiler has detected errors in module "PUPPY". No module information file will be created for this module.

     use cat, only : a_local=>a
                     ^
f90-1015 f90: ERROR TWO, File = local_rename.f90, Line = 21, Column = 21
   Local-name "A_LOCAL" must only be referenced once in a rename-list in this scope.

   use puppy, only : one, two
       ^
f90-894 f90: ERROR MAIN, File = local_rename.f90, Line = 31, Column = 7
   Module "PUPPY" has compile errors, therefore declarations obtained from the module via the USE statement may be incomplete.

f90: SGI MIPSpro Fortran 90 Version 7.42 (f14) Tue Sep 21, 2004 10:54:50

Bug?

-- 
Bil Kleb, Hampton, Virginia


Relevant Pages

  • Re: SGI introduced a bug in 7.41 compiler?
    ... > end module cat ... > end subroutine one ... > end module puppy ... In 7.4.3m compilers, ...
    (comp.lang.fortran)
  • Re: DPROD issues
    ... a switch like that typically ... makes a compiler nonstandard in that mode. ... treatment of specific intrinsics is one ... subroutine sub1a ...
    (comp.lang.fortran)
  • Re: Jumping into block of an if construct
    ... (For that matter a clever enough compiler could replace this PUT DATA ... routine which itself executes the loops around element handling. ... Either way I think the cost of element handling will usually ... So locally based on subroutine arguments, but not on, for example, ...
    (comp.lang.fortran)
  • Re: Bus error/ segmentation fault--help?
    ... When I compile with the intel fortran compiler, ... This subroutine integrates the function y3 up one step, ... implicit double precision (a-h, o-z) ...
    (comp.lang.fortran)
  • Re: Question about name conflicts in Fortran
    ... I am hacking the g95 compiler so that it dumps the structure ... Subroutine foo ... The para after the 2nd numbered list in 16.2 covers the case where the ... One of the exceptions is "a generic name may be the ...
    (comp.lang.fortran)