public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43875]  New: gcc-4.5.0 - ICE on invalid lambda return
@ 2010-04-23 22:48 paul dot bibbings at gmail dot com
  2010-04-23 22:50 ` [Bug c++/43875] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: paul dot bibbings at gmail dot com @ 2010-04-23 22:48 UTC (permalink / raw)
  To: gcc-bugs

The following code causes an ICE in gcc-4.5.0.  An error should be reported (as
per n3092, 5.1.2/4) owing to the fact that the return statement is invalid - a
brace-init-list is not an expression and hence the return type is void.

23:38:33 Paul Bibbings@JIJOU
/cygdrive/d/CPPProjects/nano/gcc_bugs $cat _5_1_2_4.cpp
int main()
{
   auto x2 = []{ return { 1, 2 }; };
}


23:39:08 Paul Bibbings@JIJOU
/cygdrive/d/CPPProjects/nano/gcc_bugs $i686-pc-cygwin-gcc-4.5.0 -Wall
-save-temps -std=c++0x -c _5_1_2_4.cpp
_5_1_2_4.cpp: In lambda function:
_5_1_2_4.cpp:3:32: internal compiler error: in convert_like_real, at
cp/call.c:4929
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


23:43:24 Paul Bibbings@JIJOU
/cygdrive/d/CPPProjects/nano/gcc_bugs $i686-pc-cygwin-gcc-4.5.0 -v
Using built-in specs.
COLLECT_GCC=i686-pc-cygwin-gcc-4.5.0
COLLECT_LTO_WRAPPER=/opt/gcc-4.5.0/libexec/gcc/i686-pc-cygwin/4.5.0/lto-wrapper.exe
Target: i686-pc-cygwin
Configured with: ./configure --prefix=/opt/gcc-4.5.0 --enable-bootstrap
--enable-version-specific-runtime-libs --enable-static --enable-shared
--enable-shared-libgcc --disable-__cxa_atexit --with-gnu-ld --with-gnu-as
--with-dwarf2 --disable-sjlj-exceptions --enable-languages=c,c++
--disable-symvers --enable-libgomp --enable-libssp --enable-threads=posix
--with-arch-i686 --with-tune=generic
Thread model: posix
gcc version 4.5.0 (GCC)


23:44:15 Paul Bibbings@JIJOU
/cygdrive/d/CPPProjects/nano/gcc_bugs $cat _5_1_2_4.ii
# 1 "_5_1_2_4.cpp"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "_5_1_2_4.cpp"
int main()
{
   auto x2 = []{ return { 1, 2 }; };
}


-- 
           Summary: gcc-4.5.0 - ICE on invalid lambda return
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paul dot bibbings at gmail dot com
  GCC host triplet: i686-pc-cygwin


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


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

end of thread, other threads:[~2010-05-03 21:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-23 22:48 [Bug c++/43875] New: gcc-4.5.0 - ICE on invalid lambda return paul dot bibbings at gmail dot com
2010-04-23 22:50 ` [Bug c++/43875] " pinskia at gcc dot gnu dot org
2010-04-27 21:22 ` [Bug c++/43875] [C++0x] " jason at gcc dot gnu dot org
2010-04-27 23:03 ` jason at gcc dot gnu dot org
2010-05-03 21:44 ` jason 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).