https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79340
Bug ID: 79340 Summary: [7 Regression] Memory leaks in tree-vect-slp.c Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: alan.hayward at arm dot com Target Milestone: --- Running following test-case in valgrind: $ valgrind --leak-check=yes --trace-children=yes ./xgcc -B. /home/marxin/Programming/gcc/gcc/testsuite/gfortran.dg/forall_7.f90 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions -c ==1942== 48 bytes in 1 blocks are definitely lost in loss record 27 of 756 ==1942== at 0x4C2B0AF: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==1942== by 0x1B3E11F: xrealloc (xmalloc.c:177) ==1942== by 0x9656C4: void va_heap::reserve<tree_node*>(vec<tree_node*, va_heap, vl_embed>*&, unsigned int, bool) (vec.h:288) ==1942== by 0xA05157: vec<tree_node*, va_heap, vl_ptr>::reserve(unsigned int, bool) (vec.h:1445) ==1942== by 0xA05B02: vec<tree_node*, va_heap, vl_ptr>::reserve_exact(unsigned int) (vec.h:1465) ==1942== by 0xA72D32: vec<tree_node*, va_heap, vl_ptr>::create(unsigned int) (vec.h:1480) ==1942== by 0x1286BD8: vect_get_slp_defs(vec<tree_node*, va_heap, vl_ptr>, _slp_tree*, vec<vec<tree_node*, va_heap, vl_ptr>, va_heap, vl_ptr>*, int) (tree-vect-slp.c:3360) ==1942== by 0x126F998: vectorizable_reduction(gimple*, gimple_stmt_iterator*, gimple**, _slp_tree*) (tree-vect-loop.c:6176) ==1942== by 0x1259174: vect_transform_stmt(gimple*, gimple_stmt_iterator*, bool*, _slp_tree*, _slp_instance*) (tree-vect-stmts.c:8700) ==1942== by 0x1287D90: vect_schedule_slp_instance(_slp_tree*, _slp_instance*, unsigned int) (tree-vect-slp.c:3741) ==1942== by 0x12880E8: vect_schedule_slp(vec_info*) (tree-vect-slp.c:3813) ==1942== by 0x1271E92: vect_transform_loop(_loop_vec_info*) (tree-vect-loop.c:7004) Started with r239542.