Commit 5999f07f by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/58874 ([c++11] ICE with OpenMP reduction declaration and -std=c++11)

	PR c++/58874
	* parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
	pass 2 instead of 0 to finish_function.

	* g++.dg/gomp/pr58874.C: New test.

From-SVN: r205412
parent 4ceffa27
2013-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/58874
* parser.c (cp_parser_late_parsing_for_member): For OpenMP UDRs
pass 2 instead of 0 to finish_function.
2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58700
......
......@@ -23275,7 +23275,7 @@ cp_parser_late_parsing_for_member (cp_parser* parser, tree member_function)
{
parser->lexer->in_pragma = true;
cp_parser_omp_declare_reduction_exprs (member_function, parser);
finish_function (0);
finish_function (/*inline*/2);
cp_check_omp_declare_reduction (member_function);
}
else
......
2013-11-26 Jakub Jelinek <jakub@redhat.com>
PR c++/58874
* g++.dg/gomp/pr58874.C: New test.
PR middle-end/59150
* g++.dg/gomp/pr59150.C: New test.
......
// PR c++/58874
// { dg-do compile }
// { dg-options "-fopenmp" }
struct A
{
template<int> struct B
{
#pragma omp declare reduction (x : int : omp_out |= omp_in)
};
};
#pragma omp declare reduction (y : long : omp_out |= omp_in) \
initializer (omp_priv = 0)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment