| Issue |
240413
|
| Summary |
[flang] STRUCTURE declared in a module is not visible in units that USE the module
|
| Labels |
flang:frontend
|
| Assignees |
|
| Reporter |
DanielCChen
|
Consider the following code
```
module m
structure /pt/
integer x /88/
integer y /99/
end structure
end module
program p
use m
record /pt/ a
print *, a%x, a%y
end program
```
Flang failed at the compile time with
```
error: Semantic errors in a1.f
a1.f:10:10: error: /pt/ is not a known STRUCTURE
record /pt/ a
^^^^
a1.f:11:12: error: 'a' is not an object of derived type; it is implicitly typed
print *, a%x, a%y
^
a1.f:11:17: error: 'a' is not an object of derived type; it is implicitly typed
print *, a%x, a%y
^
```
All gfortran, ifx and XLF compile and run successfully.
This is an extension by most of the compilers.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs