* [PATCH] PR java/15769 infinite loop
@ 2004-06-03 18:10 Andrew Pinski
2004-06-03 19:00 ` Andrew Pinski
2004-06-07 21:04 ` Tom Tromey
0 siblings, 2 replies; 5+ messages in thread
From: Andrew Pinski @ 2004-06-03 18:10 UTC (permalink / raw)
To: java-patches, gcc-patches@gcc.gnu.org Patches; +Cc: Andrew Pinski
Just like C/C++ front-end change which Zack committed/tested for me,
the Java front-end had forgot to add the unordered tree codes to the
list of tree codes which act as comparisons to truthvalue_conversion
language hook when the new tree codes were added.
The C/C++ change is referenced here:
<http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01458.html>
Thanks,
Andrew Pinski
Testcase:
class bug15769 {
private boolean foo () { return false; }
public boolean bar (double blaz)
{
return (Double.POSITIVE_INFINITY != blaz) && foo ();
}
}
ChangeLog:
* expr.c (java_truthvalue_conversion): Handle
UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
i.e. return the expression.
Patch:
Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.191
diff -u -p -r1.191 expr.c
--- expr.c 14 May 2004 02:29:32 -0000 1.191
+++ expr.c 3 Jun 2004 17:33:41 -0000
@@ -160,12 +160,16 @@ java_truthvalue_conversion (tree expr)
switch (TREE_CODE (expr))
{
- case EQ_EXPR:
- case NE_EXPR: case LE_EXPR: case GE_EXPR: case LT_EXPR: case
GT_EXPR:
+ case EQ_EXPR: case NE_EXPR: case UNEQ_EXPR: case LTGT_EXPR:
+ case LE_EXPR: case GE_EXPR: case LT_EXPR: case GT_EXPR:
+ case UNLE_EXPR: case UNGE_EXPR: case UNLT_EXPR: case UNGT_EXPR:
+ case ORDERED_EXPR: case UNORDERED_EXPR:
case TRUTH_ANDIF_EXPR:
case TRUTH_ORIF_EXPR:
case TRUTH_AND_EXPR:
case TRUTH_OR_EXPR:
+ case TRUTH_XOR_EXPR:
+ case TRUTH_NOT_EXPR:
case ERROR_MARK:
return expr;
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR java/15769 infinite loop
2004-06-03 18:10 [PATCH] PR java/15769 infinite loop Andrew Pinski
@ 2004-06-03 19:00 ` Andrew Pinski
2004-06-07 21:04 ` Tom Tromey
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2004-06-03 19:00 UTC (permalink / raw)
To: Andrew Pinski; +Cc: java-patches, gcc-patches@gcc.gnu.org Patches
On Jun 3, 2004, at 13:43, Andrew Pinski wrote:
> Just like C/C++ front-end change which Zack committed/tested for me,
> the Java front-end had forgot to add the unordered tree codes to the
> list of tree codes which act as comparisons to truthvalue_conversion
> language hook when the new tree codes were added.
> The C/C++ change is referenced here:
> <http://gcc.gnu.org/ml/gcc-patches/2004-05/msg01458.html>
>
> ChangeLog:
> * expr.c (java_truthvalue_conversion): Handle
> UNEQ_EXPR, UNLE_EXPR, UNGE_EXPR, UNLT_EXPR, UNGT_EXPR,
> ORDERED_EXPR, and UNORDERED_EXPR as comparison operators,
> i.e. return the expression.
Forgot to say bootstrapped on i686-pc-linux-gnu with no regressions.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR java/15769 infinite loop
2004-06-03 18:10 [PATCH] PR java/15769 infinite loop Andrew Pinski
2004-06-03 19:00 ` Andrew Pinski
@ 2004-06-07 21:04 ` Tom Tromey
2004-06-07 21:17 ` Andrew Pinski
2004-06-08 14:51 ` Andrew Haley
1 sibling, 2 replies; 5+ messages in thread
From: Tom Tromey @ 2004-06-07 21:04 UTC (permalink / raw)
To: Andrew Pinski; +Cc: java-patches, gcc-patches@gcc.gnu.org Patches
>>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
Andrew> Just like C/C++ front-end change which Zack committed/tested for me,
Andrew> the Java front-end had forgot to add the unordered tree codes to the
Andrew> list of tree codes which act as comparisons to truthvalue_conversion
Andrew> language hook when the new tree codes were added.
This looks fine to me, but Andrew or Per will have to approve.
The test case is fine. I couldn't tell whether this is an execute
test or just a compilation test, but just go ahead and put it in the
appropriate place.
Tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR java/15769 infinite loop
2004-06-07 21:04 ` Tom Tromey
@ 2004-06-07 21:17 ` Andrew Pinski
2004-06-08 14:51 ` Andrew Haley
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Pinski @ 2004-06-07 21:17 UTC (permalink / raw)
To: tromey; +Cc: Andrew Pinski, java-patches, gcc-patches@gcc.gnu.org Patches
>
> >>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
>
> Andrew> Just like C/C++ front-end change which Zack committed/tested for me,
> Andrew> the Java front-end had forgot to add the unordered tree codes to the
> Andrew> list of tree codes which act as comparisons to truthvalue_conversion
> Andrew> language hook when the new tree codes were added.
>
> This looks fine to me, but Andrew or Per will have to approve.
>
> The test case is fine. I couldn't tell whether this is an execute
> test or just a compilation test, but just go ahead and put it in the
> appropriate place.
It is just an compilation test, because before the patch gimplification
would go into an infinite loop.
Thanks,
Andrew Pinski
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR java/15769 infinite loop
2004-06-07 21:04 ` Tom Tromey
2004-06-07 21:17 ` Andrew Pinski
@ 2004-06-08 14:51 ` Andrew Haley
1 sibling, 0 replies; 5+ messages in thread
From: Andrew Haley @ 2004-06-08 14:51 UTC (permalink / raw)
To: Tom Tromey; +Cc: Andrew Pinski, java-patches, gcc-patches@gcc.gnu.org Patches
Tom Tromey writes:
> >>>>> "Andrew" == Andrew Pinski <pinskia@physics.uc.edu> writes:
>
> Andrew> Just like C/C++ front-end change which Zack committed/tested for me,
> Andrew> the Java front-end had forgot to add the unordered tree codes to the
> Andrew> list of tree codes which act as comparisons to truthvalue_conversion
> Andrew> language hook when the new tree codes were added.
>
> This looks fine to me, but Andrew or Per will have to approve.
Looks fine to me too.
Andrew.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-06-08 13:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-03 18:10 [PATCH] PR java/15769 infinite loop Andrew Pinski
2004-06-03 19:00 ` Andrew Pinski
2004-06-07 21:04 ` Tom Tromey
2004-06-07 21:17 ` Andrew Pinski
2004-06-08 14:51 ` Andrew Haley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).