OSDN Git Service

2009-02-17 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Feb 2009 15:20:18 +0000 (15:20 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Feb 2009 15:20:18 +0000 (15:20 +0000)
PR middle-end/39214
* langhooks.c (lhd_print_error_function): Check for NULL block.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144234 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/langhooks.c

index ef11604..d4be347 100644 (file)
@@ -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.
index ebbec95..ba03ff4 100644 (file)
@@ -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;
                }