- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
In the following code, a submodule makes explicit USE of it's parent module.
module forces
implicit none
type force
! type wrongly accesed via USE statement
end type force
type force_sensib
! type correctly accesed via HOST ssociation
contains
procedure,pass::fstb
end type force_sensib
interface
module subroutine fstb(FS)
class(force_sensib),intent(inout)::FS
end subroutine fstb
end interface
end module forces
submodule(forces) forces_sensib
use forces,only:force !Wrong sentence, triggering the problem.
implicit none
contains
module procedure fstb!(FS)
end procedure fstb
end submodule forces_sensibThe error offered by the compiler is confusing (an wrong).
error #6115: A separate interface body must have been declared in the program unit or an ancestor of the program unit for the separate module procedure. [FSTB]
compilation aborted for ... (code 1)
Clearly the problem is not the interface to FSTB, which is present and correctly placed in the module. The problem is the USE sentence in the submodule, but the compiler is unable to detect this.
I have been experiencing similar fake errors with submodules which makes really difficult to guess which are the errors in the code.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Clearly our error message could and should be better. The Nag compiler gives a very intuitive message:
$ nagfor repro.f90
NAG Fortran Compiler Release 7.2(Shin-Urayasu) Build 7203
Error: repro.f90, line 22: Module FORCES USEs itself
detected at :@FORCE
[NAG Fortran Compiler pass 1 error termination, 1 error]
I will open a bug report.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
The bug ID is CMPLRLLVM-68781
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank you, Ron.
What is the purpose of the bug ID? Can I suscribe to it or something?
I don't see it in my Dashboard open cases and I didn't receive any notification either.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Issued entered on the Forum are not linked to your Online Service Center account. If you want to track issue please enter them on OSC.
For bugs entered here: I give you the bug ID as bookkeeping. For the situation where you submit several bugs. As those get a fix I will alert you here on the Forum. We use an internal-only Jira issue tracking system, thus you will not be able to see the bug progress. It would be nice if it was more open, but it's not and won't be for the foreseeable future.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Another use case for the bug ID - you can ask if this bug is fixed or get a status update.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank you, Ron.
I usuallly prefer to enter the tickets myself, for example if it is an ICE, but sometimes It is helpful to get a second opinion in the forum before bothering.
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora