Skip to content
Snippets Groups Projects
Commit ba6e17e7 authored by Martin Sebor's avatar Martin Sebor
Browse files

Avoid assuming maximum string length is constant [PR102960].

Resolves:
PR tree-optimization/102960 - ICE: in sign_mask, at wide-int.h:855 in GCC 10.3.0

gcc/ChangeLog:

	PR tree-optimization/102960
	* gimple-fold.c (get_range_strlen): Take bitmap as an argument rather
	than a pointer to it.
	(get_range_strlen_tree): Same.  Remove bitmap allocation.  Use
	an auto_bitmap.
	(get_maxval_strlen): Use an auto_bitmap.
	* tree-ssa-strlen.c (get_range_strlen_dynamic): Factor out PHI
	handling...
	(get_range_strlen_phi): ...into this function.
	Avoid assuming maximum string length is constant
	(printf_strlen_execute): Dump pointer query cache contents when
	details are requisted.

gcc/testsuite/ChangeLog:

	PR tree-optimization/102960
	* gcc.dg/Wstringop-overflow-84.c: New test.
parent 0002a8a1
No related branches found
No related tags found
Loading
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