aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorThomas Koenig <Thomas.Koenig@online.de>2005-05-26 06:26:17 +0000
committerThomas Koenig <tkoenig@gcc.gnu.org>2005-05-26 06:26:17 +0000
commitba4a3d54bac34bb261bacffd774d9810d679d971 (patch)
tree2dfb829db3fc4cd9eef650e2f573a400e0c914ee /gcc
parentc10166c437ce15a119b663ac153a6bbcddb1ce84 (diff)
downloadgcc-ba4a3d54bac34bb261bacffd774d9810d679d971.zip
gcc-ba4a3d54bac34bb261bacffd774d9810d679d971.tar.gz
gcc-ba4a3d54bac34bb261bacffd774d9810d679d971.tar.bz2
re PR fortran/17283 (UNPACK issues)
2005-05-26 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/17283 * gfortran.fortran-torture/execute/intrinsic_unpack.f90: Test callee-allocated memory with write statements. 2005-05-26 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/17283 * intrinsics/unpack_generic.c: Fix name of routine on top. Update copyright years. (unpack1): Remove const from return array descriptor. rs: New variable, for calculating return sizes. Populate return array descriptor if ret->data is NULL. From-SVN: r100189
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_unpack.f904
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 9f2f537..aaff962 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-26 Thomas Koenig <Thomas.Koenig@online.de>
+
+ PR libfortran/17283
+ * gfortran.fortran-torture/execute/intrinsic_unpack.f90:
+ Test callee-allocated memory with write statements.
+
2005-05-25 Roger Sayle <roger@eyesopen.com>
PR middle-end/21709
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_unpack.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_unpack.f90
index 807aadf..88f09c3 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_unpack.f90
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_unpack.f90
@@ -2,6 +2,7 @@
program intrinsic_unpack
integer, dimension(3, 3) :: a, b
logical, dimension(3, 3) :: mask;
+ character(len=50) line1, line2
integer i
mask = reshape ((/.false.,.true.,.false.,.true.,.false.,.false.,&
@@ -10,6 +11,9 @@ program intrinsic_unpack
b = unpack ((/2, 3, 4/), mask, a)
if (any (b .ne. reshape ((/1, 2, 0, 3, 1, 0, 0, 0, 4/), (/3, 3/)))) &
call abort
+ write (line1,'(10I4)') b
+ write (line2,'(10I4)') unpack((/2, 3, 4/), mask, a)
+ if (line1 .ne. line2) call abort
b = -1
b = unpack ((/2, 3, 4/), mask, 0)
if (any (b .ne. reshape ((/0, 2, 0, 3, 0, 0, 0, 0, 4/), (/3, 3/)))) &