This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: RFA: gcc.c retry hack


> On Fri, 30 Mar 2001 RDBrown@mira.net wrote:

>> The following hack will retry a failing (ICE) compilation after stripping out
>> -O arguments (controlled by the ICE_RETRY environment variable).

> If adding retry support, please do something else useful: if the ICE is in
> the compiler (I guess ones in the preprocessor can't so readily be
> distinguished), try to generate a .i (or .ii or .mi) file and see if that
> reproduces the problem.  If it does, tell the user the name of the .i file
> they should send in their bug report.  Also output a nicely formatted
> statement of compiler version, host/target, and options used, to be
> included in the bug report.

> -- 
> Joseph S. Myers

To paraphrase:
   provide a command line argument that automates producing the files needed
to usefully report compiler Internal Compiler Errors.

Should this be independant of attempting to compile a `working' object from
the offending source file by retrying the compilation without optimization?

>From a cursory look, something like

for the offending source file,
reparse the specs after inserting --save-temps --verbose
if the compiler fails again,
move aside the files created and write a file with the version info.


Can creating reduced testcases from .{i,ii} files be automated more?
The obvious

egrep -v '^[ \t]*#'
cat --squeeze-blank
indent

Easy to say
Remove unused declarations -- from header files
Remove any functions not called by the function in which the compiler
fails, it's callers and callees.
....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]