Skip to content
Snippets Groups Projects
Commit 2ac7b19f authored by David Malcolm's avatar David Malcolm
Browse files

analyzer: handle more casts of string literals [PR98797]


gcc/analyzer/ChangeLog:
	PR analyzer/98797
	* region-model-manager.cc
	(region_model_manager::maybe_fold_sub_svalue): Generalize getting
	individual chars of a STRING_CST from element_region to any
	subregion which is a concrete access of a single byte from its
	parent region.
	* region.cc (region::get_relative_concrete_byte_range): New.
	* region.h (region::get_relative_concrete_byte_range): New decl.

gcc/testsuite/ChangeLog:
	PR analyzer/98797
	* gcc.dg/analyzer/casts-1.c: Mark xfails as fixed; add further
	test coverage for casts of string literals.

Signed-off-by: default avatarDavid Malcolm <dmalcolm@redhat.com>
parent b32305b4
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment