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/tree.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/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -8819,7 +8819,9 @@ block_nonartificial_location (tree block) { 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) |