On Fri, 2023-11-24 at 09:27 +0100, Richard Biener wrote:
> > diff --git a/gcc/convert.cc b/gcc/convert.cc
> > index 46c8bcb31f8..31f63ea783b 100644
> > --- a/gcc/convert.cc
> > +++ b/gcc/convert.cc
> > @@ -591,7 +591,8 @@ convert_to_integer_1 (tree type, tree expr, bool dofold)
> >          CASE_FLT_FN (BUILT_IN_TRUNC):
> >          CASE_FLT_FN_FLOATN_NX (BUILT_IN_TRUNC):
> >            if (call_expr_nargs (s_expr) != 1
> > -             || !SCALAR_FLOAT_TYPE_P (TREE_TYPE (CALL_EXPR_ARG (s_expr, 
> > 0))))
> > +             || !SCALAR_FLOAT_TYPE_P (TREE_TYPE (CALL_EXPR_ARG (s_expr, 
> > 0)))
> > +             || !flag_fp_int_builtin_inexact)
> 
> shouldn't that be (!flag_fp_int_builtn_inexact && flag_trapping_math)?

Ah, indeed it should be.

But I'm wondering why we don't make -fno-trapping-math automatically set
-ffp-int-builtin-exact (and/or unset -fno-fp-int-builtin-exact)...

-- 
Xi Ruoyao <xry...@xry111.site>
School of Aerospace Science and Technology, Xidian University

Reply via email to