OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [logical_2.f90] - Blame information for rev 831

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! PR fortran/30799
3
! Inconsistent handling of bad (invalid) LOGICAL kinds
4
! Reporter: Harald Anlauf 
5
! Testcase altered by Steven G. Kargl
6
program gfcbug57
7
  implicit none
8
  !
9
  ! These are logical kinds known by gfortran and many other compilers:
10
  !
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"
15
  !
16
  ! These are very strange (read: bad (invalid?)) logical kinds,
17
  ! handled inconsistently by gfortran (there's no logical(kind=0) etc.)
18
  !
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" }
22
  !
23
  ! Here gfortran bails out with a runtime error:
24
  !
25
  print *, .true._3   ! { dg-error "kind for logical constant" }
26
end program gfcbug57

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.