Skip to content
Snippets Groups Projects
Commit 831e688a authored by Richard Biener's avatar Richard Biener Committed by Richard Biener
Browse files

fold-const.h (get_array_ctor_element_at_index): Adjust.

2019-07-12  Richard Biener  <rguenther@suse.de>

	* fold-const.h (get_array_ctor_element_at_index): Adjust.
	* fold-const.c (get_array_ctor_element_at_index): Add
	ctor_idx output parameter informing the caller where in
	the constructor the element was (not) found.  Add early exit
	for when the ctor is sorted.
	* gimple-fold.c (fold_array_ctor_reference): Support constant
	folding across multiple array elements.

	* gcc.dg/tree-ssa/vector-7.c: New testcase.

From-SVN: r273435
parent e067f992
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