File: dummy-arguments.f90

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,998,520 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (41 lines) | stat: -rw-r--r-- 1,091 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
! RUN: bbc -hlfir=false %s -o - | FileCheck %s

! CHECK-LABEL: _QQmain
program test1
  ! CHECK-DAG: %[[TMP:.*]] = fir.alloca
  ! CHECK-DAG: %[[TEN:.*]] = arith.constant
  ! CHECK: fir.store %[[TEN]] to %[[TMP]]
  ! CHECK-NEXT: fir.call @_QFPfoo
  call foo(10)
contains

! CHECK-LABEL: func private @_QFPfoo
subroutine foo(avar1)
  integer :: avar1
!  integer :: my_data, my_data2
!  DATA my_data / 150 /
!  DATA my_data2 / 150 /
!  print *, my_data, my_data2
  print *, avar1
end subroutine
! CHECK: }
end program test1

! CHECK-LABEL: func @_QPsub2
function sub2(r)
  real :: r(20)
  ! CHECK: %[[coor:.*]] = fir.coordinate_of %arg0
  ! CHECK: = fir.call @_QPf(%[[coor]]) {{.*}}: (!fir.ref<f32>) -> f32
  sub2 = f(r(1))
  ! CHECK: return %{{.*}} : f32
end function sub2

! Test TARGET attribute lowering
! CHECK-LABEL: func @_QPtest_target(
! CHECK-SAME: !fir.ref<i32> {fir.bindc_name = "i", fir.target},
! CHECK-SAME: !fir.box<!fir.array<?xf32>> {fir.bindc_name = "x", fir.target})
subroutine test_target(i, x)
  integer, target :: i
  real, target :: x(:)
  print *, xs, xa
end subroutine