[flang][NFC] Strip trailing whitespace from tests (8 of N)
Only some fortran source files in flang/test/Lower have been modified. The other files in the directory will be cleaned up in subsequent commits
This commit is contained in:
parent
adf4c1dbb6
commit
ba98668dca
@ -6,7 +6,7 @@ MODULE DMUMPS_SOL_LR
|
||||
IMPLICIT NONE
|
||||
|
||||
TYPE BLR_STRUC_T
|
||||
INTEGER, DIMENSION(:), POINTER :: PANELS_L
|
||||
INTEGER, DIMENSION(:), POINTER :: PANELS_L
|
||||
INTEGER, DIMENSION(:), POINTER :: PANELS_U
|
||||
INTEGER, DIMENSION(:), POINTER :: BEGS_BLR_STATIC
|
||||
END TYPE BLR_STRUC_T
|
||||
@ -32,7 +32,7 @@ SUBROUTINE DMUMPS_SOL_FWD_LR_SU( IWHDLR, MTYPE )
|
||||
ENDIF
|
||||
ENDIF
|
||||
|
||||
END SUBROUTINE DMUMPS_SOL_FWD_LR_SU
|
||||
END SUBROUTINE DMUMPS_SOL_FWD_LR_SU
|
||||
|
||||
END MODULE DMUMPS_SOL_LR
|
||||
|
||||
|
||||
@ -22,7 +22,7 @@ subroutine test_passing_char_array
|
||||
! CHECK-DAG: %[[c3:.*]] = arith.constant 3 : index
|
||||
! CHECK-DAG: %[[xbuff:.*]] = fir.convert %[[xarray]] : (!fir.ref<!fir.array<4x!fir.char<1,3>>>) -> !fir.ref<!fir.char<1,?>>
|
||||
! CHECK: %[[boxchar:.*]] = fir.emboxchar %[[xbuff]], %[[c3]] : (!fir.ref<!fir.char<1,?>>, index) -> !fir.boxchar<1>
|
||||
! CHECK: fir.call @_QPsub_taking_a_char_array(%[[boxchar]]) {{.*}}: (!fir.boxchar<1>) -> ()
|
||||
! CHECK: fir.call @_QPsub_taking_a_char_array(%[[boxchar]]) {{.*}}: (!fir.boxchar<1>) -> ()
|
||||
end subroutine
|
||||
|
||||
! TODO more implicit interface cases with/without explicit interface
|
||||
|
||||
@ -11,7 +11,7 @@ subroutine test_inline()
|
||||
y = g(x)
|
||||
!CHECK: %[[VAL_4:.*]] = fir.call @_QFtest_inlinePg(%[[VAL_1]]) fastmath<contract> {inline_attr = #fir.inline_attrs<always_inline>} : (!fir.ref<i32>) -> i32
|
||||
!CHECK: fir.store %[[VAL_4]] to %[[VAL_3]] : !fir.ref<i32>
|
||||
|
||||
|
||||
!dir$ forceinline
|
||||
call f(x, y)
|
||||
!CHECK: fir.call @_QFtest_inlinePf(%[[VAL_1]], %[[VAL_3]]) fastmath<contract> {inline_attr = #fir.inline_attrs<always_inline>} : (!fir.ref<i32>, !fir.ref<i32>) -> ()
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
! CHECK: call {{.*}}BeginFlush
|
||||
! CHECK: call {{.*}}EndIoStatement
|
||||
flush(8)
|
||||
|
||||
|
||||
! CHECK: call {{.*}}BeginRewind
|
||||
! CHECK: call {{.*}}EndIoStatement
|
||||
rewind(8)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
|
||||
|
||||
! Test that IO item calls stackrestore in the right place
|
||||
! Test that IO item calls stackrestore in the right place
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() {
|
||||
character(3) string
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
program test
|
||||
include 'location0.inc'
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "TEST"} {
|
||||
! CHECK: fir.call @_FortranAioOutputAscii(%{{.*}}, %{{.*}}, %{{.*}}) fastmath<contract> : (!fir.ref<i8>, !fir.ref<i8>, i64) -> i1 loc(fused<#fir<loc_kind_array[ base, inclusion, inclusion]>>["{{.*}}location1.inc":1:10, "{{.*}}location0.inc":1:1, "{{.*}}location.f90":4:1])
|
||||
|
||||
@ -36,7 +36,7 @@ end module
|
||||
! file.
|
||||
module modEq1
|
||||
! Equivalence, no initialization
|
||||
real :: x1(10), x2(10), x3(10)
|
||||
real :: x1(10), x2(10), x3(10)
|
||||
! Equivalence with initialization
|
||||
real :: y1 = 42.
|
||||
real :: y2(10)
|
||||
|
||||
@ -36,7 +36,7 @@ real function modCommon1Use()
|
||||
! CHECK-DAG: fir.address_of(@named2_) : !fir.ref<!fir.array<4xi8>>
|
||||
! CHECK-DAG: fir.address_of(@__BLNK__) : !fir.ref<!fir.array<4xi8>>
|
||||
! CHECK-DAG: fir.address_of(@named1_) : !fir.ref<!fir.array<4xi8>>
|
||||
modCommon1Use = x_blank + x_named1 + i_named2
|
||||
modCommon1Use = x_blank + x_named1 + i_named2
|
||||
end function
|
||||
|
||||
|
||||
|
||||
@ -35,7 +35,7 @@ end function
|
||||
! Module modEq2 defines data that is equivalenced
|
||||
module modEq2
|
||||
! Equivalence, no initialization
|
||||
real :: x1(10), x2(10), x3(10)
|
||||
real :: x1(10), x2(10), x3(10)
|
||||
! Equivalence with initialization
|
||||
real :: y1 = 42.
|
||||
real :: y2(10)
|
||||
@ -109,7 +109,7 @@ real function test_no_equiv_conflicts()
|
||||
use modEq2
|
||||
! Same equivalences as in modEq2. Test that lowering does not mixes
|
||||
! up the equivalence based on the similar offset inside the scope.
|
||||
real :: x1l(10), x2l(10), x3l(10)
|
||||
real :: x1l(10), x2l(10), x3l(10)
|
||||
real :: y1l = 42.
|
||||
real :: y2l(10)
|
||||
save :: x1l, x2l, x3l, y1l, y2l
|
||||
|
||||
@ -8,7 +8,7 @@ program nml_common
|
||||
real, pointer :: p(:)
|
||||
namelist /t/i,p
|
||||
common /c/i,p
|
||||
|
||||
|
||||
allocate(p(2))
|
||||
call print_t()
|
||||
contains
|
||||
|
||||
@ -313,7 +313,7 @@ program nested_where
|
||||
! CHECK: fir.call @_FortranARaggedArrayDeallocate(%[[VAL_278]]) {{.*}}: (!fir.llvm_ptr<i8>) -> ()
|
||||
! CHECK: %[[VAL_280:.*]] = fir.convert %[[VAL_4]] : (!fir.ref<tuple<i64, !fir.heap<!fir.array<?xi8>>, !fir.heap<!fir.array<?xi64>>>>) -> !fir.llvm_ptr<i8>
|
||||
! CHECK: fir.call @_FortranARaggedArrayDeallocate(%[[VAL_280]]) {{.*}}: (!fir.llvm_ptr<i8>) -> ()
|
||||
|
||||
|
||||
integer :: a(3) = 0
|
||||
logical :: mask1(3) = (/ .true.,.false.,.true. /)
|
||||
logical :: mask2(3) = (/ .true.,.true.,.false. /)
|
||||
|
||||
@ -13,7 +13,7 @@ module poly
|
||||
contains
|
||||
procedure, nopass :: proc1 => proc1_p2
|
||||
end type
|
||||
|
||||
|
||||
contains
|
||||
|
||||
subroutine proc1_p1()
|
||||
@ -23,7 +23,7 @@ contains
|
||||
subroutine proc1_p2()
|
||||
print*, 'call proc1_p2'
|
||||
end subroutine
|
||||
|
||||
|
||||
subroutine test_nullify()
|
||||
class(p1), pointer :: c
|
||||
|
||||
@ -31,7 +31,7 @@ contains
|
||||
call c%proc1()
|
||||
|
||||
nullify(c) ! c dynamic type must be reset to p1
|
||||
|
||||
|
||||
call c%proc1()
|
||||
end subroutine
|
||||
end module
|
||||
@ -45,7 +45,7 @@ end
|
||||
! CHECK: %[[C_DESC:.*]] = fir.alloca !fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>> {bindc_name = "c", uniq_name = "_QMpolyFtest_nullifyEc"}
|
||||
! CHECK: %[[C_DESC_DECL:.*]]:2 = hlfir.declare %[[C_DESC]] {fortran_attrs = #fir.var_attrs<pointer>, uniq_name = "_QMpolyFtest_nullifyEc"} : (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>) -> (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>)
|
||||
! CHECK: %{{.*}} = fir.call @_FortranAPointerAllocate(%{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<!fir.box<none>>, i1, !fir.box<none>, !fir.ref<i8>, i32) -> i32
|
||||
! CHECK: %[[DECLARED_TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolyTp1{a:i32,b:i32}>
|
||||
! CHECK: %[[DECLARED_TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolyTp1{a:i32,b:i32}>
|
||||
! CHECK: %[[C_DESC_CAST:.*]] = fir.convert %[[C_DESC_DECL]]#0 : (!fir.ref<!fir.class<!fir.ptr<!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[TYPE_DESC_CAST:.*]] = fir.convert %[[DECLARED_TYPE_DESC]] : (!fir.tdesc<!fir.type<_QMpolyTp1{a:i32,b:i32}>>) -> !fir.ref<none>
|
||||
! CHECK: %[[RANK:.*]] = arith.constant 0 : i32
|
||||
|
||||
@ -143,9 +143,9 @@ contains
|
||||
|
||||
! CHECK: %[[C4_LOAD:.*]] = fir.load %[[C4_DESC]] : !fir.ref<!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
|
||||
! CHECK: %[[C4_REBOX:.*]] = fir.rebox %[[C4_LOAD]](%{{.*}}) : (!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.shift<1>) -> !fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>
|
||||
! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[C4_REBOX_CONV:.*]] = fir.convert %[[C4_REBOX]] : (!fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[C4_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
|
||||
! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[C4_REBOX_CONV:.*]] = fir.convert %[[C4_REBOX]] : (!fir.class<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[C4_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
|
||||
! CHECK-LABEL: fir.do_loop
|
||||
! CHECK: %[[PA_LOAD:.*]] = fir.load %[[PA_DESC]] : !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
|
||||
! CHECK: %[[PA_COORD:.*]] = fir.coordinate_of %[[PA_LOAD]], %{{.*}} : (!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, i64) -> !fir.ref<!fir.type<_QMpolyTp1{a:i32,b:i32}>>
|
||||
@ -165,8 +165,8 @@ contains
|
||||
! CHECK: %[[SLICE:.*]] = fir.slice %[[C2_INDEX]], %[[C4_INDEX]], %[[C1_INDEX]] : (index, index, index) -> !fir.slice<1>
|
||||
! CHECK: %[[SLICE_REBOX:.*]] = fir.rebox %[[C4_LOAD]](%[[SHIFT]]) [%[[SLICE]]] : (!fir.class<!fir.heap<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, !fir.shift<1>, !fir.slice<1>) -> !fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>
|
||||
! CHECK: %[[PA_CONV:.*]] = fir.convert %[[PA_DESC]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[SLICE_REBOX_CONV:.*]] = fir.convert %[[SLICE_REBOX]] : (!fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[SLICE_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
|
||||
! CHECK: %[[SLICE_REBOX_CONV:.*]] = fir.convert %[[SLICE_REBOX]] : (!fir.class<!fir.array<3x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAPointerAssociate(%[[PA_CONV]], %[[SLICE_REBOX_CONV]]) {{.*}} : (!fir.ref<!fir.box<none>>, !fir.box<none>) -> ()
|
||||
! CHECK-LABEL: fir.do_loop
|
||||
! CHECK: %[[PA_LOAD:.*]] = fir.load %[[PA_DESC]] : !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>>
|
||||
! CHECK: %[[PA_COORD:.*]] = fir.coordinate_of %[[PA_LOAD]], %{{.*}} : (!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolyTp1{a:i32,b:i32}>>>>, i64) -> !fir.ref<!fir.type<_QMpolyTp1{a:i32,b:i32}>>
|
||||
|
||||
@ -113,9 +113,9 @@ subroutine test_polymorphic_null(p)
|
||||
end subroutine
|
||||
! CHECK-LABEL: func.func @_QPtest_polymorphic_null(
|
||||
! CHECK-SAME: %[[VAL_0:.*]]: !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QFtest_polymorphic_nullTt>>>>>
|
||||
! CHECK: %[[VAL_1:.*]] = fir.type_desc !fir.type<_QFtest_polymorphic_nullTt>
|
||||
! CHECK: %[[VAL_1:.*]] = fir.type_desc !fir.type<_QFtest_polymorphic_nullTt>
|
||||
! CHECK: %[[VAL_2:.*]] = fir.convert %[[VAL_0]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QFtest_polymorphic_nullTt>>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_1]] : (!fir.tdesc<!fir.type<_QFtest_polymorphic_nullTt>>) -> !fir.ref<none>
|
||||
! CHECK: %[[VAL_3:.*]] = fir.convert %[[VAL_1]] : (!fir.tdesc<!fir.type<_QFtest_polymorphic_nullTt>>) -> !fir.ref<none>
|
||||
! CHECK: %[[VAL_4:.*]] = arith.constant 1 : i32
|
||||
! CHECK: %[[VAL_5:.*]] = arith.constant 0 : i32
|
||||
! CHECK: fir.call @_FortranAPointerNullifyDerived(%[[VAL_2]], %[[VAL_3]], %[[VAL_4]], %[[VAL_5]]) {{.*}}: (!fir.ref<!fir.box<none>>, !fir.ref<none>, i32, i32) -> ()
|
||||
|
||||
@ -24,7 +24,7 @@ contains
|
||||
|
||||
call pass_unlimited_poly_1d(spread(p, dim=1, ncopies=2))
|
||||
call pass_unlimited_poly_1d(spread(pa(1), dim=1, ncopies=2))
|
||||
|
||||
|
||||
end subroutine
|
||||
|
||||
! CHECK-LABEL: func.func @_QMpoly_tmpPtest_temp_from_intrinsic_spread() {
|
||||
@ -220,7 +220,7 @@ contains
|
||||
! CHECK: %[[LOAD_I:.*]] = fir.load %[[I]] : !fir.ref<i32>
|
||||
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
|
||||
! CHECK: %[[CMPI:.*]] = arith.cmpi eq, %[[LOAD_I]], %[[C1]] : i32
|
||||
! CHECK: %[[A_REBOX:.*]] = fir.rebox %[[LOAD_A]] : (!fir.class<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>) -> !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
|
||||
! CHECK: %[[A_REBOX:.*]] = fir.rebox %[[LOAD_A]] : (!fir.class<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>) -> !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
|
||||
! CHECK: %{{.*}} = arith.select %[[CMPI]], %[[A_REBOX]], %[[LOAD_B]] : !fir.box<!fir.heap<!fir.type<_QMpoly_tmpTp1{a:i32}>>>
|
||||
|
||||
subroutine check_unlimited_poly(a)
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
! RUN: bbc -emit-fir -hlfir=false %s -o - | FileCheck %s
|
||||
|
||||
! Tests the different possible type involving polymorphic entities.
|
||||
! Tests the different possible type involving polymorphic entities.
|
||||
|
||||
module polymorphic_types
|
||||
type p1
|
||||
|
||||
@ -126,7 +126,7 @@ module polymorphic_test
|
||||
! CHECK: %[[CLASS1:.*]] = fir.embox %[[DT1]] : (!fir.ref<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
|
||||
! CHECK: fir.call @_QMpolymorphic_testPprint(%[[CLASS1]]) {{.*}}: (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> ()
|
||||
! CHECK: %[[BOX2:.*]] = fir.embox %[[DT2]] : (!fir.ref<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>
|
||||
! CHECK: %[[CLASS2:.*]] = fir.convert %[[BOX2]] : (!fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
|
||||
! CHECK: %[[CLASS2:.*]] = fir.convert %[[BOX2]] : (!fir.class<!fir.type<_QMpolymorphic_testTp2{a:i32,b:i32,c:f32}>>) -> !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>
|
||||
! CHECK: fir.call @_QMpolymorphic_testPprint(%[[CLASS2]]) {{.*}}: (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> ()
|
||||
|
||||
subroutine test_allocate_unlimited_polymorphic_non_derived()
|
||||
@ -316,7 +316,7 @@ module polymorphic_test
|
||||
! CHECK-LABEL: func.func @_QMpolymorphic_testPnullify_pointer_array(
|
||||
! CHECK-SAME: %[[ARG0:.*]]: !fir.ref<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>> {fir.bindc_name = "a"}) {
|
||||
! CHECK: %[[COORD_P:.*]] = fir.coordinate_of %[[ARG0]], p : (!fir.ref<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>) -> !fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>>>>
|
||||
! CHECK: %[[TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>
|
||||
! CHECK: %[[TYPE_DESC:.*]] = fir.type_desc !fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>
|
||||
! CHECK: %[[CONV_P:.*]] = fir.convert %[[COORD_P]] : (!fir.ref<!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>>>>) -> !fir.ref<!fir.box<none>>
|
||||
! CHECK: %[[CONV_TDESC:.*]] = fir.convert %[[TYPE_DESC]] : (!fir.tdesc<!fir.type<_QMpolymorphic_testTp3{p:!fir.class<!fir.ptr<!fir.array<?x!fir.type<_QMpolymorphic_testTp3>>>>}>>) -> !fir.ref<none>
|
||||
! CHECK: %[[C1:.*]] = arith.constant 1 : i32
|
||||
@ -517,7 +517,7 @@ module polymorphic_test
|
||||
|
||||
subroutine host_assoc(this)
|
||||
class(p1) :: this
|
||||
|
||||
|
||||
call internal
|
||||
contains
|
||||
subroutine internal
|
||||
@ -779,7 +779,7 @@ module polymorphic_test
|
||||
subroutine test_unlimited_polymorphic_alloc_array_ret()
|
||||
select type (a => unlimited_polymorphic_alloc_array_ret())
|
||||
type is (real)
|
||||
print*, 'type is real'
|
||||
print*, 'type is real'
|
||||
end select
|
||||
end subroutine
|
||||
|
||||
@ -795,7 +795,7 @@ module polymorphic_test
|
||||
! CHECK-LABEL: func.func @_QMpolymorphic_testPtest_unlimited_polymorphic_intentout(
|
||||
! CHECK-SAME: %[[ARG0:.*]]: !fir.class<none> {fir.bindc_name = "a"}) {
|
||||
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<none>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
|
||||
! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
|
||||
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<none>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAInitialize(%[[BOX_NONE]], %{{.*}}, %{{.*}}) {{.*}} : (!fir.box<none>, !fir.ref<i8>, i32) -> ()
|
||||
|
||||
@ -806,7 +806,7 @@ module polymorphic_test
|
||||
! CHECK-LABEL: func.func @_QMpolymorphic_testPtest_polymorphic_intentout(
|
||||
! CHECK-SAME: %[[ARG0:.*]]: !fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>> {fir.bindc_name = "a"}) {
|
||||
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
|
||||
! CHECK: fir.call @_FortranADestroy(%[[BOX_NONE]]) {{.*}} : (!fir.box<none>) -> ()
|
||||
! CHECK: %[[BOX_NONE:.*]] = fir.convert %[[ARG0]] : (!fir.class<!fir.type<_QMpolymorphic_testTp1{a:i32,b:i32}>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAInitialize(%[[BOX_NONE]], %{{.*}}, %{{.*}}) {{.*}} : (!fir.box<none>, !fir.ref<i8>, i32) -> ()
|
||||
|
||||
|
||||
@ -148,7 +148,7 @@ end
|
||||
module test
|
||||
!! When derived type processing is implemented, remove all instances of:
|
||||
!! - !![disable]
|
||||
!! - COM:
|
||||
!! - COM:
|
||||
!![disable]type :: a_type
|
||||
!![disable] integer :: x
|
||||
!![disable]end type
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
! (passing a procedure and calling it), with and without definitions.
|
||||
! Check that the definition type prevail if available and that casts are inserted to
|
||||
! accommodate for the signature mismatch in the different location due to implicit
|
||||
! typing rules and Fortran loose interface compatibility rule history.
|
||||
! typing rules and Fortran loose interface compatibility rule history.
|
||||
|
||||
|
||||
! Note: all the cases where their is a definition are exactly the same,
|
||||
@ -25,7 +25,7 @@ subroutine call_foo(i)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
! fir.call @_QPfoo(%[[argconvert]]) {{.*}}: (!fir.ref<!fir.array<2x5xi32>>) -> ()
|
||||
call foo(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPfoo(
|
||||
! CHECK-SAME: %{{.*}}: !fir.ref<!fir.array<2x5xi32>>{{.*}}) {
|
||||
subroutine foo(i)
|
||||
@ -41,7 +41,7 @@ subroutine call_foo2(i)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
! fir.call @_QPfoo2(%[[argconvert]]) {{.*}}: (!fir.ref<!fir.array<2x5xi32>>) -> ()
|
||||
call foo2(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPpass_foo2() {
|
||||
subroutine pass_foo2()
|
||||
external :: foo2
|
||||
@ -64,7 +64,7 @@ subroutine call_foo3(i)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
! fir.call @_QPfoo3(%[[argconvert]]) {{.*}}: (!fir.ref<!fir.array<2x5xi32>>) -> ()
|
||||
call foo3(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPfoo3(
|
||||
! CHECK-SAME: %{{.*}}: !fir.ref<!fir.array<2x5xi32>>{{.*}}) {
|
||||
subroutine foo3(i)
|
||||
@ -93,7 +93,7 @@ subroutine call_foo4(i)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
! fir.call @_QPfoo4(%[[argconvert]]) {{.*}}: (!fir.ref<!fir.array<2x5xi32>>) -> ()
|
||||
call foo4(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPpass_foo4() {
|
||||
subroutine pass_foo4()
|
||||
external :: foo4
|
||||
@ -123,7 +123,7 @@ subroutine call_foo5(i)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
! fir.call @_QPfoo5(%[[argconvert]]) {{.*}}: (!fir.ref<!fir.array<2x5xi32>>) -> ()
|
||||
call foo5(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
|
||||
|
||||
! Test when there is no definition (declaration at the end of the mlir module)
|
||||
@ -136,7 +136,7 @@ subroutine call_foo6(i)
|
||||
integer :: i(10)
|
||||
! CHECK-NOT: convert
|
||||
call foo6(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPpass_foo6() {
|
||||
subroutine pass_foo6()
|
||||
external :: foo6
|
||||
@ -160,7 +160,7 @@ function call_foo7(i)
|
||||
! CHECK: %[[funccast:.*]] = fir.convert %[[f]] : (() -> ()) -> ((!fir.ref<!fir.array<10xi32>>) -> f32)
|
||||
! CHECK: fir.call %[[funccast]](%arg0) {{.*}}: (!fir.ref<!fir.array<10xi32>>) -> f32
|
||||
call_foo7 = foo7(i)
|
||||
end function
|
||||
end function
|
||||
|
||||
|
||||
! call, call with different type
|
||||
@ -170,14 +170,14 @@ subroutine call_foo8(i)
|
||||
integer :: i(10)
|
||||
! CHECK-NOT: convert
|
||||
call foo8(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
! CHECK-LABEL: func @_QPcall_foo8_2(
|
||||
! CHECK-SAME: %{{.*}}: !fir.ref<!fir.array<2x5xi32>>{{.*}}) {
|
||||
subroutine call_foo8_2(i)
|
||||
integer :: i(2, 5)
|
||||
! %[[argconvert:*]] = fir.convert %arg0 :
|
||||
call foo8(i)
|
||||
end subroutine
|
||||
end subroutine
|
||||
|
||||
! Test that target attribute is lowered in declaration of functions that are
|
||||
! not defined in this file.
|
||||
|
||||
@ -15,8 +15,8 @@ subroutine test_array_format
|
||||
! CHECK: %[[fmtArg:.*]] = fir.zero_bits !fir.ref<i8>
|
||||
! CHECK: %[[fmtLenArg:.*]] = fir.zero_bits i64
|
||||
! CHECK: %[[fmtDesc:.*]] = fir.convert %[[fmtBox]] : (!fir.box<!fir.array<2x!fir.char<1,10>>>) -> !fir.box<none>
|
||||
! CHECK: fir.call @_FortranAioBeginExternalFormattedOutput(%[[fmtArg]], %[[fmtLenArg]], %[[fmtDesc]], {{.*}})
|
||||
write(*, array)
|
||||
! CHECK: fir.call @_FortranAioBeginExternalFormattedOutput(%[[fmtArg]], %[[fmtLenArg]], %[[fmtDesc]], {{.*}})
|
||||
write(*, array)
|
||||
end subroutine
|
||||
|
||||
! A test to check the buffer and it's length.
|
||||
|
||||
@ -38,7 +38,7 @@ contains
|
||||
allocate(negate, source=this)
|
||||
negate%a = -this%a
|
||||
end function
|
||||
|
||||
|
||||
subroutine select_type1(a)
|
||||
class(p1), intent(in) :: a
|
||||
|
||||
@ -275,7 +275,7 @@ contains
|
||||
! CHECK-LABEL: func.func @_QMselect_type_lower_testPselect_type5(
|
||||
! CHECK-SAME: %[[ARG0:.*]]: !fir.class<none> {fir.bindc_name = "a"})
|
||||
! CHECK: fir.select_type %[[ARG0]] : !fir.class<none>
|
||||
! CHECK-SAME: [#fir.type_is<i8>, ^[[I8_BLK:.*]], #fir.type_is<i32>, ^[[I32_BLK:.*]], #fir.type_is<f32>, ^[[F32_BLK:.*]], #fir.type_is<!fir.logical<4>>, ^[[LOG_BLK:.*]], #fir.type_is<!fir.char<1,?>>, ^[[CHAR_BLK:.*]], unit, ^[[DEFAULT:.*]]]
|
||||
! CHECK-SAME: [#fir.type_is<i8>, ^[[I8_BLK:.*]], #fir.type_is<i32>, ^[[I32_BLK:.*]], #fir.type_is<f32>, ^[[F32_BLK:.*]], #fir.type_is<!fir.logical<4>>, ^[[LOG_BLK:.*]], #fir.type_is<!fir.char<1,?>>, ^[[CHAR_BLK:.*]], unit, ^[[DEFAULT:.*]]]
|
||||
! CHECK: ^[[I8_BLK]]
|
||||
! CHECK: ^[[I32_BLK]]
|
||||
! CHECK: ^[[F32_BLK]]
|
||||
@ -467,7 +467,7 @@ contains
|
||||
! CHECK: %[[SELECTOR:.*]] = fir.rebox %[[ARG0]] : (!fir.class<!fir.array<?xnone>>) -> !fir.class<!fir.array<?xnone>>
|
||||
! CHECK: fir.select_type %[[SELECTOR]] : !fir.class<!fir.array<?xnone>> [#fir.type_is<i32>, ^{{.*}}, #fir.type_is<f32>, ^{{.*}}, #fir.type_is<!fir.char<1,?>>, ^bb{{.*}}, unit, ^{{.*}}]
|
||||
! CHECK: ^bb{{.*}}:
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?xi32>>
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?xi32>>
|
||||
! CHECK: %[[C0:.*]] = arith.constant 0 : index
|
||||
! CHECK: %[[SELECTOR_DIMS:.*]]:3 = fir.box_dims %[[BOX]], %[[C0]] : (!fir.box<!fir.array<?xi32>>, index) -> (index, index, index)
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[BOX]] : (!fir.box<!fir.array<?xi32>>) -> !fir.array<?xi32>
|
||||
@ -482,7 +482,7 @@ contains
|
||||
! CHECK: fir.array_merge_store %[[ARRAY_LOAD]], %[[LOOP_RES]] to %[[BOX]] : !fir.array<?xi32>, !fir.array<?xi32>, !fir.box<!fir.array<?xi32>>
|
||||
! CHECK: cf.br ^{{.*}}
|
||||
! CHECK: ^bb{{.*}}:
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?xf32>>
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?xf32>>
|
||||
! CHECK: %[[C0:.*]] = arith.constant 0 : index
|
||||
! CHECK: %[[SELECTOR_DIMS:.*]]:3 = fir.box_dims %[[BOX]], %[[C0]] : (!fir.box<!fir.array<?xf32>>, index) -> (index, index, index)
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[BOX]] : (!fir.box<!fir.array<?xf32>>) -> !fir.array<?xf32>
|
||||
@ -497,7 +497,7 @@ contains
|
||||
! CHECK: fir.array_merge_store %[[ARRAY_LOAD]], %[[LOOP_RES]] to %[[BOX]] : !fir.array<?xf32>, !fir.array<?xf32>, !fir.box<!fir.array<?xf32>>
|
||||
! CHECK: cf.br ^{{.*}}
|
||||
! CHECK: ^bb{{.*}}:
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %{{[0-9]+}} : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
|
||||
! CHECK: %[[BOX:.*]] = fir.convert %{{[0-9]+}} : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?x!fir.char<1,?>>>
|
||||
! CHECK: cf.br ^bb{{.*}}
|
||||
! CHECK: ^bb{{.*}}:
|
||||
! CHECK: %[[EXACT_BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?xnone>>) -> !fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>
|
||||
@ -517,7 +517,7 @@ contains
|
||||
! CHECK: %[[BOX_DIMS:.*]]:3 = fir.box_dims %[[EXACT_BOX]], %[[C0]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, index) -> (index, index, index)
|
||||
! CHECK: %[[C1:.*]] = arith.constant 1 : index
|
||||
! CHECK: %[[SLICE:.*]] = fir.slice %[[C1]], %[[BOX_DIMS]]#1, %[[C1]] path %[[FIELD_B]] : (index, index, index, !fir.field) -> !fir.slice<1>
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[EXACT_BOX]] [%[[SLICE]]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, !fir.slice<1>) -> !fir.array<?xi32>
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[EXACT_BOX]] [%[[SLICE]]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, !fir.slice<1>) -> !fir.array<?xi32>
|
||||
! CHECK: %[[DO_RES:.*]] = fir.do_loop %[[IND:.*]] = %{{.*}} to %{{.*}} step %c{{.*}} unordered iter_args(%[[ARG:.*]] = %[[ARRAY_LOAD]]) -> (!fir.array<?xi32>) {
|
||||
! CHECK: %[[ARR_UP:.*]] = fir.array_update %[[ARG]], %{{.*}}, %[[IND]] : (!fir.array<?xi32>, i32, index) -> !fir.array<?xi32>
|
||||
! CHECK: fir.result %[[ARR_UP]] : !fir.array<?xi32>
|
||||
@ -599,7 +599,7 @@ contains
|
||||
! CHECK: %[[BOX_DIMS:.*]]:3 = fir.box_dims %[[EXACT_BOX]], %[[C0]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, index) -> (index, index, index)
|
||||
! CHECK: %[[C1:.*]] = arith.constant 1 : index
|
||||
! CHECK: %[[SLICE:.*]] = fir.slice %[[C1]], %[[BOX_DIMS]]#1, %[[C1]] path %[[FIELD_B]] : (index, index, index, !fir.field) -> !fir.slice<1>
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[EXACT_BOX]] [%[[SLICE]]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, !fir.slice<1>) -> !fir.array<?xi32>
|
||||
! CHECK: %[[ARRAY_LOAD:.*]] = fir.array_load %[[EXACT_BOX]] [%[[SLICE]]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, !fir.slice<1>) -> !fir.array<?xi32>
|
||||
! CHECK: %[[DO_RES:.*]] = fir.do_loop %[[IND:.*]] = %{{.*}} to %{{.*}} step %c{{.*}} unordered iter_args(%[[ARG:.*]] = %[[ARRAY_LOAD]]) -> (!fir.array<?xi32>) {
|
||||
! CHECK: %[[ARR_UP:.*]] = fir.array_update %[[ARG]], %{{.*}}, %[[IND]] : (!fir.array<?xi32>, i32, index) -> !fir.array<?xi32>
|
||||
! CHECK: fir.result %[[ARR_UP]] : !fir.array<?xi32>
|
||||
@ -607,7 +607,7 @@ contains
|
||||
! CHECK: fir.array_merge_store %[[ARRAY_LOAD]], %[[DO_RES]] to %[[EXACT_BOX]][%[[SLICE]]] : !fir.array<?xi32>, !fir.array<?xi32>, !fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>, !fir.slice<1>
|
||||
! CHECK: cf.br ^bb{{.*}}
|
||||
! CHECK: ^bb{{.*}}:
|
||||
! CHECK: %[[EXACT_BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>) -> !fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp2{a:i32,b:i32,c:i32}>>>
|
||||
! CHECK: %[[EXACT_BOX:.*]] = fir.convert %[[SELECTOR]] : (!fir.class<!fir.array<?x!fir.type<_QMselect_type_lower_testTp1{a:i32,b:i32}>>>) -> !fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp2{a:i32,b:i32,c:i32}>>>
|
||||
! CHECK: %[[FIELD_A:.*]] = fir.field_index a, !fir.type<_QMselect_type_lower_testTp2{a:i32,b:i32,c:i32}>
|
||||
! CHECK: %[[C0:.*]] = arith.constant 0 : index
|
||||
! CHECK: %[[BOX_DIMS:.*]]:3 = fir.box_dims %[[EXACT_BOX]], %[[C0]] : (!fir.box<!fir.array<?x!fir.type<_QMselect_type_lower_testTp2{a:i32,b:i32,c:i32}>>>, index) -> (index, index, index)
|
||||
|
||||
@ -21,7 +21,7 @@ end function
|
||||
|
||||
! Check this is not lowered as a simple macro: e.g. argument is only
|
||||
! evaluated once even if it appears in several placed inside the
|
||||
! statement function expression
|
||||
! statement function expression
|
||||
! CHECK-LABEL: func @_QPtest_stmt_only_eval_arg_once() -> f32
|
||||
real(4) function test_stmt_only_eval_arg_once()
|
||||
real(4) :: only_once, x1
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
subroutine s
|
||||
! CHECK-DAG: fir.alloca !fir.box<!fir.heap<i32>> {{{.*}}uniq_name = "{{.*}}Eally"}
|
||||
integer, allocatable :: ally
|
||||
! CHECK-DAG: fir.alloca !fir.box<!fir.ptr<i32>> {{{.*}}uniq_name = "{{.*}}Epointy"}
|
||||
! CHECK-DAG: fir.alloca !fir.box<!fir.ptr<i32>> {{{.*}}uniq_name = "{{.*}}Epointy"}
|
||||
integer, pointer :: pointy
|
||||
! CHECK-DAG: fir.alloca i32 {{{.*}}fir.target{{.*}}uniq_name = "{{.*}}Ebullseye"}
|
||||
integer, target :: bullseye
|
||||
|
||||
@ -42,7 +42,7 @@ subroutine test_scalar_volatile()
|
||||
! Deferred-length characters
|
||||
allocate(character(20) :: c1)
|
||||
c1 = "volatile character"
|
||||
|
||||
|
||||
! Allocation with components
|
||||
allocate(v3)
|
||||
deallocate(v1, v2, v3, c1)
|
||||
@ -53,24 +53,24 @@ subroutine test_volatile_asynchronous()
|
||||
use derived_types
|
||||
class(base_type), allocatable, volatile, asynchronous :: v1(:)
|
||||
integer, allocatable, volatile, asynchronous :: i1(:)
|
||||
|
||||
|
||||
allocate(v1(4))
|
||||
allocate(i1(4), source=[1, 2, 3, 4])
|
||||
|
||||
|
||||
deallocate(v1, i1)
|
||||
end subroutine
|
||||
|
||||
subroutine test_select_base_type_volatile()
|
||||
use derived_types
|
||||
class(base_type), allocatable, volatile :: v(:)
|
||||
|
||||
|
||||
allocate(v(2))
|
||||
|
||||
|
||||
select type(v)
|
||||
class is (base_type)
|
||||
v(1)%i = 100
|
||||
end select
|
||||
|
||||
|
||||
deallocate(v)
|
||||
end subroutine
|
||||
|
||||
@ -79,12 +79,12 @@ subroutine test_mold_allocation()
|
||||
use derived_types
|
||||
type(comp_type) :: template
|
||||
type(comp_type), allocatable, volatile :: v(:)
|
||||
|
||||
|
||||
template%str = "mold test"
|
||||
template%arr = [5, 6]
|
||||
|
||||
|
||||
allocate(v(3), mold=template)
|
||||
|
||||
|
||||
deallocate(v)
|
||||
end subroutine
|
||||
|
||||
@ -93,28 +93,28 @@ subroutine test_unlimited_polymorphic()
|
||||
use derived_types
|
||||
class(*), allocatable, volatile :: up
|
||||
class(*), allocatable, volatile :: upa(:)
|
||||
|
||||
|
||||
! Scalar allocation
|
||||
allocate(integer :: up)
|
||||
select type(up)
|
||||
type is (integer)
|
||||
up = 123
|
||||
end select
|
||||
|
||||
|
||||
! Array allocation with source
|
||||
allocate(character(10) :: up)
|
||||
select type(up)
|
||||
type is (character(*))
|
||||
up = "class(*)"
|
||||
end select
|
||||
|
||||
|
||||
! Array allocation
|
||||
allocate(real :: upa(3))
|
||||
select type(upa)
|
||||
type is (real)
|
||||
upa = [1.1, 2.2, 3.3]
|
||||
end select
|
||||
|
||||
|
||||
deallocate(up, upa)
|
||||
end subroutine
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ integer,volatile::a
|
||||
integer::n,i
|
||||
a=0
|
||||
n=1000
|
||||
!$omp parallel
|
||||
!$omp parallel
|
||||
!$omp do reduction(+:a)
|
||||
do i=1,n
|
||||
a=a+1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user