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

tree-optimization/99947 - avoid v.safe_push (v[0])

This avoids (again) the C++ pitfall of pushing a reference to
sth being reallocated.

2021-04-07  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/99947
	* tree-vect-loop.c (vectorizable_induction): Pre-allocate
	steps vector to avoid pushing elements from the reallocated
	vector.

	* gcc.dg/torture/pr99947.c: New testcase.
parent 6eaf7ac6
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