This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Fix ICE on ACATS test for Aarch64 at -O
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Sep 2016 15:51:45 +0200
- Subject: Re: [patch] Fix ICE on ACATS test for Aarch64 at -O
- Authentication-results: sourceware.org; auth=none
- References: <1566344.Esnov9ALD2@polaris> <73ddb77a-0c10-f73b-25e6-9088acdd139b@redhat.com>
> Is this really safe. If I look at where we call
> expand_shift/expand_shift_1 I get real worried that we could end up
> using that NULL value in a context where it's not expected.
>
> So while emit_store_flag_force knows what to do upon NULL return, I'm
> not sure the other users of expand_shift/expand_shift_1 do.
Yes, that's probably risky, and there are a lot of calls to them.
> Is there any way to address this problem in emit_store_flag_force?
Now that we're in C++, we could add an additional argument to expand_shift_1
with a default value and call the function directly from emit_store_flag with
the non-default value, thus instructing it to return 0 on failure instead of
aborting. emit_store_flag already returns 0 on failure so the result would be
naturally propagated up to emit_store_flag_force.
--
Eric Botcazou