Java: Fix double-evaluation of RHS of array store

Bryce McKinlay bryce@waitaki.otago.ac.nz
Mon Mar 11 08:08:00 GMT 2002


Adam found a bug where we are evaluating an array store RHS twice, 
resulting in two calls instead of one. This is because if the RHS is not 
a save_expr, it will get re-evaluated when determining its type for 
store checking.

In many cases a call_expr RHS is already wrapped by a save_expr, which 
is why I didn't notice this before.

Rebuilt libjava and ran testsuite without regressions on PowerPC linux. 
I'm checking this in as an obvious fix.

regards

Bryce.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: java-arraystore.patch
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20020311/7412ea19/attachment.ksh>


More information about the Java-patches mailing list