public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function
@ 2011-09-16 20:16 zeratul976 at hotmail dot com
  2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zeratul976 at hotmail dot com @ 2011-09-16 20:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50437
           Summary: [C++0x] [4.7 regression] ICE for trivial use of lambda
                    in template function
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zeratul976@hotmail.com


The following trivial use of a lambda in a template function:

template <typename T>
void f()
{
    auto g = [](T t){ return t == 0; };
    g(T());
}

int main()
{
    f<int>();
}

Gives the following ICE with GCC 4.7.0-20110910:

test.cpp: In instantiation of 'void f() [with T = int]':
test.cpp:10:12:   required from here
test.cpp:5:5: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:459

GCC 4.6.1 compiles the code successfully.


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

end of thread, other threads:[~2011-10-13 21:33 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-16 20:16 [Bug c++/50437] New: [C++0x] [4.7 regression] ICE for trivial use of lambda in template function zeratul976 at hotmail dot com
2011-09-22 17:18 ` [Bug c++/50437] " paolo.carlini at oracle dot com
2011-09-29 13:20 ` rguenth at gcc dot gnu.org
2011-10-10 14:07 ` rguenth at gcc dot gnu.org
2011-10-13 19:30 ` jason at gcc dot gnu.org
2011-10-13 21:24 ` jason at gcc dot gnu.org
2011-10-13 21:33 ` jason at gcc dot gnu.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).