[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-bugs
Subject: [Bug fortran/92736] New: Error when using a variable from a module in a submodule and its parent mod
From: "chinoune.mehdi at hotmail dot com" <gcc-bugzilla () gcc ! gnu ! org>
Date: 2019-11-30 5:55:11
Message-ID: bug-92736-4 () http ! gcc ! gnu ! org/bugzilla/
[Download RAW message or body]
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92736
Bug ID: 92736
Summary: Error when using a variable from a module in a
submodule and its parent module.
Product: gcc
Version: 9.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: chinoune.mehdi at hotmail dot com
Target Milestone: ---
gfortran recently start to reject this code :
module m1
implicit none
integer, parameter :: i = 10
end module m1
module m2
use m1, only : i
implicit none
interface
module subroutine sb1()
end subroutine sb1
end interface
end module m2
submodule(m2) s1
use m1, only : i
implicit none
contains
module subroutine sb1
print*,"hello"
end subroutine sb1
end submodule s1
gfortran-9 -c file.f90
15 | submodule(m2) s1
| 1
16 | use m1, only : i
| 2
Error:
Symbol ‘i' at (1) conflicts with the symbol at (2)
The error message is not clear!
I can compile it using gfortran 8.3.0 and 9.2.0, but it fails with 9.2.1 and
10.0
I think this is where it started failing :
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=274609
https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=274608=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic