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