On Wed, Dec 04, 2019 at 03:20:59PM +0100, Richard Biener wrote:
> Currently IL verification errors trigger "confused by earlier errors"
> messages with a release compiler but compiling with -fchecking.
> That is because those use error() before internal_error.
> 
> This precludes useful things like emergency IL dump in dump files.
> 
> Thus the following - change CHECKING_P to flag_checking.
> 
> Any objections?

I'd fear people will use -fchecking and feel error-recovery bugs are then
more important because they no longer get the more user friendly message.
Can't we arrange for the emergency IL dump to happen in this case anyway?

> 2019-12-05  Richard Biener  <rguent...@suse.de>
> 
>       * diagnostic.c: Include options.h.
>       (diagnostic_report_diagnostic): Enable ICEs after errors with
>       -fchecking.
> 
> Index: gcc/diagnostic.c
> ===================================================================
> --- gcc/diagnostic.c  (revision 278963)
> +++ gcc/diagnostic.c  (working copy)
> @@ -36,6 +36,7 @@ along with GCC; see the file COPYING3.
>  #include "selftest.h"
>  #include "selftest-diagnostic.h"
>  #include "opts.h"
> +#include "options.h"
>  
>  #ifdef HAVE_TERMIOS_H
>  # include <termios.h>
> @@ -1023,7 +1024,7 @@ diagnostic_report_diagnostic (diagnostic
>        /* When not checking, ICEs are converted to fatal errors when an
>        error has already occurred.  This is counteracted by
>        abort_on_error.  */
> -      if (!CHECKING_P
> +      if (!flag_checking
>         && (diagnostic_kind_count (context, DK_ERROR) > 0
>             || diagnostic_kind_count (context, DK_SORRY) > 0)
>         && !context->abort_on_error)

        Jakub

Reply via email to