Home > Archive > Fortran > February 2005 > stripping a program to submit a bug report
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
stripping a program to submit a bug report
|
|
| beliavsky@aol.com 2005-02-02, 4:00 pm |
| I think a tool that could benefit both gfortran and g95 users and
developers is a program that could automatically reduce a program
triggering a bug to the smallest version that still contains the bug
and is legal Fortran. The user could add a comment to the code such as
!! next line triggers bug
and the tool would eliminate code not needed to execute that line.
I do this manually, by deleting code after the line with the bug, then
removing unused variables, removing unused modules, etc., but this
takes considerable time. I don't think the procedure can be fully
automated, but I know that what I do is pretty mechanical.
| |
|
|
beliav...@aol.com wrote:
> I think a tool that could benefit both gfortran and g95 users and
> developers is a program that could automatically reduce a program
> triggering a bug to the smallest version that still contains the bug
> and is legal Fortran.
:-) exercise really helps here, many of the testcases I reported start
from 300000 lines of code, but reduction can be very rapid by trial and
error spotting the kind of construct that is used (e.g. array within an
optional derived type ..).
Nevertheless, for some cases I use a modified version of
http://pi3.informatik.uni-mannheim....n/maketestcase/
which automatically reduces the size of the program by deleting lines,
recompiling and checking if the error message is identical. It can work
very well, it can fail very badly. The main problem is that it doesn't
conserve the number of lines in the program, is not fortran aware, and
can be very slow. It would be a good starting point for a better tool,
but it is already useful.
This is the 'diff' between the original version, and the version I use:
testcase/orig> diff ../maketestcase.cpp maketestcase.cpp
53,54c53
< out << endl;
< // out << "#line " << (index+1) << " \"" << file << "\"" <<
endl;
---
> out << "#line " << (index+1) << " \"" << file << "\"" <<
endl;
150c149
< /* remove(outTempFile.c_str()); */
---
> remove(outTempFile.c_str());
|
|
|
|
|