aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2015-08-27 13:27:02 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2015-08-27 13:27:02 +0000
commitf11cd82983ce681fd1f6bd232abcc91297d4e855 (patch)
tree6c8e4c2a30c588f67e6c553245819e9a7c0d4173 /gcc/passes.c
parenta98e4e62c1c0c8570c7db321e3c8a2a7c2336c60 (diff)
downloadgcc-f11cd82983ce681fd1f6bd232abcc91297d4e855.zip
gcc-f11cd82983ce681fd1f6bd232abcc91297d4e855.tar.gz
gcc-f11cd82983ce681fd1f6bd232abcc91297d4e855.tar.bz2
passes.c (rest_of_decl_compilation): Guard early_global_decl call with !seen_error ().
2015-08-27 Richard Biener <rguenther@suse.de> * passes.c (rest_of_decl_compilation): Guard early_global_decl call with !seen_error (). * cgraphunit.c (symbol_table::finalize_compilation_unit): Move early debug generation and finish... (symbol_table::compile): ... here to put it after a !seen_error () guard. From-SVN: r227258
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index d8e9271..1b677ac 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -318,7 +318,10 @@ rest_of_decl_compilation (tree decl,
&& !decl_function_context (decl)
&& !current_function_decl
&& DECL_SOURCE_LOCATION (decl) != BUILTINS_LOCATION
- && !decl_type_context (decl))
+ && !decl_type_context (decl)
+ /* Avoid confusing the debug information machinery when there are
+ errors. */
+ && !seen_error ())
(*debug_hooks->early_global_decl) (decl);
}