summaryrefslogtreecommitdiff
path: root/gcc/java
diff options
context:
space:
mode:
authoriverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 17:49:27 +0000
committeriverbin <iverbin@138bc75d-0d04-0410-961f-82ee72b054a4>2014-10-15 17:49:27 +0000
commit64670815451d9286f498065d3f82cd2bab198d03 (patch)
tree5b7508a091215f36a47126369133501ac9082c38 /gcc/java
parent15eb2c608f7cf72dadd2781f2f6be4419a41295a (diff)
downloadgcc-64670815451d9286f498065d3f82cd2bab198d03.tar.gz
PR target/63536
gcc/java/ * lang.c (java_print_error_function): Add check on NULL function context. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@216280 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/lang.c1
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index c9336d341e9..5b1e588cd61 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2014-10-15 Evgeny Stupachenko <evstupac@gmail.com>
+
+ PR target/63536
+ * lang.c (java_print_error_function): Add check on NULL function
+ context.
+
2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
* class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 7f0b09de392..b64e4eaba06 100644
--- a/gcc/java/lang.c
+++ b/gcc/java/lang.c
@@ -489,6 +489,7 @@ java_print_error_function (diagnostic_context *context ATTRIBUTE_UNUSED,
return;
if (current_function_decl != NULL
+ && DECL_CONTEXT (current_function_decl) != NULL
&& DECL_CONTEXT (current_function_decl) != last_error_function_context)
{
if (file)