re PR c++/56059 (SIGSEGV on invalid C++11 code)
PR c++/56059 * tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default template args count. From-SVN: r195355
This commit is contained in:
parent
d2ae47e5f6
commit
dcdb8613c2
3 changed files with 24 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2013-01-21 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/56059
|
||||
* tree.c (strip_typedefs_expr) [TREE_VEC]: Preserve non-default
|
||||
template args count.
|
||||
|
||||
2013-01-18 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR target/54908
|
||||
|
|
|
@ -1351,6 +1351,8 @@ strip_typedefs_expr (tree t)
|
|||
r = copy_node (t);
|
||||
for (i = 0; i < n; ++i)
|
||||
TREE_VEC_ELT (r, i) = (*vec)[i];
|
||||
SET_NON_DEFAULT_TEMPLATE_ARGS_COUNT
|
||||
(r, GET_NON_DEFAULT_TEMPLATE_ARGS_COUNT (t));
|
||||
}
|
||||
else
|
||||
r = t;
|
||||
|
|
16
gcc/testsuite/g++.dg/cpp0x/decltype48.C
Normal file
16
gcc/testsuite/g++.dg/cpp0x/decltype48.C
Normal file
|
@ -0,0 +1,16 @@
|
|||
// PR c++/56059
|
||||
// { dg-options -std=c++11 }
|
||||
|
||||
typedef int Int;
|
||||
template<typename T> struct baz { };
|
||||
template<typename T> T bar();
|
||||
|
||||
template<typename T, typename ... U>
|
||||
baz<decltype(bar<Int>(bar<U>() ...))> // { dg-error "no match" }
|
||||
foo();
|
||||
|
||||
int main()
|
||||
{
|
||||
foo<int, int>(); // { dg-error "no match" }
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Reference in a new issue