Bug 38235 - gfortran.dg/pr37243.f has undefined variables / bounds error
Summary: gfortran.dg/pr37243.f has undefined variables / bounds error
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: testsuite (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: Fortran_bounds_checking
  Show dependency treegraph
 
Reported: 2008-11-23 09:54 UTC by Thomas Koenig
Modified: 2009-01-06 21:34 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
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 Thomas Koenig 2008-11-23 09:54:03 UTC
$ ifort -CB pr37243.f
$ ./a.out
forrtl: severe (408): fort: (3): Subscript #2 of the array V has value 0 which is less than the lower bound of 1

Image              PC        Routine            Line        Source
a.out              0808C357  Unknown               Unknown  Unknown
a.out              0808B977  Unknown               Unknown  Unknown
a.out              0805934E  Unknown               Unknown  Unknown
a.out              0804B106  Unknown               Unknown  Unknown
a.out              0804A79F  Unknown               Unknown  Unknown
a.out              0804A26E  Unknown               Unknown  Unknown
a.out              08049BAF  Unknown               Unknown  Unknown
a.out              08049B61  Unknown               Unknown  Unknown
libc.so.6          B7E52455  Unknown               Unknown  Unknown
a.out              08049A91  Unknown               Unknown  Unknown
$ gfortran -fbounds-check pr37243.f
$ ./a.out
At line 37 of file pr37243.f
Fortran runtime error: Array reference out of bounds for array 'v', lower bound of dimension 2 exceeded (-1081884012 < 1)
Comment 1 Dominique d'Humieres 2008-11-23 10:08:08 UTC
The variable II in "CALL DAXPY(N,DUM,V(1,II),1,V(1,I),1)" is not initialized.
Comment 2 Mikael Morin 2009-01-06 21:34:50 UTC
(In reply to comment #1)
> The variable II in "CALL DAXPY(N,DUM,V(1,II),1,V(1,I),1)" is not initialized.
> 
This is fixed at revision 143124.
Closing.