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: [gfortran,patch] Fix constant exponentiation with integer exponent


Jerry DeLisle wrote:
François-Xavier Coudert wrote:
The patch comes with somewhat long testcases. Regtested on i686-
linux, OK for mainline? Do you think it's OK for 4.2? (I'm not sure,
it's rather invasive... and the cases where the compiler actually got
it wrong were... rather rarely used)

After some more thinking (and some testing of the trans-const.c patch for very large integers with -fno-range-check), here's an updated patch. The changes are small, they only make sure that we don't reject i**j when all of the following conditions are fulfilled: (a) i and j are integers (b) i is larger than huge(0_4) (c) i**j overflows (that is, j>0 and i>1) (d) -fno-range-check is specified. The integer_exponentiation_5.F90 testcase, which uses -fno-range-check, was updated to test this code path.

Regtested once more on i686-linux (it needs the patch for PR31262,
which can be found here:
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01332.html ; Jerry is
currently reviewing it, so it should be commited soon). OK for
mainline? Still same question as quoted above for 4.2.

Thanks,
FX

I made the mistake of trying this patch without the patch for PR31262 and my system went to a very hard never never land when running the test suite. I am now testing again with the patch for PR31262 in place by itself. I will then try again with pr30834_4.diff applied secondly.


Can anyone remember the magic formula to set memory limits on processes. My system ended up using all 1.5 Gig of memory and then thrashed until I had no choice but the ON - OFF - ON sequence. Ouch.

Jerry

Well I tried again and I get massive memory usage and runaway processes. The culprit is f951 when trying to compile integer_exponentiation_3.F90.

The patch went in clean and built fine, but it no worky here. I must be missing something.

X86-64-Gnu/Linux

Jerry



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