brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.6 KiB · c38d4f1 Raw
90 lines · plain
1! RUN: bbc %s -o - | tco | FileCheck %s --check-prefixes=CHECK%if target=x86_64{{.*}} %{,CHECK-KIND10%}%if flang-supports-f128-math %{,CHECK-KIND16%}2 3! CHECK-LABEL: define void {{.*}}test_reals4subroutine test_reals(x2, x3, x4, x8, c2, c3, c4, c8)5  character(10) :: in = 'NaN NaN'6 7  real(kind=2)  :: x28  real(kind=3)  :: x39  real(kind=4)  :: x410  real(kind=8)  :: x811 12  complex(kind=2)  :: c213  complex(kind=3)  :: c314  complex(kind=4)  :: c415  complex(kind=8)  :: c816 17  read(in,*) x218  ! CHECK:      insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 2, i32 {{[0-9]*}}, i8 0, i8 25, i8 0, i8 0 }, ptr %{{[0-9]*}}, 019  ! CHECK:      call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})20  print "(z4)", x221 22  read(in,*) x323  ! CHECK:      insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 2, i32 {{[0-9]*}}, i8 0, i8 26, i8 0, i8 0 }, ptr %{{[0-9]*}}, 024  ! CHECK:      call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})25  print "(z4)", x326 27  read(in,*) x428  ! CHECK:      call i1 @_FortranAioOutputReal32(ptr %{{[0-9]*}}, float %{{[0-9]*}})29  print "(z8)", x430 31  read(in,*) x832  ! CHECK:      call i1 @_FortranAioOutputReal64(ptr %{{[0-9]*}}, double %{{[0-9]*}})33  print "(z16)", x834 35  read(in,*) c236  ! CHECK:      insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 4, i32 {{[0-9]*}}, i8 0, i8 32, i8 0, i8 0 }, ptr %{{[0-9]*}}, 037  ! CHECK:      call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})38  print "(z4,' ',z4)", c239 40  read(in,*) c341  ! CHECK:      insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 4, i32 {{[0-9]*}}, i8 0, i8 33, i8 0, i8 0 }, ptr %{{[0-9]*}}, 042  ! CHECK:      call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})43  print "(z4,' ',z4)", c344 45  read(in,*) c446  ! CHECK:      call i1 @_FortranAioOutputComplex32(ptr %{{[0-9]*}}, float %{{[0-9]*}}, float %{{[0-9]*}})47  print "(z8,' ',z8)", c448 49  read(in,*) c850  ! CHECK:      call i1 @_FortranAioOutputComplex64(ptr %{{[0-9]*}}, double %{{[0-9]*}}, double %{{[0-9]*}})51  print "(z16,' ',z16)", c852 53end54 55! CHECK-KIND16-LABEL: test_kind1056subroutine test_kind10(x10, c10)57  integer, parameter :: kind10 = merge(10, 4, selected_real_kind(p=18).eq.10)58  character(10) :: in = 'NaN NaN'59  real(kind=kind10) :: x1060  complex(kind=kind10) :: c1061 62  read(in,*) x1063  ! CHECK-KIND10:  insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 16, i32 {{[0-9]*}}, i8 0, i8 29, i8 0, i8 0 }, ptr %{{[0-9]*}}, 064  ! CHECK-KIND10:  call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})65  print "(z20)", x1066 67  read(in,*) c1068  ! CHECK-KIND10:  insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 32, i32 {{[0-9]*}}, i8 0, i8 36, i8 0, i8 0 }, ptr %{{[0-9]*}}, 069  ! CHECK-KIND10:  call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})70  print "(z20,' ',z20)", c1071end subroutine72 73! CHECK-KIND16-LABEL: test_kind1674subroutine test_kind16(x16, c16)75  integer, parameter :: kind16 = merge(16, 4, selected_real_kind(p=33).eq.16)76  character(10) :: in = 'NaN NaN'77  real(kind=kind16) :: x1678  complex(kind=kind16) :: c1679 80  read(in,*) x1681  ! CHECK-KIND16:  insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 16, i32 {{[0-9]*}}, i8 0, i8 31, i8 0, i8 0 }, ptr %{{[0-9]*}}, 082  ! CHECK-KIND16:  call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})83  print "(z32)", x1684 85  read(in,*) c1686  ! CHECK-KIND16:  insertvalue { ptr, i64, i32, i8, i8, i8, i8 } { ptr undef, i64 32, i32 {{[0-9]*}}, i8 0, i8 38, i8 0, i8 0 }, ptr %{{[0-9]*}}, 087  ! CHECK-KIND16:  call i1 @_FortranAioOutputDescriptor(ptr %{{[0-9]*}}, ptr %{{[0-9]*}})88  print "(z32,' ',z32)", c1689end subroutine90