This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/37500] [4.4 Regression] libstdc++ failed to compile at -O0
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Sep 2008 03:52:41 -0000
- Subject: [Bug middle-end/37500] [4.4 Regression] libstdc++ failed to compile at -O0
- References: <bug-37500-682@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2008-09-13 03:52 -------
Here is a reduced testcase for the variadic-tuple.C failure.
Compile with --param ggc-min-expand=0 --param ggc-min-heapsize=0 -w:
namespace std __attribute__ ((__visibility__ ("default"))) {
template<typename _CharT> class basic_string;
typedef basic_string<char> string;
template<typename _CharT>
struct basic_string {
void _M_destroy() throw();
basic_string(const char* __s);
~basic_string() {
_M_destroy();
}
};
template<typename _CharT> void basic_string<_CharT>:: _M_destroy() throw ()
{ }
extern template class basic_string<char>;
};
template<typename... Values> class tuple;
template<> class tuple<> { };
template<typename Head, typename... Tail> struct tuple<Head, Tail...> : private
tuple<Tail...> {
typedef tuple<Tail...> inherited;
tuple() { }
template<typename... VValues> tuple(const tuple<VValues...>& other)
:
m_head(other.head())
,inherited(other.tail())
{ }
const Head &head() const { }
const inherited& tail() const { }
Head m_head;
};
int main() {
tuple<int, float, const char*> t3a;
tuple<long, double, std::string> t3b(t3a);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37500