This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/34980] [4.3 Regression] Segfault in shape given a scalar
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jan 2008 19:07:57 -0000
- Subject: [Bug libfortran/34980] [4.3 Regression] Segfault in shape given a scalar
- References: <bug-34980-10743@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #9 from tkoenig at gcc dot gnu dot org 2008-01-28 19:07 -------
Fixed on trunk.
Closing (so we're one regression down).
(In reply to comment #7)
> The commit fixed the SHAPE(scalar) problem in the front end.
> a) The following should print "1 0" but it prints "1 -8":
>
> integer :: i,j, a(10,10),res(2)
> j = 1
> i = 10
> res = shape(a(1:1,i:j:1))
> print *, res
> res = shape(a(1:1,j:i:-1))
> print *, res
> end
Now tracked as PR 35001.
> b) The following should be diagnosed with -fbounds-check.
> NAG -C=all prints:
> Rank 1 of array operand has extent 2 instead of 0
>
> integer :: i,j, a(10,10),res(2)
> j = 1
> i = 10
> res = [42, 24 ]
> res(2:j) = shape(a(1:1,i:j))
> print *, res
> end
Noted in PR 34670.
--
tkoenig at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34980