diff options
author | Jason Merrill <jason@redhat.com> | 2015-01-27 16:40:45 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-01-27 16:40:45 -0500 |
commit | 2cc7f90b6e4906efd9cd909d7182630dbf9e819b (patch) | |
tree | 5a56e487c0acb4630d95d68c8581667225c6c537 /gcc/cp | |
parent | 53c04ec92a37b35a7f37e00bd5a4b611cf470e3c (diff) | |
download | gcc-2cc7f90b6e4906efd9cd909d7182630dbf9e819b.zip gcc-2cc7f90b6e4906efd9cd909d7182630dbf9e819b.tar.gz gcc-2cc7f90b6e4906efd9cd909d7182630dbf9e819b.tar.bz2 |
re PR c++/58597 (ICE with lambda in default argument of template function)
PR c++/58597
* lambda.c (maybe_add_lambda_conv_op): Check cfun rather than
current_function_decl.
From-SVN: r220192
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/lambda.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index b914f4b..2ae15d0 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,9 @@ 2015-01-27 Jason Merrill <jason@redhat.com> + PR c++/58597 + * lambda.c (maybe_add_lambda_conv_op): Check cfun rather than + current_function_decl. + PR c++/63889 * pt.c (finish_template_variable): Move from semantics.c. Handle multiple template arg levels. Handle coercion here. diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index 6c9e224..b160c8c 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -854,7 +854,7 @@ prepare_op_call (tree fn, int nargs) void maybe_add_lambda_conv_op (tree type) { - bool nested = (current_function_decl != NULL_TREE); + bool nested = (cfun != NULL); bool nested_def = decl_function_context (TYPE_MAIN_DECL (type)); tree callop = lambda_function (type); |