diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-19 11:44:42 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-08-19 11:44:42 +0000 |
commit | c112531f6ff0d0005a6d278578d076777db0178b (patch) | |
tree | 23cc5f3b6e29a6efeeed823d7dcca1ea37695e1d /gcc/pretty-print.c | |
parent | 02067dc53cf72664671a7c7b23ba05218861e2a2 (diff) | |
download | gcc-c112531f6ff0d0005a6d278578d076777db0178b.tar.gz |
PR debug/37156
* pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
* tree.c (block_nonartificial_location): Likewise.
* error.c (cp_print_error_function): Deal with recursive BLOCK trees.
* gcc.dg/pr37156.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139230 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/pretty-print.c')
-rw-r--r-- | gcc/pretty-print.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/pretty-print.c b/gcc/pretty-print.c index 35dca7ca68c..fdac10e9d44 100644 --- a/gcc/pretty-print.c +++ b/gcc/pretty-print.c @@ -501,7 +501,9 @@ pp_base_format (pretty_printer *pp, text_info *text) { tree ao = BLOCK_ABSTRACT_ORIGIN (block); - while (TREE_CODE (ao) == BLOCK && BLOCK_ABSTRACT_ORIGIN (ao)) + while (TREE_CODE (ao) == BLOCK + && BLOCK_ABSTRACT_ORIGIN (ao) + && BLOCK_ABSTRACT_ORIGIN (ao) != ao) ao = BLOCK_ABSTRACT_ORIGIN (ao); if (TREE_CODE (ao) == FUNCTION_DECL) |