This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [gfortran] Exponentiation by integral exponents
Paul Brook wrote:
rse.expr = convert (type, rse.expr); // second try
This is correct. You should then just fall through to the BT_REAL case.
Thanks.
I found the bug which made my test fail: My problem was due to the fact
that my testcase was trying to exponentiate a complex variable. This of
course failed, because it unconditionally falls through to the real
case, even though rse.expr has just been converted to a complex type.
I'll let this as is, as I only want to try the builtin for the moment.
Now I have to find out, how to correctly use the builtin. Simply
replacing "pow" by "__builtin_pow" in trans-decl.c didn't work, the
compiler generates a call to __builtin_pow in the assembly, which is not
what I want.
BTW I just sent my signed copyright papers to the FSF.
- Tobi