[Bug fortran/51904] New: Internal Compiler Error on size function evaluation
david.sagan at gmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Jan 19 15:08:00 GMT 2012
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)".
More information about the Gcc-bugs
mailing list