On Mon, Nov 04, 2013 at 01:29:10PM +0100, Richard Biener wrote: > On Wed, Oct 30, 2013 at 8:17 PM, Toon Moene <t...@moene.org> wrote: > > Consider this: > > > > http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg02329.html > > > > and > > > > http://gcc.gnu.org/ml/gcc-testresults/2013-10/msg02258.html > > > > /scratch/toon/bd5894/./prev-gcc/xg++ -B/scratch/toon/bd5894/./prev-gcc/ > > -B/home/toon/compilers/install/x86_64-unknown-linux-gnu/bin/ -nostdinc++ > > -B/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs > > -B/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs > > -I/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include/x86_64-unknown-linux-gnu > > -I/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/include > > -I/home/toon/compilers/gcc/libstdc++-v3/libsupc++ > > -L/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs > > -L/scratch/toon/bd5894/prev-x86_64-unknown-linux-gnu/libstdc++-v3/libsupc++/.libs > > -g -O2 -flto=jobserver -frandom-seed=1 -DIN_GCC -fno-exceptions -fno-rtti > > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > > -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long > > -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common > > -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -o cc1plus \ > > cp/cp-lang.o c-family/stub-objc.o cp/call.o cp/decl.o > > cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o > > cp/parser.o cp/ptree.o cp/rtti.o cp/typeck.o cp/cvt.o cp/except.o > > cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o > > cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-objcp-common.o > > cp/name-lookup.o cp/cxx-pretty-print.o cp/cp-gimplify.o > > cp/cp-array-notation.o cp/lambda.o cp/vtable-class-hierarchy.o attribs.o > > incpath.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o > > c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o > > c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o > > c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o > > c-family/array-notation-common.o c-family/c-ubsan.o i386-c.o glibc-c.o > > cc1plus-checksum.o libbackend.a main.o tree-browser.o libcommon-target.a > > libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a > > ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a > > ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -lcloog-isl -lisl > > -lmpc -lmpfr -lgmp -rdynamic -ldl -L../zlib -lz > > In function 'release', > > inlined from '_ZN7va_heap7reserveIbEEvRP3vecIT_S_8vl_embedEjb.part.95' > > at /home/toon/compilers/gcc/gcc/vec.h:288:7, > > inlined from 'reserve', > > inlined from '_ZN3vecIb7va_heap6vl_ptrE7reserveEjb.part.96' at > > /home/toon/compilers/gcc/gcc/vec.h:1367:3, > > inlined from 'reserve.constprop', > > inlined from 'reserve_exact' at > > /home/toon/compilers/gcc/gcc/vec.h:1387:45, > > inlined from 'safe_grow' at /home/toon/compilers/gcc/gcc/vec.h:1515:3, > > inlined from 'safe_grow_cleared' at > > /home/toon/compilers/gcc/gcc/vec.h:1529:3, > > inlined from 'vect_bb_vectorization_profitable_p' at > > /home/toon/compilers/gcc/gcc/tree-vect-slp.c:2027:0, > > inlined from 'vect_slp_analyze_bb_1' at > > /home/toon/compilers/gcc/gcc/tree-vect-slp.c:2174:55, > > inlined from 'vect_slp_analyze_bb' at > > /home/toon/compilers/gcc/gcc/tree-vect-slp.c:2229:44: > > /home/toon/compilers/gcc/gcc/vec.h:316:3: error: attempt to free a non-heap > > object 'life' [-Werror=free-nonheap-object] > > ::free (v); > > ^ > > lto1: all warnings being treated as errors > > Obviously fallout of the stack-vector rewrite.
yeah :/ > stack_vec<bool, 20> life; > life.safe_grow_cleared (SLP_INSTANCE_GROUP_SIZE (instance)); > > doesn't make much sense anyway ... why is the initial size only > allowed as a template parameter? But then safe_grow shouldn't free > the stack storage. Well, I suppose we could add a constructor that takes a number of elements and if that is greater than the template arg calls malloc, but the way stack vectors work you're going to use N * sizeof(T) space on the stack anyway so its not entirely clear you want to use a stack vector there at all. I think its actually complaining about trying to free NUL, see this part of vec::reserve bool handle_auto_vec = m_vec && using_auto_storage (); if (handle_auto_vec) { m_vec = NULL; oldsize = oldvec->length (); nelems += oldsize; } accept that va_heap::release bails out if v == NULL. I'll try and look into this more today. Trev va_heap::reserve (m_vec, nelems, exact PASS_MEM_STAT); > > Richard. > > > -- > > Toon Moene - e-mail: t...@moene.org - phone: +31 346 214290 > > Saturnushof 14, 3738 XG Maartensdijk, The Netherlands > > At home: http://moene.org/~toon/; weather: http://moene.org/~hirlam/ > > Progress of GNU Fortran: http://gcc.gnu.org/wiki/GFortran#news