make tests failed with the NAG Compiler v 6.1 on Ubuntu 14.04
john@oscar:~/io$ make tests
make -C /home/john/io/source all
make[1]: Entering directory /home/john/io/source'
make[1]: Nothing to be done forall'.
make[1]: Leaving directory /home/john/io/source'
make -C /home/john/io/tests all
make[1]: Entering directory/home/john/io/tests'
make[1]: Nothing to be done for all'.
make[1]: Leaving directory/home/john/io/tests'
./tests/tests.x
................................................................................
................................................................................
Runtime Error: *** Arithmetic exception: Integer divide by zero - aborting
XmlPrinter.F90, line 106: Error occurred in XMLPRINTER_MOD:PRINT
Test_XmlPrinter.F90, line 99: Called by TEST_XMLPRINTER_MOD:TESTVALIDXML
TestMethod.F90, line 86: Called by TESTMETHOD_MOD:RUNMETHOD
TestCase.F90, line 133: Called by TESTCASE_MOD:RUNBARE
TestCase.F90, line 143: Called by TESTCASE_MOD:RUNBARE_SURROGATE
TestResult.F90, line 235: Called by TESTRESULT_MOD:RUN
TestCase.F90, line 120: Called by TESTCASE_MOD:RUN
TestSuite.F90, line 114: Called by TESTSUITE_MOD:RUN
TestSuite.F90, line 114: Called by TESTSUITE_MOD:RUN
TestRunner.F90, line 100: Called by TESTRUNNER_MOD:RUN
selfTests.F90, line 131: Called by MAIN:RUNTESTS
selfTests.F90, line 13: Called by MAIN
.............................
make: *** [tests] Aborted (core dumped)
Thank you for the report. We don’t have 6.1 installed here (yet), but I’ll try to identify the underlying cause from the messages given.
Related
Bugs:
#53I got 6.1 installed on my OS X laptop and have generated a slightly different error at the same line.
Adding a few print statements suggests that this may be a compiler bug. I'll play a bit more over the weekend to see if I can isolate it. If I don't find a bug in the framework, I'll open a ticket with NAG to see if they can provide a better clue as to why the state of the TestResult object is bad.
A small update. I used SELECT TYPE to explicitly cast the "result" variable in the offending section to the concrete type. The code then runs correctly. I'm slightly more convinced that this is a compiler bug, but ... NAG is very good at exposing problems in "slightly" illegal code. Going to try a few more things before submitting a report to NAG.
NAG has confirmed that this "looks like" a bug on their end. I'm still prepared for this to be some subtle violation of the standard in pFUnit. But for now we'll wait to hear from them.
Thanks for the update Tom. I should say that I work at NAG but not in the development team. I will talk to those assigned to the ticket. I also like to show my appreciation for PFUNIT, it has helped me track down some bugs in an old code from PhD. So, thanks!
John,
My pleasure - I’m glad the framework is proving useful for others. I’ve actually been relatively unsuccessful in getting other NASA people to use the framework. (Mostly unsuccessful in getting them to unit test.) Notes such as yours are greatly appreciated.
If you have features for future revisions that you think would be useful, please share.
Cheers,
Related
Bugs:
#53