This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR16867: Fix a long standing DCE bug


Ranjit Mathew wrote:


+ /* The SSA-DCE was removing the initialization of the temporary object
+ in getFoo because it wasn't realizing that the pointer was needed
+ outside of it. */
+ + public class PR16867
+ {
+ public static Object[] getFoo()
+ {
+ return new Object[] {"OK"};
+ }
+ + public static void main(String[] args)
+ {
+ Object[] a = getFoo();
+ System.out.println(a[0]);
+ }
+ }



FWIW, this test is already passing on the mainline
for me without your patch.



Even at -O1/-O2? It was still failing for me yesterday. Although strangely, it did work at -O3.


Regards

Bryce


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]