This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/47388] [4.6 Regression] ICE: in begin_for_stmt, at cp/semantics.c:863 with -fno-for-scope and for(;;) inside a template
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Jan 2011 21:35:05 +0000
- Subject: [Bug c++/47388] [4.6 Regression] ICE: in begin_for_stmt, at cp/semantics.c:863 with -fno-for-scope and for(;;) inside a template
- Auto-submitted: auto-generated
- References: <bug-47388-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47388
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-21 21:34:29 UTC ---
Author: jakub
Date: Fri Jan 21 21:34:25 2011
New Revision: 169105
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169105
Log:
PR c++/47388
* semantics.c (begin_for_stmt): If -fno-for-scope, don't
assume init must be NULL if scope is NULL.
(begin_range_for_stmt): Likewise.
* g++.dg/cpp0x/range-for10.C: New test.
* g++.dg/template/for1.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/cpp0x/range-for10.C
trunk/gcc/testsuite/g++.dg/template/for1.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/semantics.c
trunk/gcc/testsuite/ChangeLog