------- Comment #1 from burnus at gcc dot gnu dot org  2007-08-22 06:36 -------
Minimal example:
  implicit none
  real, TARGET :: a(0:100)
  real, pointer :: p(:)
  p => a
  print *, lbound(a), ubound(a)
  print *, lbound(p), ubound(p)
  end

Prints:
           0         100
           1         101
instead of (ifort, NAG f95, g95):
 0 100
 0 100

"7.4.2.1 Data pointer assignment"

"If no bounds-remapping-list is specified, the extent of a dimension of
data-pointer-object is the extent of the corresponding dimension of
data-target. [...] the lower bound of each dimension is the result of the
intrinsic function LBOUND (13.7.60) applied to the corresponding dimension of
data-target. The upper bound of each dimension is one less than the sum of the
lower bound and the extent."


-- 

burnus at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |32834
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2007-08-22 06:36:24
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33139

Reply via email to