This is the mail archive of the
mailing list for the GCC project.
Re: PR java/9157: ICE on malformed ?: condition
- From: Andrew Haley <aph at redhat dot com>
- To: Ranjit Mathew <rmathew at gmail dot com>
- Cc: GCJ Patches <java-patches at gcc dot gnu dot org>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 31 Jan 2005 14:59:06 +0000
- Subject: Re: PR java/9157: ICE on malformed ?: condition
- References: <41FE4381.firstname.lastname@example.org>
Ranjit Mathew writes:
> This patch resolves PR java/9157. We were already
> taking care of the fact that the "?" and the ":"
> parts of a ?: operator could be artificially crafted
> StringBuffers from expressions like "foo" + bar - we
> need to also take care of this in the condition of
> the ?: operator.
> The first hunk removes a redundant "if (op2)" condition
> that I happened to notice.
> Tested on i686-pc-linux-gnu with Jacks included - produced
> no new FAILs or XPASSes (:-().
> OK for mainline?
> BTW, how can I add a testcase for this PR - it used
> to ICE before and should now fail with an error - there
> is no "transition" w.r.t. to the failure status...
I suppose you could try doing a string match on the error message, but
that's a pain.
> Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
> Index: ChangeLog
> from Ranjit Mathew <email@example.com>
> PR java/9157
> * parse.y (build_string_concatenation): Remove redundant if.
> (patch_conditional_expr): Attempt to patch_string() the condition
> of a ?: as well, in addition to its other operands.