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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [fmt_zero_digits.f90] - Blame information for rev 801

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Verify that when decimal precision is zero, error error given except with 1P.
3
! Submitted by Jerry DeLisle  
4
! Modified for fix to PR35036
5
program test
6
  implicit none
7
  character(20) :: astr
8
  integer       :: istat
9
  50 FORMAT (1PD20.0)
10
  astr = ""
11
  write(astr,50) -8.0D0
12
  if (astr.ne."             -8.D+00") call abort
13
  write(astr,50) 8.0D0
14
  if (astr.ne."              8.D+00") call abort
15
  write(astr, '(E15.0)', iostat=istat) 1e5
16
  if (istat /= 5006) call abort
17
  write(astr, '(D15.0)', iostat=istat) 1e5
18
  if (istat /= 5006) call abort
19
  write(astr, '(G15.0)', iostat=istat) 1e5
20
  if (istat /= 5006) call abort
21
  write(astr, '(2PE15.0)', iostat=istat) 1e5
22
  if (istat /= 5006) call abort
23
  write(astr, '(0PE15.0)', iostat=istat) 1e5
24
  if (istat /= 5006) call abort
25
  write(astr, '(1PE15.0)', iostat=istat) 1e5
26
  if (istat /= 0) call abort
27
  write(astr, '(F15.0)', iostat=istat) 1e5
28
  if (astr.ne."        100000.") call abort
29
  if (istat /= 0) call abort
30
end program test

powered by: WebSVN 2.1.0

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