Skip to content
Snippets Groups Projects
Commit 4289e488 authored by Nathan Sidwell's avatar Nathan Sidwell
Browse files

c++: Make OMP UDR DECL_LOCAL_DECL_P earlier

I discovered that we were pushing an OMP UDR in a template before
setting DECL_LOCAL_DECL.  This caused the template machinery to give
it some template info.  It doesn't need that, and this changes the
parser to set it earlier.  We have to adjust instantiate_body to not
try and access such a function's non-existant template_info.  The
access checks that we're no longer doing are the same as those we did
on the containing function anyway.  So nothing is lost.

	gcc/cp/
	* parser.c (cp_parser_omp_declare_reduction): Set
	DECL_LOCAL_DECL_P before push_template_decl.
	* pt.c (instantiate_body): Nested fns do not have template_info.
parent a3c13696
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment