-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
Description
Version of flang : 20.0.0(f4230b4332262dffb0bd3b7a2f8d6deb2e96488e)/AArch64
When dummy procedure name is the same as common-block-name, a compilation terminates abnormally (Lowering to LLVM IR failed).
There should be no problem that the dummy procedure name and common-block-name have the same name.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
terrcom3_2.f:
subroutine ss5()
common /com_dummy1/ x
interface
subroutine com_dummy1()
end subroutine
end interface
print *,fun_sub(com_dummy1)
end$ flang terrcom3_2.f -c
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/MCS/fe2ferr/terrcom3_2.f":4:21): redefinition of symbol named 'com_dummy1_'
error: Lowering to LLVM IR failed
error: loc("/work/home/ohno/CT/test/fort/tp/reproducerJ/MCS/fe2ferr/terrcom3_2.f":2:15): LLVM Translation failed for operation: fir.global
error: failed to create the LLVM module
$
$ gfortran terrcom3_2.f -c
terrcom3_2.f:2:25:
2 | common /com_dummy1/ x
| 1
Error: COMMON block ‘com_dummy1’ at (1) cannot have the EXTERNAL attribute
$
$ ifx terrcom3_2.f -c; ls -al *.o
-rw-r--r--. 1 32800043 32800043 1136 Jan 8 02:00 terrcom3_2.o
$
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done