This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran] Simplify Bessel_* functions


Hi Tobias,

Tobias Burnus wrote:

This add calls to mpfr_j* and mpfr_y* for the Fortran 2008 Bessel functions. This is a rejects-valid patch as one can construct a Fortran program, which fails to compile without this simplification. (Though I think it only fails for very specially crafted programs.)

It might be also a performance optimization, but I'm not sure. Currenly, "real, parameter = bessel_j0(3.3)" is optimized to the numeric value when generating the middle-end tree (i.e. it is simplified in the original dump) thus in most of the cases the Bessel functions are already properly const folded.

Build and regression tested on x86-64.
OK for the trunk?

Tobias

PS: There a few other Bessel problems, see PR 36096 and PR 36158. Maybe there are more, I got a bit lost in the thread at http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/97eec25eef27e9fb

This patch makes the minimum mpfr now 2.3.0, should we bump the gcc config to reflect this? Toplevel configure.ac.


Andreas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]