With powerpc-apple-darwin7.9.0, version 4.3.0 20070223, the polyhedron test 'fatigue.f90' (see http://www.polyhedron.co.uk/pb05/polyhedron_benchmark_suite.html) gives ... Simulation terminated. This sample will never fracture. The imposed stress is below the fatigue limit. See the output file for more information. with optimisation -O1 and above. It worked with 4.3.0 20070217. If I add the line if(coefficient == 1000.0) print *, n, coefficient after line 1428, the code works again. I am attaching two reduced tests. The first one works without optimization, gives Simulation terminated. Spin cycle = 100000 Time (sec) = 2.77778E+01 The maximum number of simulation spin cycles was exceeded. with -O1, and This sample will never fracture. The imposed stress is below the fatigue limit. with -O2. The second test is similar to the previous one but works with -O3 -ffast-math -funroll-loops I have commented several variants which break the code. Of special interest is !4 where if (accumulated_plastic_strain < plastic_strain_threshold) then else is working, but not if (accumulated_plastic_strain >= plastic_strain_threshold) then Note that there is also some problems with the test 'induct.f90' see http://gcc.gnu.org/ml/fortran/2007-02/msg00554.html
Created attachment 13114 [details] this test works only without optimization
Created attachment 13115 [details] test working with -O3 -ffast-math -funroll-loops
Still works on x86_64, so it's a target issue.
Subject: Re: The polyhedron test 'fatigue.f90' is no longer working. > Still works on x86_64, so it's a target issue. Nevertheless a regression.
> Still works on x86_64, so it's a target issue. There really has not been any rs6000 changes lately so I am going to say middle-end until I get to look into it on powerpc-linux-gnu.
I don't know if this reduced test account for all the problem, but it exhibits at least one bug: module perdida_m implicit none contains subroutine perdida (dt, strain_tensor) real (kind = 8), intent(in) :: dt real (kind = 8), dimension(:,:), intent(in) :: strain_tensor end subroutine perdida end module perdida_m program iztaccihuatl use perdida_m implicit none real (kind = 8) :: dt, time, coefficient real (kind = 8), dimension(3,3,10) :: strain_tensor dt = 5.555555555555556D-006 strain_tensor = 0.0_8 time = dt coefficient = sin(time) print *, coefficient coefficient = cos(time) call perdida (dt, strain_tensor(:,:,1)) end program iztaccihuatl gives 1.947453947074031E-314 If I comment the line 'call perdida (dt, strain_tensor(:,:,1))', I get 5.555555555526978E-006 As far as I can tell, all the ingredients in this test case are necessary to trigger the bug.
Related to PR30980.
Thanks to Richard Guenther, the bug seems to be fixed (hopefully in the 20070316 snapshot): see PR31161 for details. I'll comment in another PR about the corresponding "optimization" (too late to do it tonight).
This is reported fixed; can we close this PR?
Never confirmed, and reported says the bug seems to be fixed. If the bug is still there, please re-open this PR.