]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR c++/59627
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2016 18:23:03 +0000 (18:23 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 8 Feb 2016 18:23:03 +0000 (18:23 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233225 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/parser.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/gomp/pr59627.C [new file with mode: 0644]

index 32fbe6f6163a256226b5dff81ce47e3c62836c50..f7a76ffab0ec4f65af7dd10ec8493c816b9b96eb 100644 (file)
@@ -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
index d03b0c9596d09dae0b273f2e76bbad1bb6fd8873..b7bfa773bad3ed23214d13e8306e9f1bb7d07eea 100644 (file)
@@ -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));
index c28912668c9b526ce73062115538ecb3a027eedb..64f512d44967077178e2fc5357a0c542f6305380 100644 (file)
@@ -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.
 
diff --git a/gcc/testsuite/g++.dg/gomp/pr59627.C b/gcc/testsuite/g++.dg/gomp/pr59627.C
new file mode 100644 (file)
index 0000000..ab6f44d
--- /dev/null
@@ -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)
+  ;
+}