* [PATCH] diagnostics: ignore -fmax-errors for ICE
@ 2020-12-01 16:35 Martin Liška
2020-12-02 0:27 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Martin Liška @ 2020-12-01 16:35 UTC (permalink / raw)
To: gcc-patches
Right now I see:
./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1
/home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’:
/home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch statement
22 | }
| ^
int *
switch (v_2(D)) <default: <L16> [INV], case 0B: <L11> [INV], case 5B: <L12> [INV], case 6B: <L13> [INV], case 7B: <L14> [INV], case 8B: <L15> [INV]>
compilation terminated due to -fmax-errors=1.
with the patch I get:
./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 -c
/home/marxin/Programming/testcases/json.i: In function ‘json_variant_type’:
/home/marxin/Programming/testcases/json.i:22:1: error: non-integral type switch statement
22 | }
| ^
int *
switch (v_2(D)) <default: <L16> [INV], case 0B: <L11> [INV], case 5B: <L12> [INV], case 6B: <L13> [INV], case 7B: <L14> [INV], case 8B: <L15> [INV]>
during GIMPLE pass: iftoswitch
/home/marxin/Programming/testcases/json.i:22:1: internal compiler error: verify_gimple failed
0xe4478c verify_gimple_in_cfg(function*, bool)
/home/marxin/Programming/gcc/gcc/tree-cfg.c:5467
0xd201cf execute_function_todo
/home/marxin/Programming/gcc/gcc/passes.c:2042
0xd2101c do_per_function
/home/marxin/Programming/gcc/gcc/passes.c:1687
0xd2101c execute_todo
/home/marxin/Programming/gcc/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
gcc/ChangeLog:
* diagnostic.c (diagnostic_report_diagnostic): ICE causes to
terminate compiler immediately, so I guess it should be printed
always.
---
gcc/diagnostic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c
index fe509d88e6d..da20cdb2703 100644
--- a/gcc/diagnostic.c
+++ b/gcc/diagnostic.c
@@ -1172,7 +1172,7 @@ diagnostic_report_diagnostic (diagnostic_context *context,
return false;
}
- if (diagnostic->kind != DK_NOTE)
+ if (diagnostic->kind != DK_NOTE && diagnostic->kind != DK_ICE)
diagnostic_check_max_errors (context);
context->lock++;
--
2.29.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] diagnostics: ignore -fmax-errors for ICE
2020-12-01 16:35 [PATCH] diagnostics: ignore -fmax-errors for ICE Martin Liška
@ 2020-12-02 0:27 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2020-12-02 0:27 UTC (permalink / raw)
To: Martin Liška, gcc-patches
On 12/1/20 9:35 AM, Martin Liška wrote:
> Right now I see:
>
> ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1
> /home/marxin/Programming/testcases/json.i: In function
> ‘json_variant_type’:
> /home/marxin/Programming/testcases/json.i:22:1: error: non-integral
> type switch statement
> 22 | }
> | ^
> int *
> switch (v_2(D)) <default: <L16> [INV], case 0B: <L11> [INV], case 5B:
> <L12> [INV], case 6B: <L13> [INV], case 7B: <L14> [INV], case 8B:
> <L15> [INV]>
> compilation terminated due to -fmax-errors=1.
>
> with the patch I get:
>
> ./xgcc -B. ~/Programming/testcases/json.i -c -O2 -fmax-errors=1 -c
> /home/marxin/Programming/testcases/json.i: In function
> ‘json_variant_type’:
> /home/marxin/Programming/testcases/json.i:22:1: error: non-integral
> type switch statement
> 22 | }
> | ^
> int *
> switch (v_2(D)) <default: <L16> [INV], case 0B: <L11> [INV], case 5B:
> <L12> [INV], case 6B: <L13> [INV], case 7B: <L14> [INV], case 8B:
> <L15> [INV]>
> during GIMPLE pass: iftoswitch
> /home/marxin/Programming/testcases/json.i:22:1: internal compiler
> error: verify_gimple failed
> 0xe4478c verify_gimple_in_cfg(function*, bool)
> /home/marxin/Programming/gcc/gcc/tree-cfg.c:5467
> 0xd201cf execute_function_todo
> /home/marxin/Programming/gcc/gcc/passes.c:2042
> 0xd2101c do_per_function
> /home/marxin/Programming/gcc/gcc/passes.c:1687
> 0xd2101c execute_todo
> /home/marxin/Programming/gcc/gcc/passes.c:2096
> Please submit a full bug report,
> with preprocessed source if appropriate.
> Please include the complete backtrace with any bug report.
> See <https://gcc.gnu.org/bugs/> for instructions.
>
> gcc/ChangeLog:
>
> * diagnostic.c (diagnostic_report_diagnostic): ICE causes to
> terminate compiler immediately, so I guess it should be printed
> always.
OK
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-02 0:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 16:35 [PATCH] diagnostics: ignore -fmax-errors for ICE Martin Liška
2020-12-02 0:27 ` Jeff Law
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).