summaryrefslogtreecommitdiff
path: root/flang/test
diff options
context:
space:
mode:
authorSlava Zakharin <szakharin@nvidia.com>2023-05-15 21:10:18 -0700
committerSlava Zakharin <szakharin@nvidia.com>2023-05-16 09:51:09 -0700
commite47fbb7cd2d22b787d1022fd2f3bef4a051d67c8 (patch)
tree389fc882117d77a92c286740ab2ac5cb2e1a9ca5 /flang/test
parent76941b68ecd9a1f9ca337774b4082c2ca7577450 (diff)
downloadllvm-e47fbb7cd2d22b787d1022fd2f3bef4a051d67c8.tar.gz
[flang] Fixed comparison for derived types constants.
The two constants should be equal only if their derived types are the same. This fixes regression caused by D150380. Differential Revision: https://reviews.llvm.org/D150634
Diffstat (limited to 'flang/test')
-rw-r--r--flang/test/Lower/constant-literal-mangling.f908
1 files changed, 8 insertions, 0 deletions
diff --git a/flang/test/Lower/constant-literal-mangling.f90 b/flang/test/Lower/constant-literal-mangling.f90
index ef33ffe450b0..33a658fb61cd 100644
--- a/flang/test/Lower/constant-literal-mangling.f90
+++ b/flang/test/Lower/constant-literal-mangling.f90
@@ -9,6 +9,12 @@ type otherType
integer :: i
end type
+type emptyType1
+end type emptyType1
+
+type emptyType2
+end type emptyType2
+
print *, [42, 42]
! CHECK: fir.address_of(@_QQro.2xi4.0)
@@ -68,6 +74,8 @@ end type
print *, [otherType(42)]
! CHECK: fir.address_of(@_QQro.1x_QFTothertype.14)
+ print *, [emptyType1()]
+ print *, [emptyType2()]
end
! CHECK: fir.global internal @_QQro.1x_QFTsometype.10 constant : !fir.array<1x!fir.type<_QFTsometype{i:i32}>> {