]> gcc.gnu.org Git - gcc.git/commit
tree-optimization/109644 - missing IL checking
authorRichard Biener <rguenther@suse.de>
Mon, 24 Apr 2023 11:20:25 +0000 (13:20 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 28 Apr 2023 09:07:54 +0000 (11:07 +0200)
commit6e6f86f22873aab7059e083fd0c9905bd58e5efa
tree53f001276c3a42a3d97bb8fa21445bd90f98e7ad
parent977a43f5ba778b5c5cf9c56ba04ed4fde5d1ae78
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.
gcc/tree-cfg.cc
This page took 0.061271 seconds and 6 git commands to generate.