blob: 2257fd8296c075e80fbe277707945495000fbcdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
! { dg-do run }
! { dg-options -fno-range-check }
! PR38504 double minus sign when printing integer
! Test case derived from example by Jos de Kloe
program IntAdtest
integer, parameter :: i8_ = Selected_Int_Kind(18) ! = integer*8
character(len=22) :: str_value
integer(i8_) :: value
character(len=*), parameter :: format_IntAd = "(i22)"
value = -9223372036854775807_i8_ -1
write(str_value, format_IntAd) value
if (str_value.ne." -9223372036854775808") call abort
end program IntAdtest
|