Issue |
130270
|
Summary |
[flang] Flang is unable to use a module it compiled
|
Labels |
|
Assignees |
|
Reporter |
inaki-amatria
|
- `flang` version is: `flang version 21.0.0git (https://github.com/llvm/llvm-project.git 9a65dc95133fba5e05eda3bb7b14f061d56dcd0b)`
- Reduced test case:
```fortran
! foo.f90
module foo
contains
function doFoo() result(ptr)
character :: str
pointer(ptr, str)
ptr = 0
end
end
! bar.f90
program main
use foo
character :: str
pointer(ptr, str)
ptr = doFoo()
end
```
- `flang` invocation is: `flang -fimplicit-none foo.f90 bar.f90`
- Expected behavior is: The code compiles successfully
- Actual behavior: Compilation aborts with the following error:
```
error: Semantic errors in bar.f90
./foo.mod:6:13: error: No explicit type declared for 'str'
pointer(ptr,str)
^^^
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs