diff options
author | Jakub Jelinek <jakub@redhat.com> | 2008-08-19 13:44:42 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2008-08-19 13:44:42 +0200 |
commit | e92cbe3a1df3f5ad7027d9863c5a49c34cf789e9 (patch) | |
tree | 23cc5f3b6e29a6efeeed823d7dcca1ea37695e1d /gcc/pretty-print.c | |
parent | 53f3815cc08c390d2aee47a252203d416304298c (diff) | |
download | gcc-e92cbe3a1df3f5ad7027d9863c5a49c34cf789e9.zip gcc-e92cbe3a1df3f5ad7027d9863c5a49c34cf789e9.tar.gz gcc-e92cbe3a1df3f5ad7027d9863c5a49c34cf789e9.tar.bz2 |
re PR debug/37156 (Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3))
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.
From-SVN: r139230
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 35dca7c..fdac10e 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) |