Recorded compilation success/failure of several compilers
diff --git a/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-1.f90 b/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-1.f90
index 0405b0f..63ded19 100644
--- a/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-1.f90
+++ b/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-1.f90
@@ -34,13 +34,8 @@
p = 5
call init
- ! gfortran 4.4.2 fails on this line,
- ! claiming that n is an ambiguous reference.
- ! IBM XL Fortran 12.1 allows the local n to
- ! shadow the module entity n.
- ! I believe gfortran exhibits the correct behavior.
- ! According to the Fortran 95 standard
- ! (ISO/IEC 1539-1), Section 11.3.2:
+ ! There is ambiguity in the Fortran 95 standard as to how the following
+ ! statement should be handled. According to Section 11.3.2:
! "Two or more accessible entities, other than
! generic interfaces, may have the same name only if
! the name is not used to refer to an entity in the
@@ -49,5 +44,10 @@
! from the local names of all other entities accessible
! to the scoping unit through USE statements and
! otherwise."
+ ! GNU Fortran 4.4.2: Compilation fails: n is an ambiguous reference
+ ! IBM XL Fortran 12.1: Outputs 2 3 5
+ ! Intel Fortran 10.1: Outputs 2 3 5
+ ! PGI Fortran 10.0: Outputs 1 3 5
print *, n, o, p
+
end program
\ No newline at end of file
diff --git a/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-2.f90 b/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-2.f90
index d2278ba..ce7d554 100644
--- a/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-2.f90
+++ b/org.eclipse.photran-samples/src-modules-addl/import-rename-bug-2.f90
@@ -10,20 +10,25 @@
end module
program test
- ! gfortran 4.4.2 allows this.
- ! IBM XL Fortran 12.1 fails, claiming x is in scope
- ! at the second rename clause.
- ! According to the Fortran 95
- ! standard (ISO/IEC 1539-1), Section 11.3.2:
+ ! There is ambiguity in the Fortran 95 standard as to how the following
+ ! statement should be handled. According to Section 11.3.2:
! "Two or more accessible entities, other than
! generic interfaces, may have the same name only if
! the name is not used to refer to an entity in the
! scoping unit."
! The question is what "refer to" means. If you
! interpret this to mean, "The name has no references,"
- ! then gfortran is correct. If you interpret it to mean,
+ ! then compilation should succeed. If you interpret it to mean,
! "There are no other declarations/entities with that
- ! name," then XLF is correct.
+ ! name," then compilation should fail.
+ ! GNU Fortran 4.4.2: Compilation succeeds.
+ ! IBM XL Fortran 12.1: Compilation fails: "Identifier "x" to be used as the
+ ! the local name in a rename, has already been used
+ ! to access another entity by use-association. This
+ ! rename will not be done."
+ ! Intel Fortran 10.1: Compilation fails: "There is more than one use-name
+ ! for a local-name. [X]"
+ ! PGI Fortran 10.0: Compilation succeeds.
use m2, x => n, x => m
implicit none
print *, "Hi"