Bug 33264 - lower index bound incorrect after array pointer assignment
Summary: lower index bound incorrect after array pointer assignment
Status: RESOLVED DUPLICATE of bug 33139
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-31 12:46 UTC by Oskar Enoksson
Modified: 2007-08-31 13:56 UTC (History)
4 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oskar Enoksson 2007-08-31 12:46:42 UTC
When assigning from an array with lower index bound /=1 the lower index bound is ignored (set to 1). Afaik the lower index bound should be copied from the target.

PROGRAM TST
  IMPLICIT NONE
  REAL, TARGET :: A(10:20)
  REAL, POINTER :: B(:)
  B => A
  WRITE(*,*) LBOUND(B,1)
END PROGRAM TST

bash> gfortran421 -o tst tst.f90
bash> ./tst
1
bash>
Comment 1 Francois-Xavier Coudert 2007-08-31 13:56:44 UTC
This was PR33139. It's fixed on mainline (4.3), but as it's actually not a regression, it will probably not be backported to the 4.2 branch. Sorry.

*** This bug has been marked as a duplicate of 33139 ***