* [PATCH] Enable ICE-after-error with -fchecking
@ 2019-12-04 14:21 Richard Biener
2019-12-04 16:26 ` Jakub Jelinek
0 siblings, 1 reply; 5+ messages in thread
From: Richard Biener @ 2019-12-04 14:21 UTC (permalink / raw)
To: gcc-patches
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?
Bootstrap & regtest running on x86_64-unkown-linux-gnu.
Richard.
2019-12-05 Richard Biener <rguenther@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)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Enable ICE-after-error with -fchecking
2019-12-04 14:21 [PATCH] Enable ICE-after-error with -fchecking Richard Biener
@ 2019-12-04 16:26 ` Jakub Jelinek
2019-12-05 8:22 ` Richard Biener
2019-12-06 16:14 ` Segher Boessenkool
0 siblings, 2 replies; 5+ messages in thread
From: Jakub Jelinek @ 2019-12-04 16:26 UTC (permalink / raw)
To: Richard Biener; +Cc: gcc-patches
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 <rguenther@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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Enable ICE-after-error with -fchecking
2019-12-04 16:26 ` Jakub Jelinek
@ 2019-12-05 8:22 ` Richard Biener
2019-12-06 16:14 ` Segher Boessenkool
1 sibling, 0 replies; 5+ messages in thread
From: Richard Biener @ 2019-12-05 8:22 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]
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 <rguenther@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 <rguenther@suse.de>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Enable ICE-after-error with -fchecking
2019-12-04 16:26 ` Jakub Jelinek
2019-12-05 8:22 ` Richard Biener
@ 2019-12-06 16:14 ` Segher Boessenkool
2019-12-09 7:54 ` Richard Biener
1 sibling, 1 reply; 5+ messages in thread
From: Segher Boessenkool @ 2019-12-06 16:14 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Richard Biener, gcc-patches
On Wed, Dec 04, 2019 at 05:26:25PM +0100, Jakub Jelinek wrote:
> 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?
Does it not already happen? You need dump files enabled, of course.
Segher
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Enable ICE-after-error with -fchecking
2019-12-06 16:14 ` Segher Boessenkool
@ 2019-12-09 7:54 ` Richard Biener
0 siblings, 0 replies; 5+ messages in thread
From: Richard Biener @ 2019-12-09 7:54 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: Jakub Jelinek, gcc-patches
On Fri, 6 Dec 2019, Segher Boessenkool wrote:
> On Wed, Dec 04, 2019 at 05:26:25PM +0100, Jakub Jelinek wrote:
> > 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?
>
> Does it not already happen? You need dump files enabled, of course.
No, the issue is that IL verification errors use "error" and thus
you trigger the ICE-after-error machinery which appearantly goes
a completely different path. And -fchecking doesn't "disable"
the ICE-after-error detection (which IMHO it should and what this
patch is about).
Richard.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-12-09 7:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-04 14:21 [PATCH] Enable ICE-after-error with -fchecking Richard Biener
2019-12-04 16:26 ` Jakub Jelinek
2019-12-05 8:22 ` Richard Biener
2019-12-06 16:14 ` Segher Boessenkool
2019-12-09 7:54 ` Richard Biener
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).