This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33954] gfortran: incorrect output for array of dynamic bounds
- From: "hailijuan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 06:17:32 -0000
- Subject: [Bug fortran/33954] gfortran: incorrect output for array of dynamic bounds
- References: <bug-33954-15289@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from hailijuan at gmail dot com 2007-10-31 06:17 -------
Subject: Re: gfortran: incorrect output for array of dynamic bounds
not like that. it's right to use a(j,i) which has j as lower dimension.
memory layout of array(0:2, 0:1) is like:
a(0,0), a(1,0), a(2,0), a(0,1), a(1,1), a(2,1)
the testcase is invalid for gfortran. I would close the bug report.
31 Oct 2007 06:07:16 -0000, jvdelisle at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org>:
>
>
> ------- Comment #5 from jvdelisle at gcc dot gnu dot org 2007-10-31 06:07 -------
> You have the array indexes reversed:
>
> a(j,i)= i+j should be a(i,j) = i+j
>
> To keep your references within the bounds of the array you defined. Use
> -fbounds-check as Steve pointed out and you will get an error message.
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33954
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33954