aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f9040
1 files changed, 40 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90
new file mode 100644
index 000000000..579d8a48c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/pr59700.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+! PR59700 Test case by Steve Kargl
+program foo
+
+ implicit none
+
+ character(len=80) msg
+ integer, parameter :: fd = 10
+ integer i1, i2, i3, i4
+ real x1, x2, x3, x4
+ complex c1, c2
+ logical a
+
+ open(unit=fd, status='scratch')
+ write(fd, '(A)') '1 2 3.4 q'
+
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=10, iomsg=msg) i1, i2, i3, i4
+10 if (msg /= 'Bad integer for item 3 in list input') call abort
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=20, iomsg=msg) x1, x2, x3, x4
+20 if (msg /= 'Bad real number in item 4 of list input') call abort
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=30, iomsg=msg) i1, x2, x1, a
+30 if (msg /= 'Bad logical value while reading item 4') call abort
+ rewind(fd)
+ read(fd, *, err=31, iomsg=msg) i1, x2, a, x1
+31 if (msg /= 'Bad repeat count in item 3 of list input') call abort
+ close(fd)
+ open(unit=fd, status='scratch')
+ write(fd, '(A)') '(1, 2) (3.4, q)'
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=40, iomsg=msg) c1, c2
+40 if (msg /= 'Bad floating point number for item 2') call abort
+ close(fd)
+end program foo