I'm getting testsuite failures in gfortran.dg/open_errors.f90 with mainline on sparc-sun-solaris2.10: http://gcc.gnu.org/ml/gcc-testresults/2007-04/msg00897.html The logfile only says: FAIL: gfortran.dg/open_errors.f90 -O0 execution test at all optimization levels. Running it by hand, it simply says: Abort (core dumped) If I run it under gdb-6.4, then gdb core dumps, so I don't have a backtrace or any useful info at the moment. I'll try and see if a later version of gdb does any better.
This could be as simple as the error messages returned by the OS don't match what we put in the test case. Try changing: call abort() to: print *, msg This will then print the error messages instead of aborting and you may be able to see what is going on.
(In reply to comment #1) > Try changing: > call abort() > to: > print *, msg > This will then print the error messages instead of aborting and you may be able > to see what is going on. If I make your suggested change, I see that I get a failure in the third abort test, where it opens "./" and the msg is " Invalid argument". PS: gdb-6.6 was no help, it crashes as well. :-(
It looks like this platform has different error messages for a given error. I suggest that this test case be either marked as expected to fail for this platform or we could delete the test case altogether. Another possibility is to pre-process it to check for the different message instead. I am not sure how to do that within the testsuite. #ifdef do this #else do that for example.
(In reply to comment #3) > It looks like this platform has different error messages for a given error. Yes that's correct. I ran open_errors.exe under the solaris truss command and saw this: open64("./", O_RDWR|O_CREAT, 0666) Err#22 EINVAL So solaris generates EINVAL in this situation. I can easily change the testcase to also expect this possibility. However I'm not sure how reliable it is to string compare the english message from strerror as this testcase does. Anyway, I'll create a patch.
Patch posted here: http://gcc.gnu.org/ml/gcc-patches/2007-04/msg01457.html
Subject: Bug 31616 Author: ghazi Date: Mon Apr 23 08:52:24 2007 New Revision: 124059 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124059 Log: PR fortran/31616 * gfortran.dg/open_errors.f90: Allow a different error message. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gfortran.dg/open_errors.f90
Patch installed
Updated testsuite results: http://gcc.gnu.org/ml/gcc-testresults/2007-04/msg01287.html