Bug 24454 - GCJ does not correctly support strictfp
Summary: GCJ does not correctly support strictfp
Status: RESOLVED DUPLICATE of bug 10632
Alias: None
Product: gcc
Classification: Unclassified
Component: java (show other bugs)
Version: unknown
: P2 major
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 10632
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-20 16:28 UTC by Douglas Pollock
Modified: 2007-05-30 13:36 UTC (History)
8 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-01-20 00:54:34


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Douglas Pollock 2005-10-20 16:28:55 UTC
Eclipse's JDT/Core team was doing experiments with turning Eclipse's batch compiler into ECJ using GCJ.  The goal was to provide an executable form of Eclipse's compiler.  Unfortunately, the effort had to be abandoned because the resulting ECJ compiler would fail the floating point section of Java Compatibility Kit (JCK).
Comment 1 Andrew Pinski 2005-10-20 16:34:25 UTC
Is this on x86 if so there is a known issue.
Comment 2 Andrew Pinski 2005-10-20 16:40:47 UTC
Subject: Re:   New: Floating point in GCJ does not follow spec

> 
> Eclipse's JDT/Core team was doing experiments with turning Eclipse's batch
> compiler into ECJ using GCJ.  The goal was to provide an executable form of
> Eclipse's compiler.  Unfortunately, the effort had to be abandoned because the
> resulting ECJ compiler would fail the floating point section of Java
> Compatibility Kit (JCK).

One more thing, is how did it fail?

You were compiling to native, correct?

Note fp is not exact unless you are using strictfp (which GCJ does not
implement currently).

-- Pinski
Comment 3 Andrew Pinski 2005-10-20 17:06:50 UTC
I think this is more of a duplicate of PR 10632.
Comment 4 Ranjit Mathew 2005-10-21 10:23:47 UTC
(In reply to comment #0)
> Eclipse's JDT/Core team was doing experiments with turning Eclipse's batch
> compiler into ECJ using GCJ.  The goal was to provide an executable form of
> Eclipse's compiler.  Unfortunately, the effort had to be abandoned because the
> resulting ECJ compiler would fail the floating point section of Java
> Compatibility Kit (JCK).

It would be nice if you could at least indicate what kind
of non-compliance you are talking of here. Is it strictfp,
accuracy of results, rounding of floating-point literals,
or something else? Of course, you should not reproduce 
tests verbatim from the JCK, but please provide some 
indication of what you're talking about in this bug report.

For example, are you talking of JLS3 section 4.2.4 here?
If yes, can you please elaborate exactly how using GCJ
as the compiler to compile your compiler is affecting its
status w.r.t. the JCK?
Comment 5 Ranjit Mathew 2005-10-21 10:26:19 UTC
(In reply to comment #4)
> 
> It would be nice if you could at least indicate what kind
> of non-compliance you are talking of here. Is it strictfp,
> accuracy of results, rounding of floating-point literals,
> or something else? Of course, you should not reproduce 
> tests verbatim from the JCK, but please provide some 
> indication of what you're talking about in this bug report.

Sorry, I just noticed that aph was the one who changed
the summary to lack of strictfp support. So I guess he
knows what you were talking about in the bug report.
Comment 6 Andrew Haley 2005-10-21 10:58:50 UTC
gcj doesn't support strcitfp.  The reserved word is allowed but ignored.

The main casualty of this is x86, where we fail some tests because of excess precision.
Comment 7 Olivier Thomann 2005-10-21 12:46:50 UTC
The problem seemed to be with precision in the floating point literal. When converting a floating point literal to its double/float value, it ended up having an unexpected value.
Comment 8 Ranjit Mathew 2005-10-21 15:14:31 UTC
The bug about incorrect parsing and rounding of floating-point
literals is PR java/23432 and that about no support for strictfp
is PR java/10632. If this bug report is about either of these,
it can be closed as a duplicate of the respective previous
bug. If it is about both, it can be left as a "meta bug". If
it is about neither of the two, then please provide some 
details and change the summary appropriately.
Comment 9 Olivier Thomann 2005-10-21 19:04:29 UTC
Looking at the two other bug reports, it looks like this might be a duplicate of PR java/10632. So feel free to close is as a dup.
Comment 10 Andrew Haley 2007-05-30 13:36:32 UTC

*** This bug has been marked as a duplicate of 10632 ***