[PATCH 2/2] Add patch for debugging compiler ICEs.

Yury Gribov y.gribov@samsung.com
Fri Sep 19 03:33:00 GMT 2014


On 09/19/2014 02:16 AM, Joseph S. Myers wrote:
> On Thu, 11 Sep 2014, Maxim Ostapenko wrote:
>
>> In general, when cc1 or cc1plus ICE-es, we try to reproduce the bug by running
>> compiler 3 times and comparing stderr and stdout on each attempt with
>> respective ones that were gotten as the result of previous compiler run (we
>> use temporary dump files to do this). If these files are identical, we add GCC
>> configuration (e.g. target, configure options and version), compiler command
>> line and preprocessed source code into last dump file, containing backtrace.
>> Following Jakub's approach, we trigger ICE_EXIT_CODE instead of
>> FATAL_EXIT_CODE in case of DK_FATAL error to differ ICEs from other fatal
>> errors, so try_generate_repro routine will be able to run even if fatal_error
>> occurred in compiler.
>
> I still don't understand what's going on here with exit codes.

I'd second this, internal_error already exits with ICE_EXIT_CODE via 
DK_ICE. Forcing fatal errors to return ICE_EXIT_CODE as well seems 
unnecessary.

-Y



More information about the Gcc-patches mailing list