On 25/09/16 04:50, kugan wrote: > Hi, > > In make_new_ssa_for_def (tree-reassoc.c) we should use gimple_get_lhs to > get lhs instead of gimple_assign_lhs as stmt can be builtins too. > Attached patch fixes this. > > Testcase from PR (attached) seems to fail. I dont any fortran so I didnt > try fixing it. Any help here is appreciate. The log is: Here is a patch with the testcase based on the feedback from Joost VandeVondele and Dominique d'Humieres. Bootstrapped and regression tested on x86_64-linux-gnu with no new regressions. Is this OK for trunk? Thanks, kugan gcc/testsuite/ChangeLog: 2016-09-25 Kugan Vivekanandarajah * gfortran.dg/pr77719.f90: New test. gcc/ChangeLog: 2016-09-25 Kugan Vivekanandarajah * tree-ssa-reassoc.c (make_new_ssa_for_def): Use gimple_get_lhs to get lhs instead of gimple_assign_lhs as stmt can be builtins too.