1
0
Fork 0
mirror of https://gcc.gnu.org/git/gcc.git synced 2026-12-03 16:45:09 +00:00
No description
  • C++ 30.8%
  • C 30.5%
  • Ada 14%
  • D 5.9%
  • Go 5.5%
  • Other 12.8%
Find a file
David Malcolm dca6c8e4ea analyzer: use cluster_region in more places
Strengthen various types to use cluster_region rather than just region,
including symbolic::memory_offset, symbolic::memory_range, and
symbolic::pointer, capturing this invariant in the type system, rather
than just with assertions and naming conventions.

This is a type-safety improvement that mostly doesn't affect the
behavior of the analyzer, but strengthening the types revealed a place in
call_summary_replay::convert_svalue_from_summary_1 where it was possible
for the invariant about a symbolic::pointer's region being a
cluster_region to be violated.  Fix this latent bug by rejecting such
cases, rather than violating the invariant.

gcc/analyzer/ChangeLog:
	* call-summary.cc
	(call_summary_replay::convert_svalue_from_summary_1): Reject
	summaries in which the region for the caller's cluster region
	is not itself a cluster region.
	(convert_bit_contents_from_summary): Update for field renaming.
	* infinite-recursion.cc (remap_enclosing_frame): Strengthen
	"base_reg" param from region to a cluster region, renaming to
	"cluster_reg".  Strengthen return type from region to
	cluster_region.
	(sufficiently_different_region_binding_p): Strengthen "base_reg"
	param from region to a cluster region, renaming to "cluster_reg".
	Likewise for local "equiv_prev_base_reg".
	(sufficiently_different_p): Likewise for local "base_reg".
	* program-state.cc (get_any_inherited_state_of_bit_vector): Update
	for field renaming.
	* region-model.cc
	(region_model::get_bit_contents): Strengthen "base_reg" param from
	region to a cluster region, renaming to "cluster_reg".
	(region_model::get_representative_path_var_1): Likewise for local.
	(selftest::test_maybe_get_region_for_mem_range): Update for
	symbolic::memory_range requiring a cluster_region.
	* region-model.h (region_model::get_bit_contents): Strengthen
	"base_reg" param from region to a cluster region, renaming to
	"cluster_reg".
	* region.cc (region::calc_memory_offset): Likewise for local
	"base_region".  Use get_cluster_region rather than
	get_base_region.  Update default case to get iter_region as a
	cluster_region, adding an assertion that this is the case.
	(region::calc_pointer): Likewise.
	* store.cc (binding_cluster::get_representative_path_vars):
	Strengthen param "const region *base_reg" to
	"const cluster_region &cluster_reg".
	(store::get_bits): Update for memory_range::get_cluster_region
	being a cluster_region, rather than just a region, dropping
	redundant lookup and assertion.
	(store::get_bit_contents): Strengthen "base_reg" param from region
	to cluster_region, renaming to "cluster_reg", dropping redundant
	lookup and assertion.
	(store::set_bits): Strengthen type of "lhs_base_reg" from region to
	cluster_region.
	(store::get_baseline_contents): Strengthen "base_reg" param from
	region to cluster_region, renaming to "cluster_reg".
	(store::get_implicit_contents): Likewise.
	(store::bits_live_p): Likewise for local.
	(store::get_representative_path_vars): Likewise.
	(store::replay_call_summary): Likewise for keys, converting from
	an auto_vec to a symbolic::node_set.
	(store::replay_call_summary_cluster): Likewise for param.  Replace
	as_a with static_cast to avoid needing is_a_helper.  Update for
	field renaming.
	* store.h (binding_cluster::get_representative_path_vars):
	Likewise for param.
	(store::get_bit_contents): Likewise.
	(store::replay_call_summary_cluster): Likewise.
	(store::get_baseline_contents): Likewise.
	(store::get_implicit_contents): Likewise.
	* svalue.h (pointer_svalue::get_base_region): Mark as deprecated.
	Strengthen return type from region to cluster_region, and use
	symbolic::pointer::get_cluster_region.
	(pointer_svalue::get_cluster_region): New.
	* symbolic-bit-contents.cc (baseline_key::operator<): Update for
	field renaming.
	(uninit_contents::get_representative_path_vars): Strengthen param
	from const region * to const cluster_region &.
	(untracked_bit_contents::get_representative_path_vars): Likewise.
	(zero_contents::get_representative_path_vars): Likewise.
	(unfoldable_bit_contents::get_representative_path_vars): Likewise.
	(baseline_bit_contents::baseline_bit_contents): Update for field
	renaming.
	(baseline_bit_contents::add_dump_widget_children): Likewise.
	(baseline_bit_contents::accept_node_visitor): Likewise.
	(baseline_bit_contents::poison_any_pointers_to_descendents):
	Likewise.
	(concrete_bit_overlay::get_representative_path_vars): Strengthen
	param from const region * to const cluster_region &.
	(should_poison_sym_ptr_p): Rename "base_" to "cluster_".
	(symbolic_bit_overlay::get_representative_path_vars): Strengthen
	param from const region * to const cluster_region &.
	(offset_bit_contents::get_representative_path_vars): Likewise.
	(baseline_key::region_has_meaningful_size_p): Update for field
	renaming.
	(baseline_key::to_json): Likewise.
	(bit_contents_manager::make_baseline_contents): Likewise.
	(bit_contents_manager::get_baseline_contents): Strengthen
	"base_reg" param from region to a cluster region, renaming to
	"cluster_reg".
	* symbolic-bit-contents.h
	(bit_contents::get_representative_path_vars): Strengthen param
	from const region * to const cluster_region &.
	(uninit_contents::get_representative_path_vars): Likewise.
	(untracked_bit_contents::get_representative_path_vars): Likewise.
	(zero_contents::get_representative_path_vars): Likewise.
	(unfoldable_bit_contents::get_representative_path_vars): Likewise.
	(concrete_bit_overlay::get_representative_path_vars): Likewise.
	(symbolic_bit_overlay::get_representative_path_vars): Likewise.
	(offset_bit_contents::get_representative_path_vars): Likewise.
	(bit_contents_manager::get_baseline_contents): Strengthen
	"base_reg" param from region to a cluster region, renaming to
	"cluster_reg".
	* symbolic-bit-vectors.cc
	(bit_vector_manager::make_baseline_bit_vector): Update for field
	renaming.
	(bit_vector_manager::get_baseline_bit_vector): Strengthen
	"base_reg" param from region to a cluster region, renaming to
	"cluster_reg".
	* symbolic-bit-vectors.h
	(bit_vector_manager::get_baseline_bit_vector): Likewise for decl.
	* symbolic-memory-offsets.h: Update "base_region" to
	"cluster_region" terminology throughout.
	(memory_offset::memory_offset): Strengthen "base_reg" param from
	region to a cluster region, renaming to "cluster_reg".  Update
	for field renaming.
	(memory_offset::operator==): Update for field renaming.
	(memory_offset::get_base_region): Mark as deprecated.  Strengthen
	return type from region to cluster_region and update for field
	renaming.
	(memory_offset::get_cluster_region): New.
	(memory_offset::m_base_reg): Rename to...
	(memory_offset::m_cluster_reg): ...this and strengthen type from
	region to cluster_region.
	* symbolic-memory-ranges.cc: Update "base_region" to
	"cluster_region" terminology throughout.
	(memory_range::memory_range): Update for field renaming and
	prefer get_cluster_region to get_base_region.
	(memory_range::make_dump_widget): Update for field renaming.
	(memory_range::to_json): Likewise.
	* symbolic-memory-ranges.h: Update "base_region" to
	"cluster_region" terminology throughout.
	(memory_range::memory_range): Strengthen "base_reg" param from
	region to a cluster region, renaming to "cluster_reg".  Update for
	field renaming.
	(memory_range::operator==): Update for field renaming.
	(memory_range::get_base_region): Mark as deprecated.  Strengthen
	return type from region to cluster_region and update for field
	renaming.
	(memory_range::get_cluster_region): New.
	(memory_range::m_base_reg): Rename to...
	(memory_range::m_cluster_reg): ...this and strengthen type from
	region to cluster_region.
	* symbolic-nodes.h: Update "base_region" to "cluster_region"
	terminology throughout.
	(baseline_key::m_base_reg): Rename to...
	(baseline_key::m_cluster_reg): ...this and strengthen type from
	region to cluster_region.
	* symbolic-pointers.cc: Update "base_region" to "cluster_region"
	terminology throughout.
	(pointer::make_dump_widget): Update for field renaming.
	(pointer::accept_node_visitor): Likewise.
	(pointer::to_json): Likewise.
	(pointer::cmp): Likewise.
	(pointer::non_null_p): Likewise.
	(pointer::eval_condition): Prefer get_cluster_region to
	get_base_region.
	* symbolic-pointers.h: Update "base_region" to "cluster_region"
	terminology throughout.
	(pointer::pointer): Strengthen "base_reg" param from region to a
	cluster region, renaming to "cluster_reg".  Update for field
	renaming.
	(pointer::operator==): Update for field renaming.
	(pointer::get_base_region): Mark as deprecated.  Strengthen return
	type from region to cluster_region and update for field renaming.
	(pointer::get_cluster_region): New.
	(pointer::m_base_reg): Rename to...
	(pointer::m_cluster_reg): ...this and strengthen type from region
	to cluster_region.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
2026-12-03 11:12:35 -05:00
.forgejo forge: Add a prototype CODEOWNERS file 2026-06-05 17:58:58 +01:00
.github Mention the forge on unofficial mirrors 2026-07-24 07:43:47 +00:00
c++tools Daily bump. 2026-10-21 00:16:50 +00:00
config Daily bump. 2026-11-13 00:16:50 +00:00
contrib Daily bump. 2026-11-30 00:16:38 +00:00
fixincludes Daily bump. 2026-10-18 00:16:37 +00:00
gcc analyzer: use cluster_region in more places 2026-12-03 11:12:35 -05:00
gnattools Daily bump. 2026-11-18 00:16:56 +00:00
gotools Daily bump. 2026-11-11 00:16:53 +00:00
include Daily bump. 2026-11-26 00:16:45 +00:00
INSTALL
libada Daily bump. 2026-11-10 00:16:44 +00:00
libatomic Daily bump. 2026-11-11 00:16:53 +00:00
libbacktrace Daily bump. 2026-12-01 00:16:50 +00:00
libcc1 Daily bump. 2026-11-11 00:16:53 +00:00
libcody Daily bump. 2026-05-31 00:16:35 +00:00
libcpp Daily bump. 2026-11-27 00:16:47 +00:00
libdecnumber Daily bump. 2026-10-11 00:16:32 +00:00
libffi Daily bump. 2026-10-17 00:16:56 +00:00
libga68 Daily bump. 2026-12-02 00:17:30 +00:00
libgcc [PATCH v2] libgcc: Truncate shift count in double-word shift routines [PR127556] 2026-12-02 21:33:31 -07:00
libgcobol Daily bump. 2026-12-03 00:16:46 +00:00
libgfortran From: Jerry DeLisle <jvdelisle@gcc.gnu.org> 2026-12-02 19:31:03 -05:00
libgm2 Daily bump. 2026-12-02 00:17:30 +00:00
libgo Bump libgo SONAME 2026-12-02 07:49:55 +01:00
libgomp Daily bump. 2026-12-03 00:16:46 +00:00
libgrust Daily bump. 2026-11-11 00:16:53 +00:00
libiberty Daily bump. 2026-11-13 00:16:50 +00:00
libitm Daily bump. 2026-11-11 00:16:53 +00:00
libobjc Daily bump. 2026-11-03 00:16:43 +00:00
libphobos libphobos: Bump soname to version 8 2026-12-03 16:02:09 +01:00
libquadmath Daily bump. 2026-11-11 00:16:53 +00:00
libsanitizer Daily bump. 2026-11-11 00:16:53 +00:00
libssp Daily bump. 2026-11-11 00:16:53 +00:00
libstdc++-v3 libstdc++: cxxabi.h: Remove guards around _GLIBCXX_CDTOR_CALLABI 2026-12-03 15:35:59 +00:00
libvtv Daily bump. 2026-11-11 00:16:53 +00:00
lto-plugin Daily bump. 2026-12-02 00:17:30 +00:00
maintainer-scripts Daily bump. 2026-10-26 00:16:34 +00:00
zlib Daily bump. 2026-10-28 00:16:51 +00:00
.b4-config Add config file so b4 uses inbox.sourceware.org automatically 2024-07-28 11:13:16 +01:00
.dir-locals.el dir-locals: apply our C settings in C++ also 2024-07-31 20:38:27 +02:00
.editorconfig editorconfig: Add rules for yaml/yml files. 2026-07-07 11:02:11 +01:00
.gitattributes
.gitignore Add a pyproject.toml file 2026-08-19 10:51:25 +00:00
ABOUT-NLS
ar-lib
ChangeLog Daily bump. 2026-11-26 00:16:45 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
compile
config-ml.in toplevel: Unbreak Ada build [PR123490] 2026-01-10 11:36:25 +01:00
config.guess
config.rpath config: Update config.rpath from gnulib 2026-10-07 15:12:26 +02:00
config.sub
configure pass ADAC for sub configures 2026-11-12 01:16:57 -03:00
configure.ac Cygwin: enable libgccjit not just for MinGW 2026-10-20 16:54:36 +00:00
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
depcomp
install-sh
libtool-ldflags
libtool.m4 build: Cherry-pick libtool.m4 support for GNU ld *_sol2 emulations 2025-12-29 12:09:35 +01:00
ltgcc.m4
ltmain.sh ltmain.sh: allow more flags at link-time 2024-09-25 19:05:24 +01:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
MAINTAINERS MAINTAINERS: Add myself to write after approval 2026-11-25 15:05:01 +08:00
MAINTAINERS.yml MAINTAINERS: Add myself to write after approval 2026-11-25 15:05:01 +08:00
Makefile.def build: let configure-gcc start once gmp is configured 2026-10-21 11:02:19 +02:00
Makefile.in Pass target sysroot flags to bootstrap compiler 2026-11-17 19:45:30 +01:00
Makefile.tpl Pass target sysroot flags to bootstrap compiler 2026-11-17 19:45:30 +01:00
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
pyproject.toml Add a pyproject.toml file 2026-08-19 10:51:25 +00:00
README
SECURITY.txt a68: top-level misc files 2025-11-30 01:52:24 +01:00
symlink-tree bugzilla: remove gcc-bugs@ mailing list address 2026-01-09 11:10:38 +01:00
test-driver
ylwrap

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.