re PR tree-optimization/91945 (ICE: tree check: expected integer_cst, have var_decl...
authorJakub Jelinek <jakub@redhat.com>
Tue, 5 Nov 2019 10:17:29 +0000 (11:17 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 5 Nov 2019 10:17:29 +0000 (11:17 +0100)
commitf05b372429ba6fa6e2bba0f4145a11e8e4aee5cd
treec10d0f620692a606831b5a38c9ddb69da11443ce
parent81012684569cfb64b0274f117d68740cde52ffdd
re PR tree-optimization/91945 (ICE: tree check: expected integer_cst, have var_decl in get_len, at tree.h:5837 since r274997)

PR tree-optimization/91945
* builtins.c (compute_objsize): For ARRAY_REF, only multiply off
by tpsize if it is both non-NULL and INTEGER_CST, otherwise punt.
Formatting fix.

* gfortran.dg/pr91945.f90: New test.

From-SVN: r277820
gcc/ChangeLog
gcc/builtins.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr91945.f90 [new file with mode: 0644]