This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/51904] New: Internal Compiler Error on size function evaluation
- From: "david.sagan at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 19 Jan 2012 15:03:52 +0000
- Subject: [Bug fortran/51904] New: Internal Compiler Error on size function evaluation
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51904
Bug #: 51904
Summary: Internal Compiler Error on size function evaluation
Classification: Unclassified
Product: gcc
Version: 4.6.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: david.sagan@gmail.com
The following program produces an "internal compiler error" in 4.6.3. gcc 4.5
does not show the bug:
subroutine qp_draw_polyline_basic (x)
implicit none
real :: x(:), f
f = 0
print *, size(f*x)
end subroutine
Result:
mc66:~/Bmad/bmad_dist/bug> uname -a
Darwin mc66.lns.cornell.edu 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7
16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
mc66:~/Bmad/bmad_dist/bug> gfortran --version
GNU Fortran (GCC) 4.6.2
mc66:~/Bmad/bmad_dist/bug> gfortran -c bug.f90
f951: internal compiler error: Segmentation fault
Of course the workaround is easy: Just replace "size(f*x)" with "size(x)".