[flang] Accept polymorphic component element in storage_size
[llvm-project.git] / flang / test / Lower / assigned-goto.f90
blob81690b7113d04bf9aee07f1735bf49d4b23a4b72
1 ! RUN: bbc -emit-fir -o - %s | FileCheck %s
3 ! CHECK-LABEL: func @_QPnolist
4 subroutine nolist
5 integer L, V
6 11 V = 1
7 ! CHECK: fir.store %c31{{.*}} to %{{.}}
8 assign 31 to L
9 ! CHECK: fir.select %{{.}} : i32 [31, ^bb{{.}}, unit, ^bb{{.}}]
10 goto L ! no list
11 21 V = 2
12 go to 41
13 31 V = 3
14 41 print*, 3, V
15 end
17 ! CHECK-LABEL: func @_QPlist
18 subroutine list
19 integer L, V
20 ! CHECK: fir.store %c22{{.*}} to %{{.}}
21 assign 22 to L
22 12 V = 100
23 ! CHECK: fir.store %c32{{.*}} to %{{.}}
24 assign 32 to L
25 ! CHECK: fir.select %{{.}} : i32 [32, ^bb{{.}}, 22, ^bb{{.}}, unit, ^bb{{.}}]
26 goto L (42, 32, 22, 32, 32) ! duplicate labels are allowed
27 22 V = 200
28 go to 42
29 32 V = 300
30 42 print*, 300, V
31 end
33 call nolist
34 call list
35 end