http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54788
Bug #: 54788 Summary: ICE on pointer-array element assignment 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 Hello, I'm sending below a short code causing an ICE of gfortran. HTH, Sylwester P.S. BTW, could you help me in understanding the following error message: $ cat question.f90 program question type :: arr_t real, pointer :: arr(:,:) end type class(arr_t), pointer :: vec(:) allocate(vec(2)) allocate(vec(0)%arr(4,4)) vec(1) => vec(0) end $ gfortran question.f90 question.f90:8.2: vec(1) => vec(0) 1 Error: Expected bounds specification for 'vec' at (1) In principle, I'm trying to define a vector of pointers to arrays, and make two elements of this vector point to the same array. ---------------------------------------------------------------------- $ cat bug.f90 program bug integer, pointer :: a(:) integer :: b allocate(a(0:0)) a(0:0) => b end $ /usr/lib/gcc-snapshot/bin/gfortran bug.f90 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