aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2011-12-15 09:44:11 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2011-12-15 09:44:11 +0000
commit2e537cdecbdc4180821b0baca1af4a716bd0f1e4 (patch)
tree42ee680c41066552ec1065a5355d39eb26b5f7e4 /gcc/lto-streamer-out.c
parent4fde01bb0b2b1fbedb40ed3d2cccfdba422b64c6 (diff)
downloadgcc-2e537cdecbdc4180821b0baca1af4a716bd0f1e4.zip
gcc-2e537cdecbdc4180821b0baca1af4a716bd0f1e4.tar.gz
gcc-2e537cdecbdc4180821b0baca1af4a716bd0f1e4.tar.bz2
revert: re PR lto/48437 (LTO crashes with block-local function declarations)
2012-12-15 Richard Guenther <rguenther@suse.de> Revert PR lto/48437 * lto-streamer-out.c (tree_is_indexable): Exclude block-local extern declarations. PR lto/48508 PR lto/48437 * tree-streamer-out.c (streamer_write_chain): Stream DECL_EXTERNAL VAR_DECLs and FUNCTION_DECLs locally. * g++.dg/lto/pr48508-1_0.C: New testcase. * g++.dg/lto/pr48508-1_1.C: Likewise. From-SVN: r182358
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 9593134..6c1169a 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -129,16 +129,6 @@ tree_is_indexable (tree t)
else if (TREE_CODE (t) == VAR_DECL && decl_function_context (t)
&& !TREE_STATIC (t))
return false;
- /* If this is a decl generated for block local externs for
- debug info generation, stream it unshared alongside BLOCK_VARS. */
- else if (VAR_OR_FUNCTION_DECL_P (t)
- /* ??? The following tests are a literal match on what
- c-decl.c:pop_scope does. */
- && TREE_PUBLIC (t)
- && DECL_EXTERNAL (t)
- && DECL_CONTEXT (t)
- && TREE_CODE (DECL_CONTEXT (t)) == FUNCTION_DECL)
- return false;
/* Variably modified types need to be streamed alongside function
bodies because they can refer to local entities. Together with
them we have to localize their members as well.