mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-27 05:10:26 +08:00
re PR c++/46046 (internal compiler error with SFINAE expression in a template inside a template)
/cp 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/46046 * pt.c (add_to_template_args): Check extra_args for error_mark_node. (coerce_template_parms): Likewise for args. /testsuite 2010-10-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/46046 * g++.dg/template/crash104.C: New. From-SVN: r165708
This commit is contained in:
parent
ad0c4c363d
commit
fd9852dfcd
@ -1,3 +1,9 @@
|
||||
2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/46046
|
||||
* pt.c (add_to_template_args): Check extra_args for error_mark_node.
|
||||
(coerce_template_parms): Likewise for args.
|
||||
|
||||
2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
Implemented parsing @synthesize and @dynamic for Objective-C++.
|
||||
@ -416,7 +422,8 @@
|
||||
2010-09-24 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* decl.c (finish_function): Use decl_replaceable_p
|
||||
* method.c (make_alias_for_thunk): Update call of cgraph_same_body_alias.
|
||||
* method.c (make_alias_for_thunk): Update call of
|
||||
cgraph_same_body_alias.
|
||||
|
||||
2010-09-24 Jason Merrill <jason@redhat.com>
|
||||
|
||||
|
@ -490,7 +490,7 @@ add_to_template_args (tree args, tree extra_args)
|
||||
int i;
|
||||
int j;
|
||||
|
||||
if (args == NULL_TREE)
|
||||
if (args == NULL_TREE || extra_args == error_mark_node)
|
||||
return extra_args;
|
||||
|
||||
extra_depth = TMPL_ARGS_DEPTH (extra_args);
|
||||
@ -5970,6 +5970,9 @@ coerce_template_parms (tree parms,
|
||||
parameters. */
|
||||
int variadic_p = 0;
|
||||
|
||||
if (args == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
nparms = TREE_VEC_LENGTH (parms);
|
||||
|
||||
/* Determine if there are any parameter packs. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-10-19 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/46046
|
||||
* g++.dg/template/crash104.C: New.
|
||||
|
||||
2010-10-19 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* gcc.target/i386/fma3-fma.c: New.
|
||||
|
26
gcc/testsuite/g++.dg/template/crash104.C
Normal file
26
gcc/testsuite/g++.dg/template/crash104.C
Normal file
@ -0,0 +1,26 @@
|
||||
// PR c++/46046
|
||||
|
||||
template <class T>
|
||||
struct foo
|
||||
{
|
||||
template <class U, class V = void>
|
||||
struct type
|
||||
{};
|
||||
|
||||
template <class V>
|
||||
struct type<
|
||||
typename T::template some_type<int>,
|
||||
V
|
||||
>
|
||||
{};
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class bar
|
||||
{};
|
||||
|
||||
int main()
|
||||
{
|
||||
typedef foo<bar<int> > cont;
|
||||
cont::type<char> obj; // { dg-error "cannot be defined" }
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user