This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gomp4.1] Start of structure element mapping support
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Julian Brown <julian at codesourcery dot com>
- Date: Wed, 16 Oct 2019 18:52:55 +0200
- Subject: Re: [gomp4.1] Start of structure element mapping support
- References: <20150731161610.GF1780@tucnak.redhat.com> <87wod4x1sj.fsf@euler.schwinge.homeip.net>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 16, 2019 at 03:22:52PM +0200, Thomas Schwinge wrote:
> Stumbled over this while reviewing Julian's "Factor out duplicate code in
> gimplify_scan_omp_clauses":
> ..., which here gets writte to...
>
> > + if (base != decl)
> > + break;
> > + gcc_assert (offset == NULL_TREE
> > + || TREE_CODE (offset) == INTEGER_CST);
>
> ..., but here we again check 'offset', not 'offset2'...
Yes, it indeed should be offset2 == NULL_TREE and
TREE_CODE (offset2) == INTEGER_CST, thanks for catching that.
> Should the second highlighted 'gcc_assert' be changed as follows,
> suitably adapted for current GCC trunk, of course? (Not yet tested.) If
> approving such a patch, please respond with "Reviewed-by: NAME <EMAIL>"
> so that your effort will be recorded in the commit log, see
> <https://gcc.gnu.org/wiki/Reviewed-by>.
>
> - gcc_assert (offset == NULL_TREE
> - || TREE_CODE (offset) == INTEGER_CST);
> + gcc_assert (offset2 == NULL_TREE
> + || TREE_CODE (offset2) == INTEGER_CST);
Preapproved for trunk if it passes bootstrap/regtest.
Jakub