http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51154
--- Comment #1 from Craig Schroeder <cas43 at cs dot stanford.edu> 2011-11-16 07:28:29 UTC --- Created attachment 25834 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25834 Variation on same source causing failure with different message. This variant on the source file ICE's with this message: [lots of errors here] g++: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. Full diagnostic: two.cpp:7:33: error: expected ‘;’ after class definition two.cpp:19:20: error: ‘T’ was not declared in this scope two.cpp:19:21: error: template argument 1 is invalid two.cpp:39:36: error: ‘T’ does not name a type two.cpp:39:38: error: ISO C++ forbids declaration of ‘dt’ with no type [-fpermissive] two.cpp:39:47: error: ‘T’ does not name a type two.cpp:39:49: error: ISO C++ forbids declaration of ‘time’ with no type [-fpermissive] two.cpp:45:18: error: ‘STREAM_TYPE’ does not name a type two.cpp:52:80: error: ‘T’ does not name a type two.cpp:52:82: error: ISO C++ forbids declaration of ‘dt’ with no type [-fpermissive] two.cpp:52:91: error: ‘T’ does not name a type two.cpp:52:93: error: ISO C++ forbids declaration of ‘time’ with no type [-fpermissive] two.cpp: In member function ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int)’: two.cpp:53:15: error: ‘T’ was not declared in this scope two.cpp:53:17: error: ‘TV_INT’ was not declared in this scope two.cpp:53:23: error: template argument 1 is invalid two.cpp:53:23: error: template argument 2 is invalid two.cpp:53:38: error: invalid type in declaration before ‘(’ token two.cpp: In instantiation of ‘class VECTOR<float, 1>’: two.cpp:43:37: required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’ two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<float, VECTOR<float, 1> >’ two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<float, VECTOR<float, 1> >’ two.cpp: In instantiation of ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’: two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:12:21: error: ‘typedef float VECTOR<float, 1>::SCALAR’ is private two.cpp:43:37: error: within this context two.cpp:9:35: error: ‘template<class T2> struct VECTOR<float, 1>::REBIND’ is private two.cpp:44:57: error: within this context two.cpp:12:21: error: ‘typedef float VECTOR<float, 1>::SCALAR’ is private two.cpp:47:25: error: within this context two.cpp:9:35: error: ‘template<class T2> struct VECTOR<float, 1>::REBIND’ is private two.cpp:47:25: error: within this context two.cpp: In instantiation of ‘class ARRAYS_ND_BASE<VECTOR<float, 1> >’: two.cpp:23:37: required from ‘class ARRAY<float, VECTOR<int, 1> >’ two.cpp:47:25: required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’ two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:14:32: error: no type named ‘ELEMENT’ in ‘class VECTOR<float, 1>’ two.cpp:15:14: error: ‘dimension’ is not a member of ‘VECTOR<float, 1>’ two.cpp: In instantiation of ‘class VECTOR<int, 0>’: two.cpp:18:16: required from ‘class ARRAYS_ND_BASE<VECTOR<float, 1> >’ two.cpp:23:37: required from ‘class ARRAY<float, VECTOR<int, 1> >’ two.cpp:47:25: required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’ two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<int, VECTOR<int, 0> >’ two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<int, VECTOR<int, 0> >’ two.cpp: In instantiation of ‘class ARRAY<float, VECTOR<int, 1> >’: two.cpp:47:25: required from ‘class ADVECTION_EXAMPLE<VECTOR<float, 1> >’ two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:19:23: error: ‘int ARRAYS_ND_BASE<VECTOR<float, 1> >::array’ is private two.cpp:23:37: error: within this context two.cpp:18:16: error: ‘ARRAYS_ND_BASE<VECTOR<float, 1> >::TV_INT ARRAYS_ND_BASE<VECTOR<float, 1> >::counts’ is private two.cpp:23:37: error: within this context two.cpp: In instantiation of ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’: two.cpp:55:25: required from here two.cpp:53:79: error: expression list treated as compound expression in initializer [-fpermissive] two.cpp: In instantiation of ‘class VECTOR<int, 1>’: two.cpp:53:79: required from ‘void ADVECTION_DRIVER<TV>::Scalar_Advance(int, int) [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:8:37: error: invalid use of incomplete type ‘class VECTOR_BASE<int, VECTOR<int, 1> >’ two.cpp:6:40: error: declaration of ‘class VECTOR_BASE<int, VECTOR<int, 1> >’ two.cpp: In instantiation of ‘void ARRAY<T, VECTOR<int, d> >::Resize(const RANGE<VECTOR<int, d> >&, bool, bool, const T&) [with T = float; int d = 1]’: two.cpp:50:9: required from ‘void ADVECTION_DRIVER<TV>::Initialize() [with TV = VECTOR<float, 1>]’ two.cpp:55:25: required from here two.cpp:31:46: error: ‘const class RANGE<VECTOR<int, 1> >’ has no member named ‘Edge_Lengths’ two.cpp:20:55: error: ‘ARRAYS_ND_BASE<TV>& ARRAYS_ND_BASE<TV>::operator=(const T_ARRAY2&) [with T_ARRAY2 = VECTOR<int, 1>; TV = VECTOR<float, 1>; ARRAYS_ND_BASE<TV> = ARRAYS_ND_BASE<VECTOR<float, 1> >]’ is private two.cpp:32:3: error: within this context g++: internal compiler error: Segmentation fault (program cc1plus) Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.