middle-end/100582 - fix array_at_struct_end_p for vector indexing
authorRichard Biener <rguenther@suse.de>
Mon, 17 May 2021 11:56:14 +0000 (13:56 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 17 May 2021 13:27:32 +0000 (15:27 +0200)
commite0a5daf81f2c79a0275eccd7c1a25349990a7a4d
tree93eb4a844627d64ca4589144a94d9ae784b2d516
parentbdd8e3dd60c4f6080df74fe02b6579451fda6a21
middle-end/100582 - fix array_at_struct_end_p for vector indexing

Vector indexing leaves us with ARRAY_REFs of VIEW_CONVERT_EXPRs,
sth which array_at_struct_end_p considers a array-at-struct-end
even when there's an underlying decl visible.  The following fixes
the latter.

2021-05-17  Richard Biener  <rguenther@suse.de>

PR middle-end/100582
* tree.c (array_at_struct_end_p): Get to the base of the
reference before looking for the underlying decl.

* gcc.target/i386/pr100582.c: New testcase.
gcc/testsuite/gcc.target/i386/pr100582.c [new file with mode: 0644]
gcc/tree.c