diff options
author | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-04-02 18:39:51 +0800 |
---|---|---|
committer | Xi Ruoyao <xry111@mengyan1223.wang> | 2022-04-02 19:16:03 +0800 |
commit | be07535d0f43390b8906826cc119473dea514b54 (patch) | |
tree | d3f9908464445232c5b4755bca4f25886be91b75 /gcc/testsuite/gdc.test/fail_compilation/retscope2.d | |
parent | 2a82301d409d3aa0e0b3b884e4c6daeaa0486d6b (diff) | |
download | gcc-be07535d0f43390b8906826cc119473dea514b54.zip gcc-be07535d0f43390b8906826cc119473dea514b54.tar.gz gcc-be07535d0f43390b8906826cc119473dea514b54.tar.bz2 |
mips: Fix an ICE caused by r12-7962
DECL_SIZE(x) is NULL if x is a flexible array member, but I forgot to
check it in r12-7962. Then if we increase the size of a struct with
flexible array member (by using aligned attribute), the code will
dereference NULL trying to use the "size" of the flexible array member.
gcc/
* config/mips/mips.cc (mips_function_arg): Check if DECL_SIZE is
NULL before dereferencing it.
gcc/testsuite/
* gcc.target/mips/pr102024-4.c: New test.
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/retscope2.d')
0 files changed, 0 insertions, 0 deletions