On Wed, 4 Dec 2019, Jakub Jelinek wrote: > 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?
Possibly. Note the patch didn't work out since flag_checking isn't available so we probably would have to add some flag to diagnostic_context. Not working on this - it was just a bit annoying when debugging an issue that shows up with checking only with a compiler with release checking enabled. Richard. > > 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 > > -- Richard Biener <rguent...@suse.de> SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)