diff mbox

[x86,java,PR63536] Fix java bootstrap for -mtune=intel/slm

Message ID CAOvf_xz+K6Nxy8pfOPBnxYWkVEP0usWsoePRW=5WyFvsu33zMg@mail.gmail.com
State New
Headers show

Commit Message

Evgeny Stupachenko Oct. 15, 2014, 4:54 p.m. UTC
Hi,

The patch fixes java i686 bootstrap for -mtune=intel/slm.

Recent changes triggered java to write a note on compilation for a
function without context.

make check in progress

Is it ok?

ChangeLog:

2014-10-15  Evgeny Stupachenko  <evstupac@gmail.com>

        PR target/63536
        * java/lang.c (java_print_error_function): Add check on NULL function
        context.

       if (file)

Comments

Andrew Haley Oct. 15, 2014, 4:57 p.m. UTC | #1
On 10/15/2014 05:54 PM, Evgeny Stupachenko wrote:
> The patch fixes java i686 bootstrap for -mtune=intel/slm.
> 
> Recent changes triggered java to write a note on compilation for a
> function without context.
> 
> make check in progress
> 
> Is it ok?

I guess so, but I don't understand how any function ends up with a null
DECL_CONTEXT.

Nontheless, this must go to java-patches@gcc.gnu.org

Andrew.
Jakub Jelinek Oct. 15, 2014, 4:59 p.m. UTC | #2
On Wed, Oct 15, 2014 at 05:57:22PM +0100, Andrew Haley wrote:
> On 10/15/2014 05:54 PM, Evgeny Stupachenko wrote:
> > The patch fixes java i686 bootstrap for -mtune=intel/slm.
> > 
> > Recent changes triggered java to write a note on compilation for a
> > function without context.
> > 
> > make check in progress
> > 
> > Is it ok?
> 
> I guess so, but I don't understand how any function ends up with a null
> DECL_CONTEXT.

Yeah, I guess it would help if you would say what function it is exactly,
how it got created etc.  Artificial function?

> Nontheless, this must go to java-patches@gcc.gnu.org

Also, java/ prefix shouldn't be in the ChangeLog, gcc/java/ directory has
its own ChangeLog.

	Jakub
Evgeny Stupachenko Oct. 15, 2014, 5:55 p.m. UTC | #3
Committed to trunk.

Author: iverbin
Date: Wed Oct 15 17:49:27 2014
New Revision: 216280

URL: https://gcc.gnu.org/viewcvs?rev=216280&root=gcc&view=rev
Log:
PR target/63536
gcc/java/
* lang.c (java_print_error_function): Add check on NULL function
context.


Modified:
    trunk/gcc/java/ChangeLog
    trunk/gcc/java/lang.c

On Wed, Oct 15, 2014 at 9:21 PM, Andrew Haley <aph@redhat.com> wrote:
> On 10/15/2014 06:12 PM, Evgeny Stupachenko wrote:
>> Updated ChangeLog:
>>
>> 2014-10-15  Evgeny Stupachenko  <evstupac@gmail.com>
>>
>>         PR target/63536
>>         * lang.c (java_print_error_function): Add check on NULL function
>>         context.
>>
>> The function is: _Jv_global_static_constructor()
>> It is compiler generated at jcf-parse.c
>> (java_emit_static_constructor), line 1705.
>
> Yes, okay.  It is an artificial function.
>
> Andrew.
>
diff mbox

Patch

diff --git a/gcc/java/lang.c b/gcc/java/lang.c
index 7f0b09d..b64e4ea 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)
     {