https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128089

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
The linearize_expr_tree call from undistribute_ops_list on

 _1 = a / 3.;
 _2 = a / 6.;
 _3 = _1 / _2;

the issue is that the outer is_associative argument isn't correctly handled.

I'm not sure if it was intended for linearization to rewrite this into
multiplication - I doubt so.  There is

  if (!binlhsisreassoc)
    { 
      /* If this is not a associative operation like division, give up.  */
      if (!is_associative)
        {
          add_to_ops_vec (ops, binrhs);
          return;

for one case already.

Reply via email to