public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* java/1149: Conditional expression in method call doesn't compile
@ 2000-12-20 12:08 bryce
0 siblings, 0 replies; only message in thread
From: bryce @ 2000-12-20 12:08 UTC (permalink / raw)
To: java-bugs
>Number: 1149
>Category: java
>Synopsis: Conditional expression in method call doesn't compile
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: apbianco
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 20 12:06:37 PST 2000
>Closed-Date: Thu Jul 22 11:07:04 PDT 1999
>Last-Modified: Thu Jul 22 11:07:04 PDT 1999
>Originator: Bryce McKinlay
>Release: gcc version 2.96 19990719 (experimental)
>Organization:
>Environment:
All
>Description:
Using a conditional/ternary expression as a method call
parameter results in the following gcj internal error:
"internal error in check-init: tree code not implemented: min_expr"
>How-To-Repeat:
Sample code follows:
class Conditional
{
void a()
{
int i = 1;
int j = 2;
int k = b((i < j) ? i : j);
}
int b(int i)
{
return 3;
}
}
>Fix:
Index: check-init.c
===================================================================
RCS file: /cvs/egcs/egcs/gcc/java/check-init.c,v
retrieving revision 1.12
diff -u -p -r1.12 check-init.c
--- check-init.c 1999/07/07 13:10:55 1.12
+++ check-init.c 1999/07/21 19:15:02
@@ -644,6 +644,7 @@ check_init (exp, before)
case LT_EXPR:
case LE_EXPR:
case MAX_EXPR:
+ case MIN_EXPR:
case ARRAY_REF:
binop:
check_init (TREE_OPERAND (exp, 0), before);
>Release-Note:
Patch checked in egcs main branch.
>Audit-Trail:
Formerly PR gcj/14
State-Changed-From-To: open->feedback
State-Changed-By: apbianco
State-Changed-When: Wed Jul 21 12:31:34 1999
State-Changed-Why:
Temptative patch. Let me know how it works for you.
State-Changed-From-To: feedback->closed
State-Changed-By: apbianco
State-Changed-When: Thu Jul 22 11:07:04 1999
State-Changed-Why:
Bryce's and Alex's tests reported the fix is adequate.
>Unformatted:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-12-20 12:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:08 java/1149: Conditional expression in method call doesn't compile bryce
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).