Skip to content
Snippets Groups Projects
Commit 1fd89060 authored by Richard Guenther's avatar Richard Guenther Committed by Richard Biener
Browse files

re PR middle-end/35593 (spurious warning "array subscript is below array...

re PR middle-end/35593 (spurious warning "array subscript is below array bounds" with void* function argument plus -O2)

2008-03-15  Richard Guenther  <rguenther@suse.de>

	PR middle-end/35593
	* tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Make sure
	to not produce negative array indices if not allowed.  Add
	parameter to indicate that.
	(maybe_fold_offset_to_component_ref): Allow negative array
	indices only for the first member of a structure.
	(maybe_fold_offset_to_reference): Allow negative array indices.
	(maybe_fold_stmt_addition): Likewise.

	* g++.dg/warn/Warray-bounds-3.C: New testcase.

From-SVN: r133249
parent 693092fb
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