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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |6.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The testcase adjusts rounding mode and -frounding-math.  Those have been always
a bit fishy.

In particular I am seeing stuff like

  <bb 287>:
  ieee_get_rounding_mode (&mode);
  MEM[(struct ieee_round_type *)&D.3811] = 2;
  ieee_set_rounding_mode (&D.3811);
  D.3811 ={v} {CLOBBER};
  sx1 = 2.3333332538604736328125e+0;
  _gfortran_ieee_procedure_entry (&fpstate.125);
  sx1.240_1317 = __builtin_rintf (2.3333332538604736328125e+0);
  sx1 = sx1.240_1317;
  _gfortran_ieee_procedure_exit (&fpstate.125);
  fpstate.125 ={v} {CLOBBER};
  ieee_set_rounding_mode (&mode);
  if (sx1.240_1317 != 2.0e+0)

which means we constant-folded 7 / 3. (to the same value for all rounding
modes)

The frontend seems to do this already (well, .original shows that).

Note that the issue on darwin might be simply a bogus math runtime, like
rint not properly supporting rounding mode changes or libgfortran not properly
adjusting rounding modes.

Did you specifically narrow the issue down to r228971?  If so can you please
attach dumps produced by -fdump-tree-fre-details -fdump-tree-pre-details
for that revision and the revision before?

Reply via email to