[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2012-04-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

--- Comment #7 from Jason Merrill jason at gcc dot gnu.org 2012-04-17 
14:11:04 UTC ---
Author: jason
Date: Tue Apr 17 14:10:54 2012
New Revision: 186531

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186531
Log:
PR c++/50303
* pt.c (tsubst_pack_expansion): Use tsubst_expr for template
template parameters.

Added:
branches/gcc-4_7-branch/gcc/testsuite/g++.dg/cpp0x/variadic128.C
Modified:
branches/gcc-4_7-branch/gcc/cp/ChangeLog
branches/gcc-4_7-branch/gcc/cp/pt.c
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2012-04-17 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED
   Target Milestone|--- |4.7.1

--- Comment #8 from Jason Merrill jason at gcc dot gnu.org 2012-04-17 
15:28:08 UTC ---
Fixed for 4.7.1.


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2012-04-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

Jason Merrill jason at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
 AssignedTo|unassigned at gcc dot   |jason at gcc dot gnu.org
   |gnu.org |


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2012-04-16 Thread jason at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

--- Comment #6 from Jason Merrill jason at gcc dot gnu.org 2012-04-17 
02:29:32 UTC ---
Author: jason
Date: Tue Apr 17 02:29:27 2012
New Revision: 186519

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=186519
Log:
PR c++/50303
* pt.c (tsubst_pack_expansion): Use tsubst_expr for template
template parameters.

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


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2011-09-15 Thread markus at trippelsdorf dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

Markus Trippelsdorf markus at trippelsdorf dot de changed:

   What|Removed |Added

 CC||markus at trippelsdorf dot
   ||de

--- Comment #5 from Markus Trippelsdorf markus at trippelsdorf dot de 
2011-09-15 07:06:19 UTC ---
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 30771]
tsubst_template_parms (parms=0x0, args=0x777a6d98, complain=3) at
../../gcc/gcc/cp/pt.c:9507
9507   TMPL_PARMS_DEPTH (parms)  TMPL_ARGS_DEPTH (args);

(gdb) bt
#0  tsubst_template_parms (parms=0x0, args=0x777a6d98, complain=3) at
../../gcc/gcc/cp/pt.c:9507
#1  0x004c6d9a in tsubst_decl (t=0x777a7e60, args=0x777a6d98,
complain=3) at ../../gcc/gcc/cp/pt.c:9789
#2  0x004c3ce5 in tsubst (in_decl=optimized out, complain=3,
args=0x777a6d98, t=0x777a7e60) at ../../gcc/gcc/cp/pt.c:10851
#3  tsubst (t=0x777a7e60, args=0x777a6d98, complain=3,
in_decl=optimized out) at ../../gcc/gcc/cp/pt.c:10836
#4  0x004c821f in tsubst_pack_expansion (t=0x777afe70,
args=0x777a6f78, complain=3, in_decl=0x777a7f18)
at ../../gcc/gcc/cp/pt.c:9298
#5  0x004c656b in tsubst_template_args (t=0x777a6ac8,
args=0x777a6d98, complain=3, in_decl=0x777a7f18)
at ../../gcc/gcc/cp/pt.c:9400
#6  0x004c1e46 in tsubst_copy_and_build (t=0x77fd9a50,
args=0x777a6d98, complain=3, in_decl=0x777a7f18, function_p=1 '\001', 
integral_constant_expression_p=optimized out) at
../../gcc/gcc/cp/pt.c:13035
#7  0x004c1c9e in tsubst_copy_and_build (t=0x777bd038,
args=0x777a6d98, complain=3, in_decl=0x777a7f18, function_p=0 '\000', 
integral_constant_expression_p=0 '\000') at ../../gcc/gcc/cp/pt.c:13390
#8  0x004bd239 in tsubst_expr (t=0x777bd038, args=0x777a6d98,
complain=3, in_decl=0x777a7f18, 
integral_constant_expression_p=0 '\000') at ../../gcc/gcc/cp/pt.c:12935
#9  0x004bdc70 in tsubst_expr (t=0x777a6b40, args=0x777a6d98,
complain=3, in_decl=0x777a7f18, 
integral_constant_expression_p=0 '\000') at ../../gcc/gcc/cp/pt.c:12467
#10 0x004bd2b1 in tsubst_expr (t=0x777bd000, args=0x777a6d98,
complain=3, in_decl=0x777a7f18, 
integral_constant_expression_p=0 '\000') at ../../gcc/gcc/cp/pt.c:12632
#11 0x004d0ccc in instantiate_decl (d=0x777aee00,
defer_ok=optimized out, expl_inst_class_mem_p=optimized out)
at ../../gcc/gcc/cp/pt.c:18305
#12 0x004d34dc in instantiate_pending_templates (retries=optimized
out) at ../../gcc/gcc/cp/pt.c:18402
#13 0x004e8a4d in cp_write_global_declarations () at
../../gcc/gcc/cp/decl2.c:3713
#14 0x007f11c2 in compile_file () at ../../gcc/gcc/toplev.c:564
#15 do_compile () at ../../gcc/gcc/toplev.c:1886
#16 toplev_main (argc=13, argv=0x7fffdf28) at ../../gcc/gcc/toplev.c:1962
#17 0x77b81f82 in __libc_start_main (main=0x5a11b0 main, argc=13,
ubp_av=0x7fffdf28, init=optimized out, fini=optimized out, 
rtld_fini=optimized out, stack_end=0x7fffdf18) at libc-start.c:226
#18 0x0048cf89 in _start () at ../sysdeps/x86_64/elf/start.S:113
(gdb)


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2011-09-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

--- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2011-09-14 
20:59:20 UTC ---
Can you try reducing your testcase? 563 KB is definitely unmanageable.


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2011-09-14 Thread andyspiros at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

Andrea Arteaga andyspiros at gmail dot com changed:

   What|Removed |Added

  Attachment #25203|0   |1
is obsolete||

--- Comment #2 from Andrea Arteaga andyspiros at gmail dot com 2011-09-14 
22:46:19 UTC ---
Created attachment 25275
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=25275
Not-preprocessed source

As requested, I attach a minimal source code with some comments. There are no
external dependencies, just iostream gets #included. The compilation result
is the same as already stated (segmentation fault during compilation).


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2011-09-14 Thread andyspiros at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

--- Comment #3 from Andrea Arteaga andyspiros at gmail dot com 2011-09-14 
22:47:56 UTC ---
I recently blogged about this issue: http://wp.me/pzWEm-9N.


[Bug c++/50303] [C++0x] Segfault with variadic template template parameters

2011-09-14 Thread paolo.carlini at oracle dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50303

Paolo Carlini paolo.carlini at oracle dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011-09-14
 CC||jason at gcc dot gnu.org
 Ever Confirmed|0   |1

--- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2011-09-14 
23:11:11 UTC ---
Ah, ok, the below seems enough:

templatetypename Interface
struct A1 {
};

templatetemplateclass I class... Actions
void g2() {
  g2Actions...();
}

int main()
{
  g2A1();
}