[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / computed-goto.f90
blob49640390b697463894a65c182e980caf6f178a5e
1 ! RUN: bbc -emit-fir -o - %s | FileCheck %s
3 ! CHECK-LABEL: func @_QPm
4 function m(index)
5 ! CHECK: fir.select %{{.}} : i32 [1, ^bb{{.}}, 2, ^bb{{.}}, 3, ^bb{{.}}, 4, ^bb{{.}}, 5, ^bb{{.}}, unit, ^bb{{.}}]
6 goto (9,7,5,3,1) index ! + 1
7 m = 0; return
8 1 m = 1; return
9 3 m = 3; return
10 5 m = 5; return
11 7 m = 7; return
12 9 m = 9; return
13 end
15 ! print*, m(-3); print*, m(0)
16 ! print*, m(1); print*, m(2); print*, m(3); print*, m(4); print*, m(5)
17 ! print*, m(6); print*, m(9)
18 end