public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42083]  New: [C++0x] ICE on invalid with "tree check: expected aggr_init_expr, have error_mark in build_value_init"
@ 2009-11-17 20:02 lloyd at randombit dot net
  2010-01-21  5:04 ` [Bug c++/42083] " lloyd at randombit dot net
  2010-01-21 10:07 ` paolo dot carlini at oracle dot com
  0 siblings, 2 replies; 7+ messages in thread
From: lloyd at randombit dot net @ 2009-11-17 20:02 UTC (permalink / raw)
  To: gcc-bugs

This code (in includes needed) ICEs with GCC 4.5 20091112

template<typename F>
decltype(F()) run(F f)
   {
   return f();
   }

int main()
   {
   auto l = []() { return 5; };

   run(l);
   }

Compiler output:

$ g++-4.5-20091112 -std=c++0x decl.cpp -o decl
decl.cpp: In function 'int main()':
decl.cpp:14:9: error: no matching function for call to
'main()::<lambda()>::__lambda0()'
decl.cpp:12:11: note: candidates are: main()::<lambda()>::<lambda>(const
main()::<lambda()>&)
decl.cpp:12:11: note:                
main()::<lambda()>::<lambda>(main()::<lambda()>&&)
decl.cpp:14:9: internal compiler error: tree check: expected aggr_init_expr,
have error_mark in build_value_init, at cp/init.c:319
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: [C++0x] ICE on invalid with "tree check: expected
                    aggr_init_expr, have error_mark in build_value_init"
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: lloyd at randombit dot net
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-42083-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2010-12-15 17:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-17 20:02 [Bug c++/42083] New: [C++0x] ICE on invalid with "tree check: expected aggr_init_expr, have error_mark in build_value_init" lloyd at randombit dot net
2010-01-21  5:04 ` [Bug c++/42083] " lloyd at randombit dot net
2010-01-21 10:07 ` paolo dot carlini at oracle dot com
     [not found] <bug-42083-4@http.gcc.gnu.org/bugzilla/>
2010-12-09 11:27 ` paolo.carlini at oracle dot com
2010-12-09 16:43 ` paolo.carlini at oracle dot com
2010-12-15 17:35 ` paolo at gcc dot gnu.org
2010-12-15 17:42 ` paolo.carlini at oracle dot com

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