[PUSHED] nvptx: Clarify 'nvptx_output_skip' case of no or incomplete initializer
Checks
Commit Message
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(+)
@@ -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