0
,有沒有人遇到下列錯誤配備了GCC 3.4,升壓1.34.1 有衝突的代碼是沿着線:與海灣合作委員會的std :: map.find 3.4內部編譯器錯誤
class Symbol
{
/// ...
bool operator<(const Symbol& rhs) const;
};
typedef boost::function< double(const XYZ::Date&) > F;
typedef std::map<Symbol, F> M;
M aMap; // properly instantiated
Symbol s; // properly instantied
M::const_iterator it = aMap.find(s); // dies in this call, see below
Symbol.h :97引用布爾運算符<(常量符號&)const成員函數, 比較兩個Symbol類型實例。這在所有編譯器上都可以正常工作,除了gcc 3.4 ,它會導致以下內部編譯器錯誤。
/XYZ/include/XYZ/AAA/Type/Symbol.h:97:內部編譯器錯誤:在gen_subprogram_die,在dwarf2out.c:11278
我一直試圖找到任何指針上述原因導致網絡失敗,但無法找到任何解決方案。有沒有人通過任何改變遇到這種情況?或者有人指出爲什麼gcc編譯器在那一刻死亡?
感謝您的任何幫助。
/XYZ/AAA/Type/Symbol.h: In member function `bool XYZ::Symbol::operator<(const XYZ::Symbol&) const':
/XYZ/AAA/Type/Symbol.h:97:
instantiated from `bool std::less<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = XYZ::Symbol]'
/usr/local/include/c++/3.4.5/bits/stl_tree.h:1125:
instantiated from
`typename std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::const_iterator std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::find(const _Key&) const
[with
_Key = XYZ::Symbol,
_Val = std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > >,
_KeyOfValue = std::_Select1st<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >,
_Compare = std::less<XYZ::Symbol>,
_Alloc = std::allocator<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >
]'
/usr/local/include/c++/3.4.5/bits/stl_map.h:513:
instantiated from
`typename std::_Rb_tree<_Key, std::pair<const I, T>, std::_Select1st<std::pair<const I, T> >, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::find(const _Key&) const
[with
_Key = XYZ::Symbol,
_Tp = boost::function<double()(const XYZ::Date&), std::allocator<void> >,
_Compare = std::less<XYZ::Symbol>,
_Alloc = std::allocator<std::pair<const XYZ::Symbol, boost::function<double()(const XYZ::Date&), std::allocator<void> > > >
]'
AFunc.cpp:70: instantiated from here
/XYZ/include/XYZ/AAA/Type/Symbol.h:97: internal compiler error: in gen_subprogram_die, at dwarf2out.c:11278
gcc 3.4.5於2005年發佈(7年多前),爲什麼你沒有升級? – 2012-04-26 04:12:59
@JesseGood:也許是因爲OP不是一個決定... – 2012-04-26 08:24:00