summaryrefslogtreecommitdiff
path: root/gcc/langhooks.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-17 15:20:18 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-17 15:20:18 +0000
commitaa03bd5e2d1606fd23984cd5b2b0cdc9820c6f08 (patch)
treebc564ed457189bf0e55e90ce34003db7c7d8cc26 /gcc/langhooks.c
parentf46bc821f375a18a1df59f5d1b39d1dc41858518 (diff)
downloadgcc-aa03bd5e2d1606fd23984cd5b2b0cdc9820c6f08.tar.gz
2009-02-17 Richard Guenther <rguenther@suse.de>
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
Diffstat (limited to 'gcc/langhooks.c')
-rw-r--r--gcc/langhooks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index ebbec951aef..ba03ff42ce5 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;
}