diff options
author | Jakub Jelinek <jakub@redhat.com> | 2025-01-02 12:29:31 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2025-01-02 12:29:31 +0100 |
commit | cb403df46fc9275530669925faac5c256fdd2596 (patch) | |
tree | 6e8459bd05c8e16789c73439d53f57a738316585 /gcc/fortran/frontend-passes.cc | |
parent | 29bc14c750acb66dd930627c4de0f98cd032088d (diff) | |
download | gcc-cb403df46fc9275530669925faac5c256fdd2596.zip gcc-cb403df46fc9275530669925faac5c256fdd2596.tar.gz gcc-cb403df46fc9275530669925faac5c256fdd2596.tar.bz2 |
forwprop: Handle RAW_DATA_CST in check_ctz_array
In order to stress test RAW_DATA_CST handling, I've tested trunk gcc with
r15-6339 reapplied and a hack where I've changed
const unsigned int raw_data_min_len = 128;
to
const unsigned int raw_data_min_len = 2;
in cp_lexer_new_main and 64 to 4 several times in c_parser_initval
and c_maybe_optimize_large_byte_initializer, so that RAW_DATA_CST doesn't
trigger just on very large initializers, but even quite small ones.
One of the regressions (will work on the others next) was that pr90838.c
testcase regressed, check_ctz_array needs to handle RAW_DATA_CST, otherwise
on larger initializers or if those come from #embed just won't trigger.
The new testcase shows when it doesn't trigger anymore (regression from 14).
The patch just handles RAW_DATA_CST in the CONSTRUCTOR_ELTS the same as is
it was a series of INTEGER_CSTs.
2025-01-02 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-forwprop.cc (check_ctz_array): Handle also RAW_DATA_CST
in the CONSTRUCTOR_ELTS.
* gcc.dg/pr90838-2.c: New test.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
0 files changed, 0 insertions, 0 deletions