This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/33139] array pointer assignment gives incorrect dimensions



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]