Re: [PATCH] fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]

2022-08-16 Thread FX via Gcc-patches
Hi, >> Why looping over fields? The class type is a simple type with only one >> member (and it should be an integer, we can assert that). > > I wanted to make sure it has exactly one field. > The ieee_arithmetic.F90 module in libgfortran surely does that, but I've > been worrying about some

Re: [PATCH] fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]

2022-08-15 Thread Jakub Jelinek via Gcc-patches
On Mon, Aug 15, 2022 at 10:00:02PM +0200, FX wrote: > I have two questions, on this and the ieee_class patch: > > > > + tree type = TREE_TYPE (arg); > > + gcc_assert (TREE_CODE (type) == RECORD_TYPE); > > + tree field = NULL_TREE; > > + for (tree f = TYPE_FIELDS (type); f != NULL_TREE; f =

Re: [PATCH] fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]

2022-08-15 Thread FX via Gcc-patches
Hi Jakub, I have two questions, on this and the ieee_class patch: > + tree type = TREE_TYPE (arg); > + gcc_assert (TREE_CODE (type) == RECORD_TYPE); > + tree field = NULL_TREE; > + for (tree f = TYPE_FIELDS (type); f != NULL_TREE; f = DECL_CHAIN (f)) > +if (TREE_CODE (f) == FIELD_DECL)

[PATCH] fortran: Expand ieee_arithmetic module's ieee_value inline [PR106579]

2022-08-15 Thread Jakub Jelinek via Gcc-patches
Hi! The following patch expands IEEE_VALUE function inline in the FE. Bootstrapped/regtested on x86_64-linux, i686-linux, powerpc64le-linux and powerpc64-linux, ok for trunk? 2022-08-15 Jakub Jelinek PR fortran/106579 * trans-intrinsic.cc: Include realmpfr.h.