This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [c++,committed] Revert patch for PR/c++2294


Eric Botcazou wrote:
You mean the patch does not break libjava on 3.3.3?

Sorry, I mis-read the PR number, my CVS checkout for the 3.3 branch has


2003-11-14 Bernardo Innocenti <bernie@develer.com>

Backport from 3.4-branch.

2003-06-25 Giovanni Bajo <giovannibajo@libero.it>

        PR c++/2094
        * pt.c (unify): Add support for PTRMEM_CST and
        FIELD_DECL unification.

as the last ChangeLog entry, so I didn't test the patch for PR2294.

As a matter of fact, Giovanni fixed both PR2094 and PR2294 :-)



Ok then, I've not yet reverted it, so it can stay.

A quick test to determine whether libjava is broken is to run the C++ testsuite. If you see hundreds of failures, then libjava is very likely broken.

IIRC, Giovanni ran the g++.dg part of the testsuite just before sending me his patch.

Is it possible that libjava has been using some weird C++ construct
that was accepted by mistake before PR2294?

The offending code looks like this:

1104 jint
1105 _Jv_divI (jint dividend, jint divisor)
1106 {
1107   if (__builtin_expect (divisor == 0, false))
1108     {
1109       java::lang::ArithmeticException *arithexception
1110         = new java::lang::ArithmeticException (JvNewStringLatin1 ("/ by zero"));
1111       throw arithexception;
1112     }
1113
1114   if (dividend == (jint) 0x80000000L && divisor == -1)
1115     return dividend;
1116
1117   return dividend / divisor;
1118 }


I can see nothing strange at lines 1110 and 1111. The problem may lie in ArithmeticException, but the Java source looks fine.

It would be interesting to see what the generated ArithmeticException.h
looks like. I usually perform native builds with Java disabled, so I
can't see it right now.

I'm currently running a full rebuild with the latest combined tree...
I'll let you know.

--
 // Bernardo Innocenti - Develer S.r.l., R&D dept.
\X/  http://www.develer.com/




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]