diff options
author | Richard Henderson <rth@redhat.com> | 2016-03-16 09:50:18 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2016-03-16 09:50:18 -0700 |
commit | aa43616c59fceefa8ad06bfd60e88f17ad31f063 (patch) | |
tree | f650bc6e08ced3e2299e88208f3fcabd0e84f968 /gcc/gimplify.c | |
parent | 59608fe587074a6f704d39fd08b6a05f6fb11bf2 (diff) | |
download | gcc-aa43616c59fceefa8ad06bfd60e88f17ad31f063.zip gcc-aa43616c59fceefa8ad06bfd60e88f17ad31f063.tar.gz gcc-aa43616c59fceefa8ad06bfd60e88f17ad31f063.tar.bz2 |
re PR middle-end/70199 (Crash at -O2 when using labels.)
PR middle-end/70199
* function.h (struct function): Add has_forced_label_in_static.
* gimplify.c (force_labels_r): Set it.
* lto-streamer-in.c (input_struct_function_base): Read it.
* lto-streamer-out.c (output_struct_function_base): Write it.
* tree-inline.c (has_label_address_in_static_1): Remove.
(copy_forbidden): Remove fndecl parameter; test
has_forced_label_in_static.
(inline_forbidden_p): Update call to copy_forbidden.
(tree_versionable_function_p): Likewise.
* ipa-chkp.c (chkp_instrumentable_p): Likewise.
(chkp_versioning): Likewise.
* tree-inline.h (copy_forbidden): Update decl.
testsuite/
* gcc.c-torture/compile/pr70199.c: New.
From-SVN: r234261
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 692d168..84ce46e 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1414,7 +1414,10 @@ force_labels_r (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) if (TYPE_P (*tp)) *walk_subtrees = 0; if (TREE_CODE (*tp) == LABEL_DECL) - FORCED_LABEL (*tp) = 1; + { + FORCED_LABEL (*tp) = 1; + cfun->has_forced_label_in_static = 1; + } return NULL_TREE; } |