summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/convert_implied_open.f90
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-25 21:31:48 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2006-03-25 21:31:48 +0000
commitbd6bf970b4236474ba12165ddb37c57e6c57d01c (patch)
tree43f3551e20dd0b93f0b50726351f0865ff0fe609 /gcc/testsuite/gfortran.dg/convert_implied_open.f90
parent56ce4f1a54b78117247c41cc8e5f3a0322355653 (diff)
downloadgcc-bd6bf970b4236474ba12165ddb37c57e6c57d01c.tar.gz
2006-03-25 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/26735 * io/transfer.c (data_transfer_init): Set u_flags.convert on an unopened unit if specified by environment variable (via get_unformatted_convert) or by compile-time option. 2006-03-25 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/26735 * gfortran.dg/convert_implied_open.f90: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112382 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gfortran.dg/convert_implied_open.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/convert_implied_open.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/convert_implied_open.f90 b/gcc/testsuite/gfortran.dg/convert_implied_open.f90
new file mode 100644
index 00000000000..4066f618cc2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/convert_implied_open.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! { dg-options "-fconvert=swap" }
+! PR 26735 - implied open didn't use to honor -fconvert
+program main
+ implicit none
+ integer (kind=8) :: i1, i2, i3
+ write (10) 1_8
+ close (10)
+ open (10, form="unformatted", access="direct", recl=8)
+ read (10,rec=1) i1
+ read (10,rec=2) i2
+ read (10,rec=3) i3
+ if (i1 /= 8 .or. i2 /= 1 .or. i3 /= 8) call abort
+ close (10,status="delete")
+end program main