view gcc/testsuite/gfortran.dg/boz_complex_2.f90 @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents 1830386684a0
children
line wrap: on
line source

! { dg-do compile }
! { dg-options "-fallow-invalid-boz" }
program foo

   implicit none

   complex(4) z

   z = complex(z'4444', 42)         ! { dg-warning "cannot appear in the" }
   if (real(z,4) /= 17476.0 .or. aimag(z) /= 42.0) stop 2

   z = complex(z'44444400', 42.)    ! { dg-warning "cannot appear in the" }
   if (real(z,4) /= 785.062500 .or. aimag(z) /= 42.0) stop 3

end program foo