tree-ssa: Fix ICE in build_vector_type [PR93780]
authorJakub Jelinek <jakub@redhat.com>
Tue, 18 Feb 2020 08:07:15 +0000 (09:07 +0100)
committerJakub Jelinek <jakub@redhat.com>
Tue, 18 Feb 2020 08:07:15 +0000 (09:07 +0100)
commitbe7c145ad52e76a1a0fd201dd96bc92e8d3a275d
treeedec944e8cb9d15dd407c013024f9b288054e1a7
parent8def1d525c52f0f7fccd90f3c4624a8fe6c42882
tree-ssa: Fix ICE in build_vector_type [PR93780]

The following testcase ICEs, because execute_update_addresses_taken attempts
to create a VECTOR_TYPE with non-power of 2 number of elts.
Fixed by guarding it with the corresponding predicate.

2020-02-18  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/93780
* tree-ssa.c (non_rewritable_lvalue_p): Check valid_vector_subparts_p
before calling build_vector_type.
(execute_update_addresses_taken): Likewise.

* gcc.dg/pr93780.c: New test.
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr93780.c [new file with mode: 0644]
gcc/tree-ssa.c