This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33139] array pointer assignment gives incorrect dimensions
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Aug 2007 11:23:33 -0000
- Subject: [Bug fortran/33139] array pointer assignment gives incorrect dimensions
- References: <bug-33139-15001@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-08-22 11:23 -------
> real, TARGET :: a(0:100)
> real, pointer :: p(:)
> p => a
> print *, lbound(a), ubound(a)
> print *, lbound(p), ubound(p)
> end
This generates the following code:
struct array1_real4 p;
real4 a[101];
p.data = 0B;
p.dtype = 281;
p.dim[0].lbound = 1;
p.dim[0].ubound = 101;
p.dim[0].stride = 1;
p.data = (void *) &a[0];
p.offset = -1;
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.3 4.2.1 4.3.0
Last reconfirmed|2007-08-22 06:36:24 |2007-08-22 11:23:33
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33139