From: SourceForge.net <no...@so...> - 2009-07-15 07:11:06
|
Bugs item #2821688, was opened at 2009-07-15 14:11 Message generated for change (Tracker Item Submitted) made by shura_zam You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2821688&group_id=2435 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: gcc Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Alexandr Zamaraev (shura_zam) Assigned to: Nobody/Anonymous (nobody) Summary: ICE if member function of template use local array Initial Comment: OS Windows Vista Home Basic Ru + sp2 g++ (GCC) 4.4.0 GNU ld (GNU Binutils) 2.19 Code: template <class T> struct test_t { int i; test_t() : i(10) {} char f() const { char buf[this->i]; //internal compiler error: Segmentation fault return buf[0]; } }; int main() { test_t<int> test; test.f(); } Console command: >g++ -c "ice_local_array.cpp" Output: ice_local_array.cpp: In member function 'char test_t<T>::f() const [with T = int]': ice_local_array.cpp:13: instantiated from here ice_local_array.cpp:6: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=2821688&group_id=2435 |