------- Comment #6 from danglin at gcc dot gnu dot org 2008-12-27 17:33 ------- I agree with Steve that this is a HP math lib bug. For Steve's test program, we have the following code at -O1:
fldw 0(%r3),%fr12R fcpy,sgl %fr12R,%fr4R fcpy,sgl %fr13R,%fr5R ldo -48(%r30),%r29 b,l powf,%r2 copy %r27,%r4 copy %r4,%r27 fstw %fr4R,-1176(%r30) fdiv,sgl %fr14R,%fr12R,%fr12R fmpy,sgl %fr12R,%fr12R,%fr12R fstw %fr12R,-1172(%r30) ldo -1176(%r30),%r26 ldo -48(%r30),%r29 b,l check_equal_r_,%r2 ldo -1172(%r30),%r25 Checking the value of fr12R before and after the call to powf, I see the values differ. The runtime specification states on page 14 that FRs 12-21 are preserved across calls. I think this bug can be worked around by providing powf in libgfortran on this target. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832