gcc7/gcc7-pr85887.patch
Richard Biener aad8cc268f - Update to gcc-7-branch head (r277814).
- Add gcc7-pr85887.patch to fix miscompilation with thread-safe local
  static initialization.  [gcc#85887]

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc7?expand=0&rev=173
2019-11-05 07:56:58 +00:00

29 lines
1016 B
Diff

2019-10-22 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/85887
* decl.c (expand_static_init): Drop ECF_LEAF from __cxa_guard_acquire
and __cxa_guard_release.
Index: gcc/cp/decl.c
===================================================================
--- gcc/cp/decl.c (revision 277292)
+++ gcc/cp/decl.c (revision 277293)
@@ -8589,14 +8589,14 @@ expand_static_init (tree decl, tree init
(acquire_name, build_function_type_list (integer_type_node,
TREE_TYPE (guard_addr),
NULL_TREE),
- NULL_TREE, ECF_NOTHROW | ECF_LEAF);
+ NULL_TREE, ECF_NOTHROW);
if (!release_fn || !abort_fn)
vfntype = build_function_type_list (void_type_node,
TREE_TYPE (guard_addr),
NULL_TREE);
if (!release_fn)
release_fn = push_library_fn (release_name, vfntype, NULL_TREE,
- ECF_NOTHROW | ECF_LEAF);
+ ECF_NOTHROW);
if (!abort_fn)
abort_fn = push_library_fn (abort_name, vfntype, NULL_TREE,
ECF_NOTHROW | ECF_LEAF);