[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / extent_triplets.f90
blobb29d48e910e4ebb04822beffc03139872cd8001f
1 ! RUN: bbc -emit-fir %s -o - | FileCheck %s
3 program test_extent_from_triplet
4 implicit none
5 integer, parameter:: n = 3
6 INTEGER a(n), b(n), i
7 a = (/ 1, 2, 3 /)
8 b = (/ (sum(a(1:i)), i=1, n) /)
9 end program
11 ! CHECK: %{{.*}} = fir.embox %{{.*}}(%{{.*}}) [%{{.*}}] : (!fir.ref<!fir.array<3xi32>>, !fir.shape<1>, !fir.slice<1>) -> !fir.box<!fir.array<?xi32>>