Hi,
I've been trying to build libstdc++-v3 with a version of the Pro64
compiler and I've been mostly successful, but I ran across the following
error while building locale.cc
/tmp/ccs.KlJwfL: Assembler messages:
/tmp/ccs.KlJwfL:215: Error: attempt to .org backwards ignored
/tmp/ccs.KlJwfL:225: Error: attempt to .org backwards ignored
/tmp/ccs.KlJwfL:243: Error: attempt to .org backwards ignored
/tmp/ccs.KlJwfL:196: Error: attempt to .org/.space backwards? (-4)
/tmp/ccs.KlJwfL:320: Internal error!
Assertion failure in write_contents at ../../src/gas/write.c line 1130.
I reduced the file to a small test case, which I have attached to this
e-mail. It can be compiled with:
sgiCC -Wno-format -W -Wwrite-strings -Winline -fexceptions -c locale.i
-Wp,-fno-implicit-templates
I believe what's happening is that the front end is inserting extra data
in the initializers for the static class members, which causes the .org
directives to be incorrect. The extra data appears to come from template
instatiations that occur while the initializer is being emitted to the
.B file. In addition, if I remove the #pragma interface line from the
file, the problem goes away. I may have removed too much from the test
case, but I was wondering if others have seen this problem and if anyone
has found a solution.
#pragma interface "typeinfo"
namespace std {
template<class _CharT>
struct char_traits
{
};
}
namespace std {
template<typename _CharT, typename _Traits = char_traits<_CharT> >
class istreambuf_iterator;
}
namespace std
{
template<typename _CharT, typename _InIter = istreambuf_iterator<_CharT> >
class num_get;
class locale
{
public:
typedef int category;
class facet;
class id;
class _Impl;
friend class _Impl;
static const category none = 0;
static const category collate = 0x0100;
static const category ctype = 0x0200;
static const category monetary = 0x0400;
static const category numeric = 0x0800;
static const category time = 0x1000;
static const category messages = 0x2000;
static const category all = (collate | ctype | monetary |
numeric | time | messages);
};
class locale::_Impl
{
private:
static const locale::id* const _S_id_collate[];
static const locale::id* const _S_id_ctype[];
static const locale::id* const _S_id_monetary[];
static const locale::id* const _S_id_numeric[];
static const locale::id* const _S_id_time[];
static const locale::id* const _S_id_messages[];
static const locale::id* const* const _S_facet_categories[];
};
class locale::id
{
};
}
namespace std {
enum _Ios_Iostate { _S_ios_iostate_end = 1<<16 };
class ios_base
{
public:
typedef _Ios_Iostate iostate;
locale _M_ios_locale;
};
}
namespace std
{
template<typename _CharT, typename _InIter>
class num_get
{
public:
typedef _CharT char_type;
typedef _InIter iter_type;
typedef char_traits<_CharT> __traits_type;
static locale::id id;
protected:
virtual iter_type
do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
};
struct money_base
{
enum part { none, space, symbol, sign, value };
struct pattern { char field[4]; };
static const pattern _S_default_pattern;
};
template<typename _CharT, bool _Intl>
class moneypunct : public money_base
{
public:
static locale::id id;
};
}
namespace std {
const locale::id* const
locale::_Impl::_S_id_monetary[] =
{
&moneypunct<char, false>::id,
&std::moneypunct<char,true >::id,
0
};
const locale::id* const
locale::_Impl::_S_id_numeric[] =
{
&num_get<char>::id,
0
};
const locale::id* const* const
locale::_Impl::_S_facet_categories[] =
{
locale::_Impl::_S_id_collate,
locale::_Impl::_S_id_ctype,
locale::_Impl::_S_id_monetary,
locale::_Impl::_S_id_numeric,
locale::_Impl::_S_id_time,
locale::_Impl::_S_id_messages,
0
};
const money_base::pattern
money_base::_S_default_pattern = {{symbol, sign, none, value}};;
}
|