3 ! Inconsistent handling of bad (invalid) LOGICAL kinds
4 ! Reporter: Harald Anlauf <anlauf@gmx.de>
5 ! Testcase altered by Steven G. Kargl
9 ! These are logical kinds known by gfortran and many other compilers:
11 print *, kind (.true
._1
) ! This prints "1"
12 print *, kind (.true
._2
) ! This prints "2"
13 print *, kind (.true
._4
) ! This prints "4"
14 print *, kind (.true
._8
) ! This prints "8"
16 ! These are very strange (read: bad (invalid?)) logical kinds,
17 ! handled inconsistently by gfortran (there's no logical(kind=0) etc.)
19 print *, kind (.true
._0
) ! { dg-error "kind for logical constant" }
20 print *, kind (.true
._3
) ! { dg-error "kind for logical constant" }
21 print *, kind (.true
._123
) ! { dg-error "kind for logical constant" }
23 ! Here gfortran bails out with a runtime error:
25 print *, .true
._3
! { dg-error "kind for logical constant" }