diff options
author | Richard Biener <rguenther@suse.de> | 2016-07-19 07:35:05 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2016-07-19 07:35:05 +0000 |
commit | f6918a8b63ad38e475c23e26df0f3c4f7faad6cb (patch) | |
tree | 86e909d0bffa0cac2e977c91deff79aa37da2526 | |
parent | a8f7a89526b5fb1b17a6972b943fcbd8c4d0475a (diff) | |
download | gcc-f6918a8b63ad38e475c23e26df0f3c4f7faad6cb.zip gcc-f6918a8b63ad38e475c23e26df0f3c4f7faad6cb.tar.gz gcc-f6918a8b63ad38e475c23e26df0f3c4f7faad6cb.tar.bz2 |
re PR middle-end/71907 (missing buffer overflow warnings with -flto)
2016-07-19 Richard Biener <rguenther@suse.de>
PR lto/71907
* lto-streamer-out.c (DFS::DFS_write_tree_body): For blocks
with an abstract origin that is not an inlined function outer
scope add a self-reference as abstract origin.
* tree-streamer-out.c (write_ts_block_tree_pointers): Likewise.
From-SVN: r238456
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/lto-streamer-out.c | 6 | ||||
-rw-r--r-- | gcc/tree-streamer-out.c | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5d7c099..bff7160 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2016-07-19 Richard Biener <rguenther@suse.de> + + PR lto/71907 + * lto-streamer-out.c (DFS::DFS_write_tree_body): For blocks + with an abstract origin that is not an inlined function outer + scope add a self-reference as abstract origin. + * tree-streamer-out.c (write_ts_block_tree_pointers): Likewise. + 2016-07-18 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/71493 diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index ed6f748..e243337 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -890,12 +890,16 @@ DFS::DFS_write_tree_body (struct output_block *ob, /* Follow BLOCK_ABSTRACT_ORIGIN for the limited cases we can handle - those that represent inlined function scopes. For the drop rest them on the floor instead of ICEing - in dwarf2out.c. */ + in dwarf2out.c, but keep the notion of whether the block + is an inlined block by refering to itself for the sake of + tree_nonartificial_location. */ if (inlined_function_outer_scope_p (expr)) { tree ultimate_origin = block_ultimate_origin (expr); DFS_follow_tree_edge (ultimate_origin); } + else if (BLOCK_ABSTRACT_ORIGIN (expr)) + DFS_follow_tree_edge (expr); /* Do not follow BLOCK_NONLOCALIZED_VARS. We cannot handle debug information for early inlined BLOCKs so drop it on the floor instead of ICEing in dwarf2out.c. */ diff --git a/gcc/tree-streamer-out.c b/gcc/tree-streamer-out.c index c37755d..a70666b 100644 --- a/gcc/tree-streamer-out.c +++ b/gcc/tree-streamer-out.c @@ -807,14 +807,17 @@ write_ts_block_tree_pointers (struct output_block *ob, tree expr, bool ref_p) /* Stream BLOCK_ABSTRACT_ORIGIN for the limited cases we can handle - those that represent inlined function scopes. - For the rest them on the floor instead of ICEing in dwarf2out.c. */ + For the rest them on the floor instead of ICEing in dwarf2out.c, but + keep the notion of whether the block is an inlined block by refering + to itself for the sake of tree_nonartificial_location. */ if (inlined_function_outer_scope_p (expr)) { tree ultimate_origin = block_ultimate_origin (expr); stream_write_tree (ob, ultimate_origin, ref_p); } else - stream_write_tree (ob, NULL_TREE, ref_p); + stream_write_tree (ob, (BLOCK_ABSTRACT_ORIGIN (expr) + ? expr : NULL_TREE), ref_p); /* Do not stream BLOCK_NONLOCALIZED_VARS. We cannot handle debug information for early inlined BLOCKs so drop it on the floor instead of ICEing in dwarf2out.c. */ |