* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
@ 2007-06-07 22:47 ` sje at cup dot hp dot com
2007-07-06 8:45 ` dfranke at gcc dot gnu dot org
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sje at cup dot hp dot com @ 2007-06-07 22:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sje at cup dot hp dot com 2007-06-07 22:47 -------
I have looked into this bug and I think it is an HP math lib bug. The 64 bit
powf function is using %fr12R but not saving/restoring it the way it is
supposed to. I have a query in to the math lib folks to see if they can verify
my finding.
Here is a smaller test case that prints different values at -O1 or -O2 than at
-O0.
program test
real a
call run_me (-1.1, -1)
a = -1.1
end program test
subroutine run_me(a, i)
implicit none
real, intent(in) :: a
integer, intent(in) :: i
print *, a**-2.0
print *, (1/a)*(1/a)
call check_equal_r (a**-2.0, (1/a)*(1/a))
end subroutine run_me
subroutine check_equal_r (a, b)
real, intent(in) :: a, b
print *, a
print *, b
end subroutine check_equal_r
--
sje at cup dot hp dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sje at cup dot hp dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
2007-06-07 22:47 ` [Bug fortran/31832] " sje at cup dot hp dot com
@ 2007-07-06 8:45 ` dfranke at gcc dot gnu dot org
2007-07-07 15:10 ` danglin at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2007-07-06 8:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2007-07-06 08:45 -------
To implement PR32239, integer exponention was changed recently:
2007-07-01 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/32239
* trans-expr.c (gfc_conv_power_op): Use builtin_powi for
real**int4 powers.
* f95-lang.c (gfc_init_builtin_functions): Add builtin_powi to the
builtins table.
By any chance, does it make any differences for this testcase?
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dfranke at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
2007-06-07 22:47 ` [Bug fortran/31832] " sje at cup dot hp dot com
2007-07-06 8:45 ` dfranke at gcc dot gnu dot org
@ 2007-07-07 15:10 ` danglin at gcc dot gnu dot org
2007-08-08 17:29 ` fxcoudert at gcc dot gnu dot org
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2007-07-07 15:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from danglin at gcc dot gnu dot org 2007-07-07 15:09 -------
I don't know. I haven't been able to bootstrap hppa64-hp-hpux11.11 since
the dataflow merge. The following two tests are failing on
hppa2.0w-hp-hpux11.11 (revision 126397):
FAIL: gfortran.dg/integer_exponentiation_2.f90 -O3 -fomit-frame-pointer
-funrol
l-loops execution test
FAIL: gfortran.dg/integer_exponentiation_2.f90 -O3 -fomit-frame-pointer
-funrol
l-all-loops -finline-functions execution test
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-07-07 15:10 ` danglin at gcc dot gnu dot org
@ 2007-08-08 17:29 ` fxcoudert at gcc dot gnu dot org
2007-08-08 17:30 ` fxcoudert at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-08 17:29 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-08 17:29:42
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-08-08 17:29 ` fxcoudert at gcc dot gnu dot org
@ 2007-08-08 17:30 ` fxcoudert at gcc dot gnu dot org
2007-08-09 21:55 ` fxcoudert at gcc dot gnu dot org
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-08 17:30 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-08-08 17:29:42 |2007-08-08 17:29:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-08-08 17:30 ` fxcoudert at gcc dot gnu dot org
@ 2007-08-09 21:55 ` fxcoudert at gcc dot gnu dot org
2007-08-09 23:30 ` dave at hiauly1 dot hia dot nrc dot ca
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-08-09 21:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from fxcoudert at gcc dot gnu dot org 2007-08-09 21:54 -------
(In reply to comment #1)
> I have looked into this bug and I think it is an HP math lib bug. The 64 bit
> powf function is using %fr12R but not saving/restoring it the way it is
> supposed to. I have a query in to the math lib folks to see if they can verify
> my finding.
Any results? I cannot reproduce this on hppa2.0w-hp-hpux11.31 (neither the
original bug nor your testcase that gives different results depending on
optimization level).
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-08-09 21:55 ` fxcoudert at gcc dot gnu dot org
@ 2007-08-09 23:30 ` dave at hiauly1 dot hia dot nrc dot ca
2007-10-05 13:02 ` fxcoudert at gcc dot gnu dot org
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: dave at hiauly1 dot hia dot nrc dot ca @ 2007-08-09 23:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dave at hiauly1 dot hia dot nrc dot ca 2007-08-09 23:30 -------
Subject: Re: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
> Any results? I cannot reproduce this on hppa2.0w-hp-hpux11.31 (neither the
> original bug nor your testcase that gives different results depending on
> optimization level).
To reproduce the original bug, you would need to build for
hppa64-hp-hpux11.31 target. If you bootstrap with an HP compiler,
you would need to add +DA2.0W to the stage1 CFLAGS. The two targets
use different math libraries.
The hppa64 problem was still present in my last build prior to
the lroundl issue. Somewhere between August 4 and 8 bootstrap
started to fail on this target.
I also still see the fails mentioned in comment #3. See
http://gcc.gnu.org/ml/gcc-testresults/2007-08/msg00236.html
This might be a different bug.
Dave
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-08-09 23:30 ` dave at hiauly1 dot hia dot nrc dot ca
@ 2007-10-05 13:02 ` fxcoudert at gcc dot gnu dot org
2007-12-08 18:07 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-10-05 13:02 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |fxcoudert at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-08-08 17:29:56 |2007-10-05 13:01:47
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-10-05 13:02 ` fxcoudert at gcc dot gnu dot org
@ 2007-12-08 18:07 ` fxcoudert at gcc dot gnu dot org
2008-12-27 17:34 ` danglin at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-12-08 18:07 UTC (permalink / raw)
To: gcc-bugs
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|fxcoudert at gcc dot gnu dot|unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-12-08 18:07 ` fxcoudert at gcc dot gnu dot org
@ 2008-12-27 17:34 ` danglin at gcc dot gnu dot org
2008-12-28 16:23 ` danglin at gcc dot gnu dot org
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-12-27 17:34 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-12-27 17:34 ` danglin at gcc dot gnu dot org
@ 2008-12-28 16:23 ` danglin at gcc dot gnu dot org
2008-12-29 20:12 ` danglin at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-12-28 16:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from danglin at gcc dot gnu dot org 2008-12-28 16:22 -------
Patch here:
http://gcc.gnu.org/ml/fortran/2008-12/msg00315.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (10 preceding siblings ...)
2008-12-28 16:23 ` danglin at gcc dot gnu dot org
@ 2008-12-29 20:12 ` danglin at gcc dot gnu dot org
2008-12-31 15:44 ` danglin at gcc dot gnu dot org
2008-12-31 15:45 ` danglin at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-12-29 20:12 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from danglin at gcc dot gnu dot org 2008-12-29 20:11 -------
Subject: Bug 31832
Author: danglin
Date: Mon Dec 29 20:10:00 2008
New Revision: 142952
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142952
Log:
PR fortran/31832
* acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): New autoconf check for
broken powf.
* configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Use it.
* intrinsics/c99_functions.c: Use internal powf implementation if
HAVE_BROKEN_POWF is defined.
* configure: Rebuilt.
* config.h.in: Rebuilt.
Modified:
trunk/libgfortran/ChangeLog
trunk/libgfortran/acinclude.m4
trunk/libgfortran/config.h.in
trunk/libgfortran/configure
trunk/libgfortran/configure.ac
trunk/libgfortran/intrinsics/c99_functions.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (11 preceding siblings ...)
2008-12-29 20:12 ` danglin at gcc dot gnu dot org
@ 2008-12-31 15:44 ` danglin at gcc dot gnu dot org
2008-12-31 15:45 ` danglin at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-12-31 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from danglin at gcc dot gnu dot org 2008-12-31 15:43 -------
Subject: Bug 31832
Author: danglin
Date: Wed Dec 31 15:42:12 2008
New Revision: 142984
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142984
Log:
PR fortran/31832
* acinclude.m4 (LIBGFOR_CHECK_FOR_BROKEN_POWF): New autoconf check for
broken powf.
* configure.ac (LIBGFOR_CHECK_FOR_BROKEN_POWF): Use it.
* intrinsics/c99_functions.c: Use internal powf implementation if
HAVE_BROKEN_POWF is defined.
* configure: Rebuilt.
* config.h.in: Rebuilt.
Modified:
branches/gcc-4_3-branch/libgfortran/ChangeLog
branches/gcc-4_3-branch/libgfortran/acinclude.m4
branches/gcc-4_3-branch/libgfortran/config.h.in
branches/gcc-4_3-branch/libgfortran/configure
branches/gcc-4_3-branch/libgfortran/configure.ac
branches/gcc-4_3-branch/libgfortran/intrinsics/c99_functions.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug fortran/31832] FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above
2007-05-05 1:21 [Bug fortran/31832] New: FAIL: gfortran.dg/integer_exponentiation_2.f90 at -O1 and above danglin at gcc dot gnu dot org
` (12 preceding siblings ...)
2008-12-31 15:44 ` danglin at gcc dot gnu dot org
@ 2008-12-31 15:45 ` danglin at gcc dot gnu dot org
13 siblings, 0 replies; 15+ messages in thread
From: danglin at gcc dot gnu dot org @ 2008-12-31 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from danglin at gcc dot gnu dot org 2008-12-31 15:43 -------
Fixed.
--
danglin at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31832
^ permalink raw reply [flat|nested] 15+ messages in thread