* [PATCH] Don't ICE running selftests if errors were raised [PR99723]
@ 2022-09-27 15:12 Andrea Corallo
2022-09-29 20:46 ` Jeff Law
0 siblings, 1 reply; 3+ messages in thread
From: Andrea Corallo @ 2022-09-27 15:12 UTC (permalink / raw)
To: gcc-patches; +Cc: Andrea Corallo
Hi all
this is to address PR 99723.
In the PR GCC crashes as the initialization of common trees is not
performed as no compilation is happening, this is because we raise an
error earlier while processing the arch flags.
This patch changes the code to execute selftests only if no errors
where raised before.
Bootstrapped on aarch64, okay for trunk?
Best Regards
Andrea
2022-09-27 Andrea Corallo <andrea.corallo@arm.com>
* toplev.cc (toplev::main): Don't run self tests in case of
previous error.
---
gcc/toplev.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/toplev.cc b/gcc/toplev.cc
index 924871fa9a8..b53a78bbaf1 100644
--- a/gcc/toplev.cc
+++ b/gcc/toplev.cc
@@ -2276,7 +2276,7 @@ toplev::main (int argc, char **argv)
start_timevars ();
do_compile (no_backend);
- if (flag_self_test)
+ if (flag_self_test && !seen_error ())
{
if (no_backend)
error_at (UNKNOWN_LOCATION, "self-tests incompatible with %<-E%>");
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't ICE running selftests if errors were raised [PR99723]
2022-09-27 15:12 [PATCH] Don't ICE running selftests if errors were raised [PR99723] Andrea Corallo
@ 2022-09-29 20:46 ` Jeff Law
2022-10-10 13:23 ` Andrea Corallo
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Law @ 2022-09-29 20:46 UTC (permalink / raw)
To: gcc-patches
On 9/27/22 09:12, Andrea Corallo via Gcc-patches wrote:
> Hi all
>
> this is to address PR 99723.
>
> In the PR GCC crashes as the initialization of common trees is not
> performed as no compilation is happening, this is because we raise an
> error earlier while processing the arch flags.
>
> This patch changes the code to execute selftests only if no errors
> where raised before.
>
> Bootstrapped on aarch64, okay for trunk?
>
> Best Regards
>
> Andrea
>
> 2022-09-27 Andrea Corallo <andrea.corallo@arm.com>
>
> * toplev.cc (toplev::main): Don't run self tests in case of
> previous error.
OK
jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Don't ICE running selftests if errors were raised [PR99723]
2022-09-29 20:46 ` Jeff Law
@ 2022-10-10 13:23 ` Andrea Corallo
0 siblings, 0 replies; 3+ messages in thread
From: Andrea Corallo @ 2022-10-10 13:23 UTC (permalink / raw)
To: Jeff Law via Gcc-patches; +Cc: Jeff Law
Jeff Law via Gcc-patches <gcc-patches@gcc.gnu.org> writes:
> On 9/27/22 09:12, Andrea Corallo via Gcc-patches wrote:
>> Hi all
>>
>> this is to address PR 99723.
>>
>> In the PR GCC crashes as the initialization of common trees is not
>> performed as no compilation is happening, this is because we raise an
>> error earlier while processing the arch flags.
>>
>> This patch changes the code to execute selftests only if no errors
>> where raised before.
>>
>> Bootstrapped on aarch64, okay for trunk?
>>
>> Best Regards
>>
>> Andrea
>>
>> 2022-09-27 Andrea Corallo <andrea.corallo@arm.com>
>>
>> * toplev.cc (toplev::main): Don't run self tests in case of
>> previous error.
>
> OK
Into trunk as 248c8aeebc4.
Thanks
Andrea
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-10-10 13:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 15:12 [PATCH] Don't ICE running selftests if errors were raised [PR99723] Andrea Corallo
2022-09-29 20:46 ` Jeff Law
2022-10-10 13:23 ` Andrea Corallo
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).