http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54778
Bug #: 54778 Summary: an ICE on invalid OO code Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: sla...@staszic.waw.pl Hi, Enclosing below the steps to reproduce an ICE on an invalid OO code. HTH, Sylwester $ cat bug.f95 module bug_m implicit none type :: arr_t real, dimension(:,:), pointer :: at end type type :: bug_t class(arr_t), allocatable :: elements(:) end type contains function elem(this, i) type(bug_t), intent(in) :: this integer, intent(in) :: i class(arr_t) :: elem elem = this%elements(i) end function end module $ /usr/lib/gcc-snapshot/bin/gfortran bug.f95 bug.f95:14.2: function elem(this, i) 1 Error: CLASS variable 'elem' at (1) must be dummy, allocatable or pointer f951: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-snapshot/README.Bugs> for instructions. $ /usr/lib/gcc-snapshot/bin/gfortran --version GNU Fortran (Debian 20120930-1) 4.8.0 20120930 (experimental) [trunk revision 191865] Copyright (C) 2012 Free Software Foundation, Inc. GNU Fortran comes with NO WARRANTY, to the extent permitted by law. You may redistribute copies of GNU Fortran under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING