summaryrefslogtreecommitdiff
path: root/flang/test/Transforms
diff options
context:
space:
mode:
authorCarlos Seo <carlos.seo@linaro.org>2025-09-03 15:51:23 -0300
committerGitHub <noreply@github.com>2025-09-03 15:51:23 -0300
commita26cd2d504acff037cea8703a8926f4cf8e5b836 (patch)
treeead44c66e736cdf7031df7fc197bf52d3d16b284 /flang/test/Transforms
parent5777f71bcef03fe833de257a85f6a908941280f2 (diff)
[Flang] Fix symbol name clash when dummy procedure name is the same as common-block-name (#155508)
Dummy procedures in interface blocks are not external procedures that need to be linked. Do not externalize those. Fixes #122822
Diffstat (limited to 'flang/test/Transforms')
-rw-r--r--flang/test/Transforms/dummy-procedure-common-block-name.f12
1 files changed, 12 insertions, 0 deletions
diff --git a/flang/test/Transforms/dummy-procedure-common-block-name.f b/flang/test/Transforms/dummy-procedure-common-block-name.f
new file mode 100644
index 000000000000..2c3ebb965fe4
--- /dev/null
+++ b/flang/test/Transforms/dummy-procedure-common-block-name.f
@@ -0,0 +1,12 @@
+! RUN: bbc -emit-fir %s -o - | FileCheck %s
+
+subroutine ss5()
+common /com_dummy1/ x
+! CHECK: fir.global common @com_dummy1_
+interface
+ subroutine com_dummy1()
+ end subroutine
+end interface
+! CHECK: func.func private @_QPcom_dummy1()
+print *,fun_sub(com_dummy1)
+end