diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/langhooks.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ef11604..d4be347 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2009-02-17 Richard Guenther <rguenther@suse.de> + PR middle-end/39214 + * langhooks.c (lhd_print_error_function): Check for NULL block. + +2009-02-17 Richard Guenther <rguenther@suse.de> + PR tree-optimization/39204 * tree-ssa-pre.c (phi_translate_1): Lookup the value-number of the PHI arg. diff --git a/gcc/langhooks.c b/gcc/langhooks.c index ebbec95..ba03ff4 100644 --- a/gcc/langhooks.c +++ b/gcc/langhooks.c @@ -437,7 +437,7 @@ lhd_print_error_function (diagnostic_context *context, const char *file, while (block && TREE_CODE (block) == BLOCK) block = BLOCK_SUPERCONTEXT (block); - if (TREE_CODE (block) == FUNCTION_DECL) + if (block && TREE_CODE (block) == FUNCTION_DECL) fndecl = block; abstract_origin = NULL; } |