File: big-integer-parameter.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 (39 lines) | stat: -rw-r--r-- 1,715 bytes parent folder | download | duplicates (14)
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
! Test correct lowering of 128 bit integer parameters.
! RUN: bbc -emit-fir %s -o - | FileCheck %s

program i128
  integer(16), parameter :: maxi64 = 9223372036854775807_16
  integer(16), parameter :: mini64 = -9223372036854775808_16
  integer(16), parameter :: maxi128 = 170141183460469231731687303715884105727_16
  integer(16), parameter :: mini128 = -170141183460469231731687303715884105728_16
  integer(16), parameter :: x = 9223372036854775808_16
  integer(16), parameter :: y = -9223372036854775809_16
  integer(16), parameter :: z = 0_16
  print*,x
  print*,y
end

! CHECK-LABEL: func.func @_QQmain() attributes {fir.bindc_name = "i128"} {
! CHECK-COUNT-2:  %{{.*}} = fir.call @_FortranAioOutputInteger128(%{{.*}}, %{{.*}}) {{.*}}: (!fir.ref<i8>, i128) -> i1


! CHECK-LABEL: fir.global internal @_QFECmaxi128 constant : i128 {
! CHECK-NEXT: %{{.*}} = arith.constant 170141183460469231731687303715884105727 : i128

! CHECK-LABEL: fir.global internal @_QFECmaxi64 constant : i128 {
! CHECK-NEXT:   %{{.*}} = arith.constant 9223372036854775807 : i128

! CHECK-LABEL: fir.global internal @_QFECmini128 constant : i128 {
! CHECK-NEXT: %{{.*}} = arith.constant -170141183460469231731687303715884105728 : i128

! CHECK-LABEL: fir.global internal @_QFECmini64 constant : i128 {
! CHECK-NEXT: %{{.*}} = arith.constant -9223372036854775808 : i128

! CHECK-LABEL: fir.global internal @_QFECx constant : i128 {
! CHECK-NEXT:   %{{.*}} = arith.constant 9223372036854775808 : i128
 
! CHECK-LABEL: fir.global internal @_QFECy constant : i128 {
! CHECK-NEXT: %{{.*}} = arith.constant -9223372036854775809 : i128

! CHECK-LABEL: fir.global internal @_QFECz constant : i128 {
! CHECK-NEXT: %{{.*}} = arith.constant 0 : i128