From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2441 invoked by alias); 25 Jul 2011 12:19:22 -0000 Received: (qmail 2433 invoked by uid 22791); 25 Jul 2011 12:19:21 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_IB X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 12:19:02 +0000 From: "sscrisk at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/49838] New: [C++0x] ICE in cp_parser_perform_range_for_lookup, at cp/parser.c:8796 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sscrisk at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 25 Jul 2011 12:19:00 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg02112.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49838 Summary: [C++0x] ICE in cp_parser_perform_range_for_lookup, at cp/parser.c:8796 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned@gcc.gnu.org ReportedBy: sscrisk@gmail.com The g++ 4.7.0 20110723 (experimental) compile the ill-formed codes when compiler say (normal) compiler error and ICE messages. Codes here: int main() { auto a; for(auto i: a) ; } Compiler messages: $ g++4.7 -std=c++0x -Wall -Wextra -pedantic a.cpp a.cpp: In function 'int main()': a.cpp:3:7: error: declaration of 'auto a' has no initializer a.cpp:4:14: error: unable to deduce 'auto&&' from 'a' a.cpp:4:14: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in cp_parser_ perform_range_for_lookup, at cp/parser.c:8796 Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Version info: $ g++4.7 -v Built by Equation Solution . Using built-in specs. COLLECT_GCC=C:\cygwin\home\RiSK\misc\gcc4.7\bin\g++.exe COLLECT_LTO_WRAPPER=c:/cygwin/home/risk/misc/gcc4.7/bin/../libexec/gcc/i686-pc-mingw32/4.7.0/lto-wrapper.exe Target: i686-pc-mingw32 Configured with: ../gcc-4.7-20110723-mingw/configure --host=i686-pc-mingw32 --build=x86_64-unknown-linux-gnu --target =i686-pc-mingw32 --prefix=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/gcc/4.7-20110723 --with-gcc --with-gnu -as --with-gnu-ld --with-host-libstdcxx='-lstdc++ -lsupc++ -lm' --with-ppl=/home/gfortran/gcc-home/binary/mingw32/nat ive/x86_32/ppl --with-cloog=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/cloog --with-gmp=/home/gfortran/gcc- home/binary/mingw32/native/x86_32/gmp --with-mpfr=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpfr --with-mp c=/home/gfortran/gcc-home/binary/mingw32/native/x86_32/mpc --with-sysroot=/home/gfortran/gcc-home/binary/mingw32/cros s/x86_32/gcc/4.7-20110723 --disable-shared --disable-nls --disable-tls --disable-win32-registry --enable-libquadmath- support --enable-libquadmath --enable-languages=c,c++,fortran --enable-libgomp --enable-threads=win32 --enable-lto -- enable-static --enable-shared=lto-plugin --enable-plugins --enable-ld=yes --enable-cloog-backend=ppl Thread model: win32 gcc version 4.7.0 20110723 (experimental) (GCC)