This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Odd error on redundant use of iso_fortran_env
- From: Damian Rouson <damian at sourceryinstitute dot org>
- To: gfortran <fortran at gcc dot gnu dot org>
- Cc: Stavros Kassinos <kassinos at ucy dot ac dot cy>
- Date: Fri, 16 Dec 2016 21:24:34 -0800
- Subject: Odd error on redundant use of iso_fortran_env
- Authentication-results: sourceware.org; auth=none
All,
Is the following behavior a compiler bug?
$ cat use-intrinsic-module-twice.f90
use iso_fortran_env
print *, integer_kinds
call testsub
contains
subroutine testsub
use iso_fortran_env
print * , integer_kinds
end subroutine
end
$ gfortran use-intrinsic-module-twice.f90
/var/folders/9_/nq83sd_5647315hnr42v8cqw0000gn/T//cc8CrVoi.s:116:Ignoring attempt to re-define symbol.
$ gfortran --version
GNU Fortran (MacPorts gcc7 7-20161204_0) 7.0.0 20161204 (experimental)
Interestingly, the “cc8CrVoi” string changes upon every invocation of the compiler. I see the same behavior with gfortran 4.9, 5, 6, and 7.
The workaround is painless: eliminate the second instance of “use iso_fortran_env.” Shall I submit a bug report?
Damian