public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50853] New: Internal Compiler Error returning a template type using brace initialization
@ 2011-10-24 13:08 public at alisdairm dot net
  2011-10-24 13:25 ` [Bug c++/50853] " redi at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: public at alisdairm dot net @ 2011-10-24 13:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50853
           Summary: Internal Compiler Error returning a template type
                    using brace initialization
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: public@alisdairm.net


The following obscure code produces an ICE when the function template 'test' is
called:


template<int> struct MyType{};

template<int VAL>
auto test(MyType<VAL>) -> MyType<int{VAL}> { return {}; }

int main() {
   MyType<int{256}>{};
   test( MyType<256>{} );  // no error without this call
}

The ICE produced is:

internal compiler error: in tsubst_copy_and_build, at cp/pt.c:13389


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

end of thread, other threads:[~2011-10-24 14:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-24 13:08 [Bug c++/50853] New: Internal Compiler Error returning a template type using brace initialization public at alisdairm dot net
2011-10-24 13:25 ` [Bug c++/50853] " redi at gcc dot gnu.org
2011-10-24 13:47 ` [Bug c++/50853] [C++0x] " paolo.carlini at oracle dot com
2011-10-24 14:03 ` public at alisdairm dot net
2011-10-24 14:07 ` redi at gcc dot gnu.org
2011-10-24 14:11 ` public at alisdairm dot net
2011-10-24 14:21 ` redi at gcc dot gnu.org
2011-10-24 14:23 ` redi at gcc dot gnu.org
2011-10-24 14:27 ` public at alisdairm dot net

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).