Bug 17553 - ICE on valid C++ virtual template static member in anonymous namespace
Summary: ICE on valid C++ virtual template static member in anonymous namespace
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: gcc4.1-c++ (show other bugs)
Version: unstable
Hardware: all Linux
: P2 major
Assignee: Dmitry V. Levin
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-13 18:48 MSD by Ivan A. Melnikov
Modified: 2008-10-18 16:49 MSD (History)
1 user (show)

See Also:


Attachments
Preprocessed source, как просили (375 bytes, application/octet-stream)
2008-10-13 18:48 MSD, Ivan A. Melnikov
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan A. Melnikov 2008-10-13 18:48:19 MSD
Created attachment 2994 [details]
Preprocessed source, как просили

Следующая ошибка воспроизводится на gcc4.1-c++-4.1.2-alt3:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33094

Это, в частности, мешает компиляции м приложений, использующих Boost.TypeTraits.

Пример некорректной работы:

$ cat test.cpp
namespace
{

template <typename T>
class A
{
  virtual T f1() { return c; }
  static const T c = 0;
};

A<int> v;

}

$ g++ test.cpp 
test.cpp: In instantiation of ‘const int <unnamed>::A<int>::c’:
test.cpp:7:   instantiated from ‘T<unnamed>::A<T>::f1() [with T = int]’
test.cpp:11:   instantiated from here
test.cpp:8: internal compiler error: in make_rtl_for_nonlocal_decl, at cp/decl.c:4970
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugzilla.altlinux.org/> for instructions.
Preprocessed source stored into /home/iv/tmp/ccUa5lIO.out file, please attach this to your bugreport.
Comment 1 Dmitry V. Levin 2008-10-18 16:49:00 MSD
Fixed upstream, available in gcc4.3-c++-4.3.2-alt1