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

tree-optimization/109644 - missing IL checking

We fail to verify the constraints under which we allow handled
components to wrap registers.  The gcc.dg/pr70022.c testcase shows
that we happily end up with

  _2 = VIEW_CONVERT_EXPR<int[4]>(v_1(D))

as produced by SSA rewrite and update_address_taken.  But the intent
was that we wrap registers with at most a single level of handled
components and specifically only allow __real, __imag, BIT_FIELD_REF
and VIEW_CONVERT_EXPR on them, but not ARRAY_REF or COMPONENT_REF.

The following makes IL verification stricter which catches the
problem.

	PR tree-optimization/109644
	* tree-cfg.cc (verify_types_in_gimple_reference): Check
	register constraints on the outermost VIEW_CONVERT_EXPR
	only.  Do not allow register or invariant bases on
	multi-level or possibly variable index handled components.
parent 977a43f5
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