public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42634]  New: ICE with -g -O2 -std=c++0x   in copy_fn_p, at cp/decl.c:9973
@ 2010-01-06 14:13 wouter dot vermaelen at scarlet dot be
  2010-01-06 16:30 ` [Bug c++/42634] " rguenth at gcc dot gnu dot org
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: wouter dot vermaelen at scarlet dot be @ 2010-01-06 14:13 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]

> cat bug.ii

template<typename T> T declval();
template<typename T, typename... Args> struct is_constructible {
        template<typename T1, typename... Args1>
                static decltype(T1(declval<Args1>()...), char()) test();
        static const bool value = sizeof(test<T, Args...>()) == 1;
};
template<bool> struct enable_if {
        typedef void type;
};
template<class T1, class T2> struct pair {
        template<class U2,
                 class = typename enable_if<is_constructible<T2,
U2&&>::value>::type>
        pair(const T1&, U2&&) { }
};
struct string {
        string() : p(0) {}
        char* p;
};
struct Foo {
          string s;
          int i;
};
void f() {
        pair<int, Foo>(1, Foo());
}


> g++ -g -O2 -std=c++0x bug.ii
bug.ii: In instantiation of ‘const bool is_constructible<Foo, int&&>::value’:
bug.ii:24:26:   instantiated from here
bug.ii:5:58: internal compiler error: in copy_fn_p, at cp/decl.c:9973


I'm using SVN revision trunk@155658 on linux x86_64.


-- 
           Summary: ICE with -g -O2 -std=c++0x   in copy_fn_p, at
                    cp/decl.c:9973
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wouter dot vermaelen at scarlet dot be


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


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-02-07  4:47 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-06 14:13 [Bug c++/42634] New: ICE with -g -O2 -std=c++0x in copy_fn_p, at cp/decl.c:9973 wouter dot vermaelen at scarlet dot be
2010-01-06 16:30 ` [Bug c++/42634] " rguenth at gcc dot gnu dot org
2010-01-06 22:50 ` bkoz at gcc dot gnu dot org
2010-01-06 22:51 ` bkoz at gcc dot gnu dot org
2010-01-07 20:07 ` dodji at gcc dot gnu dot org
2010-01-09 19:59 ` dodji at gcc dot gnu dot org
2010-01-12 13:40 ` doko at ubuntu dot com
2010-01-13 20:07 ` dodji at gcc dot gnu dot org
2010-01-13 20:08 ` dodji at gcc dot gnu dot org
2010-01-15 11:24 ` dodji at gcc dot gnu dot org
2010-01-15 11:29 ` dodji at gcc dot gnu dot org
2010-01-18 10:08 ` rguenth at gcc dot gnu dot org
2010-01-18 11:24 ` dodji at gcc dot gnu dot org
2010-01-18 21:19 ` dodji at gcc dot gnu dot org
2010-01-18 23:14 ` dodji at gcc dot gnu dot org
2010-01-19 15:39 ` dodji at gcc dot gnu dot org
2010-01-29 14:31 ` dodji at gcc dot gnu dot org
2010-01-29 16:07 ` dodji at gcc dot gnu dot org
2010-02-07  3:56 ` hjl dot tools at gmail dot com
2010-02-07  4:47 ` hjl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).