Bug 30145 - Fortran 90: write statement fails to ignore zero-sized array...
Summary: Fortran 90: write statement fails to ignore zero-sized array...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Jerry DeLisle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-11 12:50 UTC by Philip Mason
Modified: 2006-12-24 05:09 UTC (History)
1 user (show)

See Also:
Host: suse9 (x86_64)
Target: x86_64-unknown-linux-gnu
Build: gcc version 4.3.0 20061211 (experimental)
Known to work:
Known to fail:
Last reconfirmed: 2006-12-15 16:56:03


Attachments
Fortran 90 testcase for zero-sized array printing. (159 bytes, text/plain)
2006-12-11 12:58 UTC, Philip Mason
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Mason 2006-12-11 12:50:53 UTC
 
Comment 1 Philip Mason 2006-12-11 12:58:17 UTC
Created attachment 12780 [details]
Fortran 90 testcase for zero-sized array printing.
Comment 2 Philip Mason 2006-12-11 13:05:46 UTC
Write statement (fortran90) fails to ignore zero-sized array when
bounds on array are variable. Please see zeros.f90 file attached.
This was compiled as "gfortran zeros.f90" on suse9 (x86_64) box
using version 4.3.0 20061211 (experimental).
Comment 3 Jerry DeLisle 2006-12-15 15:57:43 UTC
I get a segfault. ifort handles this ok
Comment 4 Jerry DeLisle 2006-12-15 16:56:03 UTC
I have a patch for this.
Comment 5 patchapp@dberlin.org 2006-12-15 17:40:38 UTC
Subject: Bug number PR30145

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-12/msg01122.html
Comment 6 Jerry DeLisle 2006-12-15 19:55:03 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Fri Dec 15 19:54:52 2006
New Revision: 119942

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119942
Log:
2006-12-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* io/transfer.c (transfer_array):  Check for negative extent.

Modified:
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/io/transfer.c

Comment 7 Jerry DeLisle 2006-12-15 19:58:21 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Fri Dec 15 19:58:10 2006
New Revision: 119943

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=119943
Log:
2006-12-15  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* gfortran.dg/write_zero_array: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/write_zero_array.f90
Modified:
    trunk/gcc/testsuite/ChangeLog

Comment 8 Jerry DeLisle 2006-12-19 06:35:15 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Tue Dec 19 06:35:04 2006
New Revision: 120043

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120043
Log:
2006-12-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* io/transfer.c (transfer_array):  Check for negative extent.

Modified:
    branches/gcc-4_2-branch/libgfortran/ChangeLog
    branches/gcc-4_2-branch/libgfortran/io/transfer.c

Comment 9 Jerry DeLisle 2006-12-19 06:36:36 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Tue Dec 19 06:36:26 2006
New Revision: 120044

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120044
Log:
2006-12-18  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* gfortran.dg/write_zero_array.f90: New test.

Added:
    branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/write_zero_array.f90
Modified:
    branches/gcc-4_2-branch/gcc/testsuite/ChangeLog

Comment 10 Andrew Pinski 2006-12-24 05:09:52 UTC
Fixed.
Comment 11 Jerry DeLisle 2006-12-25 22:57:03 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Mon Dec 25 22:56:54 2006
New Revision: 120200

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120200
Log:
2006-12-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* io/transfer.c (transfer_array):  Check for negative extent.

Modified:
    branches/gcc-4_1-branch/libgfortran/ChangeLog
    branches/gcc-4_1-branch/libgfortran/io/transfer.c

Comment 12 Jerry DeLisle 2006-12-25 23:08:27 UTC
Subject: Bug 30145

Author: jvdelisle
Date: Mon Dec 25 23:08:17 2006
New Revision: 120201

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=120201
Log:
2006-12-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/30145
	* gfortran.dg/write_zero_array.f90: New test.

2006-12-25  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/30200
	* gfortran.dg/write_fmt_trim.f90: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/write_fmt_trim.f90
    branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/write_zero_array.f90
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog