aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.h
diff options
context:
space:
mode:
authorPhilip Herron <herron.philip@googlemail.com>2025-04-17 16:19:35 +0100
committerPhilip Herron <philip.herron@embecosm.com>2025-04-19 12:10:53 +0000
commitad951b9c2696a62fddf2502e3b68352a81264f7c (patch)
tree8ee9a9800038098a8da9f90cb3d9cc33b705d3d3 /gcc/tree.h
parent4d70c16011e809a6732a0c34f1fc23ca75851476 (diff)
downloadgcc-ad951b9c2696a62fddf2502e3b68352a81264f7c.zip
gcc-ad951b9c2696a62fddf2502e3b68352a81264f7c.tar.gz
gcc-ad951b9c2696a62fddf2502e3b68352a81264f7c.tar.bz2
gccrs: prealloc the initilizer vector
There are two cases when initilizing an array, this is the const context which means we need to build the array ctor, which means using lots of memory, its super inefficient because we are using a big wrapper over the GCC internals here but preallocating the vectors here causes a: terminate called after throwing an instance of 'std::bad_alloc' So this is a handy error condition to rely on for this senario. Fixes Rust-GCC#3713 Fixes Rust-GCC#3727 gcc/rust/ChangeLog: * backend/rust-compile-expr.cc (CompileExpr::array_copied_expr): prealloc the vector Signed-off-by: Philip Herron <herron.philip@googlemail.com>
Diffstat (limited to 'gcc/tree.h')
0 files changed, 0 insertions, 0 deletions