re PR c++/59627 (ICE with OpenMP "declare reduction" and -flto)
PR c++/59627 * parser.c (cp_parser_omp_declare_reduction): Set assembler name of the DECL_OMP_DECLARE_REDUCTION_P decls. * g++.dg/gomp/pr59627.C: New test. From-SVN: r233225
This commit is contained in:
parent
cfac5ed236
commit
f68bc23fdd
@ -1,3 +1,9 @@
|
||||
2016-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/59627
|
||||
* parser.c (cp_parser_omp_declare_reduction): Set assembler name
|
||||
of the DECL_OMP_DECLARE_REDUCTION_P decls.
|
||||
|
||||
2016-02-08 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR c++/69688
|
||||
|
@ -36080,6 +36080,7 @@ cp_parser_omp_declare_reduction (cp_parser *parser, cp_token *pragma_tok,
|
||||
DECL_DECLARED_INLINE_P (fndecl) = 1;
|
||||
DECL_IGNORED_P (fndecl) = 1;
|
||||
DECL_OMP_DECLARE_REDUCTION_P (fndecl) = 1;
|
||||
SET_DECL_ASSEMBLER_NAME (fndecl, get_identifier ("<udr>"));
|
||||
DECL_ATTRIBUTES (fndecl)
|
||||
= tree_cons (get_identifier ("gnu_inline"), NULL_TREE,
|
||||
DECL_ATTRIBUTES (fndecl));
|
||||
|
@ -1,5 +1,8 @@
|
||||
2016-02-08 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR c++/59627
|
||||
* g++.dg/gomp/pr59627.C: New test.
|
||||
|
||||
PR ipa/69239
|
||||
* g++.dg/ipa/pr69239.C: New test.
|
||||
|
||||
|
14
gcc/testsuite/g++.dg/gomp/pr59627.C
Normal file
14
gcc/testsuite/g++.dg/gomp/pr59627.C
Normal file
@ -0,0 +1,14 @@
|
||||
// PR c++/59627
|
||||
// { dg-do compile { target lto } }
|
||||
// { dg-options "-fopenmp -flto" }
|
||||
|
||||
struct A { A () : i (0) {} int i; };
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
A a;
|
||||
#pragma omp declare reduction (+: A: omp_out.i += omp_in.i)
|
||||
#pragma omp parallel reduction (+: a)
|
||||
;
|
||||
}
|
Loading…
Reference in New Issue
Block a user