forked from OSchip/llvm-project
[flang] Add semantic error test for integer constant containing division by zero
Original-commit: flang-compiler/f18@650cfac539 Reviewed-on: https://github.com/flang-compiler/f18/pull/468
This commit is contained in:
parent
33d6fb2332
commit
0dfecfa8c5
|
@ -35,4 +35,13 @@ real :: u(l*2)
|
|||
character(len=l) :: v
|
||||
!ERROR: Initialization expression for PARAMETER 'o' (o) cannot be computed as a constant value
|
||||
real, parameter :: o = o
|
||||
!ERROR: Must be a constant value
|
||||
integer, parameter :: p = 0/0
|
||||
!ERROR: Must be a constant value
|
||||
integer, parameter :: q = 1+2*(1/0)
|
||||
!ERROR: Must be a constant value
|
||||
integer(kind=2/0) r
|
||||
integer, parameter :: sok(:)=[1,2]/[1,2]
|
||||
!ERROR: Must be a constant value
|
||||
integer, parameter :: snok(:)=[1,2]/[1,0]
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue