void-packages/srcpkgs/gcc/patches/omp.patch

18 lines
556 B
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Backport: https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=276211
This fixes potential failures with openmp and constants, such as
error: *.LC0 not specified in enclosing parallel
--- gcc/gimplify.c
+++ gcc/gimplify.c
@@ -7132,6 +7132,8 @@
kind = lang_hooks.decls.omp_predetermined_sharing (decl);
if (kind != OMP_CLAUSE_DEFAULT_UNSPECIFIED)
default_kind = kind;
+ else if (VAR_P (decl) && TREE_STATIC (decl) && DECL_IN_CONSTANT_POOL (decl))
+ default_kind = OMP_CLAUSE_DEFAULT_SHARED;
switch (default_kind)
{