c: harmonize handling of arrays

This code harmonizes the handling of arrays in C by consistently
using build_index_type instead of build_range_type when creating
arrays and using top_array_vla_p to detect top-level VLAs.

gcc/c-family/ChangeLog:
	* c-common.cc (complete_array_type): Use build_index_type.
	* c-ubsan.cc (ubsan_instrument_bounds_pointer_address): Likewise.

gcc/c/ChangeLog:
	* c-decl.cc (grokdeclarator): Likewise.
	* c-typeck.cc (c_verify_type,c_build_array_type,
	c_expr_countof_expr,comptypes_internal): Use top_array_vla_p.
	(top_array_vla_p): Rename to use _p convention and simplify.
4 files changed