Bug 21211 - Internal compiler error, when array boundary set with maxval
Summary: Internal compiler error, when array boundary set with maxval
Status: RESOLVED DUPLICATE of bug 19358
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-25 10:00 UTC by Balint
Modified: 2005-07-23 22:49 UTC (History)
1 user (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 Balint 2005-04-25 10:00:39 UTC
Compiling the following code results in an internal compiler error:

> gfortran-4.0 buggy.f90 -o buggy.o
buggy.f90: In function 'testsub':
buggy.f90:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

> cat buggy.f90 
module test
contains
  subroutine testsub(lmax, idxorb)
    integer, intent(in) :: lmax(:)
    integer, intent(in) :: idxorb(-maxval(lmax):,0:)
    print *, idxorb
  end subroutine testsub
end module test
Comment 1 Andrew Pinski 2005-04-25 13:19:53 UTC
Actually it is the missing upper bound which is causing the segfault, this is a dup of bug 19358.

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