I was getting confused about 'nvptx_output_skip' in certain cases not doing anything at all; write down and 'assert' what I found.
gcc/ * config/nvptx/nvptx.cc (nvptx_output_skip): Clarify case of no or incomplete initializer. --- gcc/config/nvptx/nvptx.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/config/nvptx/nvptx.cc b/gcc/config/nvptx/nvptx.cc index 060f45318f4..6f364619205 100644 --- a/gcc/config/nvptx/nvptx.cc +++ b/gcc/config/nvptx/nvptx.cc @@ -2391,6 +2391,12 @@ nvptx_output_skip (FILE *, unsigned HOST_WIDE_INT size) if (size) nvptx_assemble_value (0, size); } + else + /* Otherwise, we don't have to do anything: this skip terminates the + initializer; we skip either the full ('!init_frag.started' case) or the + remainder ('init_frag.started' case) of the initializer (that is, either + no or incomplete initializer). */ + gcc_checking_assert (size == init_frag.remaining * init_frag.size); } /* Output a string STR with length SIZE. As in nvptx_output_skip we -- 2.34.1