[RFC] Support of IEEE modules, first draft for comments
Tobias Burnus
burnus@net-b.de
Sun Nov 10 16:56:00 GMT 2013
Hi FX,
some random comments below about things I noticed while glancing at the
patch. I haven't really thought about the the patch and direction itself.
BTW: Please attach the generated files (configure, Makefile.in)
separately from the rest – it makes it simpler to review.
FX:
> + if (!strcmp(sym->name, "ieee_selected_real_kind")
> + && sym->module && !strcmp(sym->module, "ieee_arithmetic"))
> + {
That's not safe as the user could have a non_intrinsic module of that
name. I am not sure what we can do about it. The module reading itself
and the intrinsic modules handle this. Additionally, y
> + if (p)
> + {
Indenting of the "{" is wrong.
> Index: libgfortran/Makefile.am
> ===================================================================
> +if IEEE_SUPPORT
> +fincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)$(MULTISUBDIR)/finclude
> +nodist_finclude_HEADERS = ieee_arithmetic.mod ieee_exceptions.mod ieee_features.mod
> +endif
Indenting?
> +if IEEE_SUPPORT
> +# Add flags for IEEE modules
> +$(patsubst %.F90,%.lo,$(notdir $(gfor_ieee_src))): AM_FCFLAGS += -Wno-unused-dummy-argument -Wno-c-binding-type -ffree-line-length-0 -fallow-leading-underscore
> +endif
I think one might need more flags such as "-mieee" on some platforms.
> ! { dg-do compile }
> ! { dg-require-effective-target fortran_real_16 }
> ! { dg-options "-fno-unsafe-math-optimizations -frounding-math -fsignaling-nans" }
How about:
! { dg-add-options ieee }
The patch currently looks very x86-64 centric; I think it would be
useful to make it more general. I also wonder whether not more parts
could be moved to a virtual module of the compiler itself. Currently,
only ieee_selected_real_kind is handled in the compiler itself.
Tobias
More information about the Fortran
mailing list