File: len_trim.f90

package info (click to toggle)
gcc-arm-none-eabi 15%3A14.2.rel1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,099,328 kB
  • sloc: cpp: 3,627,108; ansic: 2,571,498; ada: 834,230; f90: 235,082; makefile: 79,231; asm: 74,984; xml: 51,692; exp: 39,736; sh: 33,298; objc: 15,629; python: 15,069; fortran: 14,429; pascal: 7,003; awk: 5,070; perl: 3,106; ml: 285; lisp: 253; lex: 204; haskell: 135
file content (33 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download | duplicates (2)
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
! { dg-do compile }
! { dg-options "-O -Wall -Wconversion-extra -fdump-tree-original" }
! { dg-final { scan-tree-dump-not "_gfortran_stop_numeric" "original" } }
! PR fortran/87711 - ICE in gfc_trans_transfer
! PR fortran/87851 - return type for len_trim

program main
  implicit none
  character(3), parameter :: a(1) = 'aa'
  character(3)            :: b    = "bb"
  character(3)            :: c(1) = 'cc'
  integer(4), parameter   :: l4(1) = len_trim (a, kind=4)
  integer(8), parameter   :: l8(1) = len_trim (a, kind=8)
  integer                 :: kk(1) = len_trim (a)
  integer(4)              :: mm(1) = len_trim (a, kind=4)
  integer(8)              :: nn(1) = len_trim (a, kind=8)
  kk = len_trim (a)
  mm = len_trim (a, kind=4)
  nn = len_trim (a, kind=8)
  mm = len_trim (a,      4)
  nn = len_trim (a,      8)
  kk = len_trim ([b])
  mm = len_trim ([b],kind=4)
  nn = len_trim ([b],kind=8)
  mm = len_trim ([b],     4)
  nn = len_trim ([b],     8)
  kk = len_trim (c)
  mm = len_trim (c, kind=4)
  nn = len_trim (c, kind=8)
  mm = len_trim (c,      4)
  nn = len_trim (c,      8)
  if (any (l4 /= 2_4) .or. any (l8 /= 2_8)) stop 1
end program main