aboutsummaryrefslogtreecommitdiff
path: root/gcc/read-rtl-function.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-02-17 15:03:25 +0100
committerJakub Jelinek <jakub@redhat.com>2021-02-17 15:03:25 +0100
commit7768cadb4246117964a9ba159740da3b9c20811d (patch)
treea5ef82c8b672c78519d208ad9fe4e17c3d7539e0 /gcc/read-rtl-function.c
parent24bf79f1798ad1d64812709001d2d11cd3e6849f (diff)
downloadgcc-7768cadb4246117964a9ba159740da3b9c20811d.zip
gcc-7768cadb4246117964a9ba159740da3b9c20811d.tar.gz
gcc-7768cadb4246117964a9ba159740da3b9c20811d.tar.bz2
c++: Fix up build_zero_init_1 once more [PR99106]
My earlier build_zero_init_1 patch for flexible array members created an empty CONSTRUCTOR. As the following testcase shows, that doesn't work very well because the middle-end doesn't expect CONSTRUCTOR elements with incomplete type (that the empty CONSTRUCTOR at the end of outer CONSTRUCTOR had). The following patch just doesn't add any CONSTRUCTOR for the flexible array members, it doesn't seem to be needed. 2021-02-17 Jakub Jelinek <jakub@redhat.com> PR sanitizer/99106 * init.c (build_zero_init_1): For flexible array members just return NULL_TREE instead of returning empty CONSTRUCTOR with non-complete ARRAY_TYPE. * g++.dg/ubsan/pr99106.C: New test.
Diffstat (limited to 'gcc/read-rtl-function.c')
0 files changed, 0 insertions, 0 deletions