public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/51046] New: ICE by unexpanded template param pack in range-based for
@ 2011-11-09  3:35 ai.azuma at gmail dot com
  2011-11-09 19:25 ` [Bug c++/51046] [C++0x] " paolo.carlini at oracle dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: ai.azuma at gmail dot com @ 2011-11-09  3:35 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51046
           Summary: ICE by unexpanded template param pack in range-based
                    for
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ai.azuma@gmail.com


The following ill-formed code results in ICE.


cryolite@blueplanet:~/work/test$ LANG=C
/home/cryolite/local/4.7.0/bin/g++-tlimit -v -save-temps -std=c++0x main.cpp
Using built-in specs.
COLLECT_GCC=/home/cryolite/local/4.7.0/bin/g++
COLLECT_LTO_WRAPPER=/home/cryolite/local/4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/cryolite/work/intro/gcc-4.7-20111105/configure
--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
--target=x86_64-unknown-linux-gnu --prefix=/home/cryolite/local/4.7.0
--enable-static --enable-shared --enable-multilib --enable-threads=posix
--enable-tls --with-arch-32=i686 --with-tune=generic --enable-bootstrap
--enable-languages=c,c++ --enable-libssp --enable-libgomp --enable-targets=all
--enable-nls --enable-lto --enable-libstdcxx-debug --disable-libstdcxx-pch
Thread model: posix
gcc version 4.7.0 20111105 (experimental) (GCC) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /home/cryolite/local/4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus
-E -quiet -v -D_GNU_SOURCE main.cpp -mtune=generic -march=x86-64 -std=c++11
-fpch-preprocess -o main.ii
ignoring nonexistent directory
"/home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0

/home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/x86_64-unknown-linux-gnu

/home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/backward
 /home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include
 /usr/local/include
 /home/cryolite/local/4.7.0/include

/home/cryolite/local/4.7.0/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++11' '-shared-libgcc'
'-mtune=generic' '-march=x86-64'
 /home/cryolite/local/4.7.0/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/cc1plus
-fpreprocessed main.ii -quiet -dumpbase main.cpp -mtune=generic -march=x86-64
-auxbase main -std=c++11 -version -o main.s
GNU C++ (GCC) version 4.7.0 20111105 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0 20111105 (experimental), GMP version 5.0.2,
MPFR version 3.0.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (GCC) version 4.7.0 20111105 (experimental) (x86_64-unknown-linux-gnu)
    compiled by GNU C version 4.7.0 20111105 (experimental), GMP version 5.0.2,
MPFR version 3.0.0-p3, MPC version 0.9
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 1c96d36acbd98a4b9c0fb64069912a60
main.cpp: In instantiation of 'void f() [with int ...IS = {0, 1, 2}]':
main.cpp:9:14:   required from here
main.cpp:4:3: internal compiler error: unexpected expression 'IS' of kind
template_parm_index
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

cryolite@blueplanet:~/work/test$ cat main.ii
# 1 "main.cpp"
# 1 "<command-line>"
# 1 "main.cpp"
template<int... IS>
void f()
{
  for (int i : IS);
}

int main()
{
  f<0, 1, 2>();
}


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

* [Bug c++/51046] [C++0x] ICE by unexpanded template param pack in range-based for
  2011-11-09  3:35 [Bug c++/51046] New: ICE by unexpanded template param pack in range-based for ai.azuma at gmail dot com
@ 2011-11-09 19:25 ` paolo.carlini at oracle dot com
  2011-11-09 22:26 ` jason at gcc dot gnu.org
  2011-11-09 22:33 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-11-09 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-11-09
     Ever Confirmed|0                           |1


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

* [Bug c++/51046] [C++0x] ICE by unexpanded template param pack in range-based for
  2011-11-09  3:35 [Bug c++/51046] New: ICE by unexpanded template param pack in range-based for ai.azuma at gmail dot com
  2011-11-09 19:25 ` [Bug c++/51046] [C++0x] " paolo.carlini at oracle dot com
@ 2011-11-09 22:26 ` jason at gcc dot gnu.org
  2011-11-09 22:33 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2011-11-09 22:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-09 22:25:21 UTC ---
Author: jason
Date: Wed Nov  9 22:25:12 2011
New Revision: 181239

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181239
Log:
    PR c++/51046
    * parser.c (cp_parser_range_for): check_for_bare_parameter_packs.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic119.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/51046] [C++0x] ICE by unexpanded template param pack in range-based for
  2011-11-09  3:35 [Bug c++/51046] New: ICE by unexpanded template param pack in range-based for ai.azuma at gmail dot com
  2011-11-09 19:25 ` [Bug c++/51046] [C++0x] " paolo.carlini at oracle dot com
  2011-11-09 22:26 ` jason at gcc dot gnu.org
@ 2011-11-09 22:33 ` jason at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jason at gcc dot gnu.org @ 2011-11-09 22:33 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-11-09 22:26:44 UTC ---
Fixed.


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

end of thread, other threads:[~2011-11-09 22:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09  3:35 [Bug c++/51046] New: ICE by unexpanded template param pack in range-based for ai.azuma at gmail dot com
2011-11-09 19:25 ` [Bug c++/51046] [C++0x] " paolo.carlini at oracle dot com
2011-11-09 22:26 ` jason at gcc dot gnu.org
2011-11-09 22: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).