Bug 41293 - FGSL: Wrong code generated
Summary: FGSL: Wrong code generated
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.5.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: wrong-code
Depends on: 41297 41298
Blocks:
  Show dependency treegraph
 
Reported: 2009-09-07 07:11 UTC by Tobias Burnus
Modified: 2010-01-08 09:49 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Burnus 2009-09-07 07:11:49 UTC
This is with the Fortran bindings to the GNU Scientific Library,
http://www.lrz-muenchen.de/services/software/mathematik/gsl/fortran/

Compiling works OK, but the test suite shows a couple of failures with gfortran:

Running montecarlo.exe:
 FAIL: fgsl_monte_monte_vegas_getparams
FAIL: 1 of 21 tests failed
 fgsl_monte_monte_vegas_getparams: aborting Execution
Running multimin.exe:
 FAIL: fgsl_multimin_fdfminimizer_iterate
FAIL: 1 of 12 tests failed
Running error test:
OK: All 6 tests passed
 FAIL: fgsl_interp_alloc:nofail
FAIL: 1 of 1 tests failed

The "multimin.exe" test might be a bug in the test suite as g95, ifort and gfortran show the same error. (For g95 it is the only error, the ifort has additionally for array.exe/poly.exe a segfault.)
Comment 1 Tobias Burnus 2009-09-07 10:29:19 UTC
With GCC 4.4 one has only the "montecarlo.exe" and "multimin.exe" error, but not the "error.x" error.
Comment 2 Tobias Burnus 2009-09-07 16:05:35 UTC
The "error.x" failure is presumably due to PR 41297.
Comment 3 Tobias Burnus 2009-09-07 16:24:58 UTC
The montecarlo.exe issue is PR 41298.
Comment 4 Tobias Burnus 2009-09-07 16:56:12 UTC
Regarding multimin.exe:

The second call to unit_assert_equal_within fails. For the first, the expected value is 30 and it succeeds.

For the second one, one does 13 loops with fgsl_multimin_fdfminimizer_iterate with status == 0 and a minimum of mmin_fmin of 3.5e-317 (unchanged). After the loop there is a check whether this number matches (within 1e-5) the number 30 which fails:

fgsl_multimin_fdfminimizer_iterate     3.000000000000000000D+01 3.511692129834245077-317 1.0D-05

I currently assume that it is a test bug, FGSL or GSL bug.
Comment 5 Tobias Burnus 2010-01-08 09:49:28 UTC
I just compiled GSL 1.13, FGSL 0.9.2 and run "make test" without any failure.
Thus: Close as FIXED.

Note: I have a patch for PR 41298 applied,
cf. http://gcc.gnu.org/ml/fortran/2010-01/msg00047.html