diff --git a/flang/test/Semantics/resolve108.f90 b/flang/test/Semantics/resolve108.f90 --- a/flang/test/Semantics/resolve108.f90 +++ b/flang/test/Semantics/resolve108.f90 @@ -44,6 +44,7 @@ use :: m2, only: foo !If we got the type of foo right, this declaration will fail !due to an attempted division by zero. + !WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer, parameter :: test = 1 / (kind(foo(1)) - kind(1.d0)) end subroutine @@ -53,6 +54,7 @@ contains real(kind=kind(x)) function foo(x) real(kind=kind(1.0d0)) x + !WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer, parameter :: test = 1 / (kind(foo) - kind(1.d0)) foo = n diff --git a/flang/test/Semantics/resolve37.f90 b/flang/test/Semantics/resolve37.f90 --- a/flang/test/Semantics/resolve37.f90 +++ b/flang/test/Semantics/resolve37.f90 @@ -25,8 +25,13 @@ character(len=l) :: v !ERROR: Value of named constant 'o' (o) cannot be computed as a constant value real, parameter :: o = o +!WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer, parameter :: p = 0/0 +!WARNING: INTEGER(4) division by zero +!WARNING: INTEGER(4) division by zero +!WARNING: INTEGER(4) division by zero +!WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer, parameter :: q = 1+2*(1/0) integer not_constant @@ -34,9 +39,11 @@ integer, parameter :: s1 = not_constant/2 !ERROR: Must be a constant value integer, parameter :: s2 = 3/not_constant +!WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer(kind=2/0) r integer, parameter :: sok(*)=[1,2]/[1,2] +!WARNING: INTEGER(4) division by zero !ERROR: Must be a constant value integer, parameter :: snok(*)=[1,2]/[1,0] end diff --git a/flang/test/Semantics/resolve60.f90 b/flang/test/Semantics/resolve60.f90 --- a/flang/test/Semantics/resolve60.f90 +++ b/flang/test/Semantics/resolve60.f90 @@ -31,6 +31,7 @@ end enum enum, bind(C) + !WARNING: INTEGER(4) division by zero !ERROR: Enumerator value could not be computed from the given expression !ERROR: Must be a constant value enumerator :: wrong = 0/0