[Bug tree-optimization/27659] New: ICE on autovect-branch
with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. I tried to separate covar2corrcoef but that doesn't ICE. This does not ICE on trunk, rev. 113884 -- Summary: ICE on autovect-branch Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27659
[Bug tree-optimization/27659] ICE on autovect-branch
--- Comment #1 from gcc at pdoerfler dot com 2006-05-18 14:56 --- Created an attachment (id=11485) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11485&action=view) gziped preprocessed source that produces the ICE gziped because it's too large. Sorry, don't know how to reduce this. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27659
[Bug tree-optimization/27659] ICE on autovect-branch
--- Comment #2 from gcc at pdoerfler dot com 2006-05-22 09:27 --- I figured out the reduction. Here is a much smaller testcase: = extern int rows_; extern int cols_; template class secondOrderStatistics { public: void covar2corrcoef(U** &cv) const { U* k=*cv; for (int row=0; row; = /usr/local/vect/libexec/gcc/i686-pc-linux-gnu/4.2.0-autovect/cc1plus -fpreprocessed reduced2.ii -quiet -march=pentium-m -ansi -O3 -version -ftree-vectorize -o reduced2.s GNU C++ version 4.2.0-autovect 20060518 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.2.0-autovect 20060518 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: ce12e1a5e2bda479d797d2bc5f9a8466 reduced2.ii: In member function void secondOrderStatistics::covar2corrcoef(U**&) const [with U = float]: reduced2.ii:7: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. gdb says: Program received signal SIGSEGV, Segmentation fault. remove_all_phi_uses (var=0x4022da28) at tree-if-conv.c:180 180 if (TREE_CODE (usestmt) == PHI_NODE) (gdb) print usestmt $1 = 0x0 (gdb) bt #0 remove_all_phi_uses (var=0x4022da28) at tree-if-conv.c:180 #1 0x0857fe48 in remove_all_phi_uses (var=0x4022f64c) at tree-if-conv.c:184 #2 0x0857fe48 in remove_all_phi_uses (var=0x4022da28) at tree-if-conv.c:184 #3 0x0857fe48 in remove_all_phi_uses (var=0x4022d9c0) at tree-if-conv.c:184 #4 0x0857fe48 in remove_all_phi_uses (var=0x4022db60) at tree-if-conv.c:184 #5 0x0857ff97 in remove_store (bsi=0xbfd512dc) at tree-if-conv.c:206 #6 0x08582763 in main_tree_if_conversion () at tree-if-conv.c:248 #7 0x084dad64 in execute_one_pass (pass=0x86f0900) at passes.c:874 #8 0x084daea7 in execute_pass_list (pass=0x86f0900) at passes.c:906 #9 0x084daeba in execute_pass_list (pass=0x86edca0) at passes.c:907 #10 0x084daeba in execute_pass_list (pass=0x86ed660) at passes.c:907 #11 0x081bacc6 in tree_rest_of_compilation (fndecl=0x40223c80) at tree-optimize.c:419 #12 0x081294fd in expand_body (fn=0x40223c80) at semantics.c:3005 #13 0x08526f12 in cgraph_expand_function (node=0x402270d0) at cgraphunit.c:1055 #14 0x08529395 in cgraph_optimize () at cgraphunit.c:1121 #15 0x080d2bf5 in cp_finish_file () at decl2.c:3115 #16 0x0818d79f in c_common_parse_file (set_yydebug=0) at c-opts.c:1136 #17 0x084a90e0 in toplev_main (argc=11, argv=0xbfd515b4) at toplev.c:990 #18 0x0819ae6f in main (argc=Cannot access memory at address 0x0 ) at main.c:35 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27659
[Bug tree-optimization/27742] New: ICE with -ftree-vectorizer-verbose
/usr/local/4.2/bin/g++4.2.0 -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-svn/configure --enable-languages=c,c++ --prefix=/usr/local/4.2 --program-suffix=4.2.0 Thread model: posix gcc version 4.2.0 20060523 (experimental) Revision: 114016 /usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1plus -quiet -v -I/home/doerfler/ltilib-2/42/linux -I../src/basics -I../src/types -I../src/math -I../src/imgProc -I../src/ioBasics -I../src/io -I../src/draw -I../src/viewer -I../src/system -I../src/classifiers -Iworkbench -I../tester -I/usr/include/cairo -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include/libpng12 -I/opt/gnome/include/gtk-2.0 -I/opt/gnome/lib/gtk-2.0/include -I/opt/gnome/include/atk-1.0 -I/opt/gnome/include/pango-1.0 -I/opt/gnome/include/glib-2.0 -I/opt/gnome/lib/glib-2.0/include -D_GNU_SOURCE -D_REENTRANT -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -D_REENTRANT -DNDEBUG -D_USE_FIRE_WIRE_DCAM ../src/imgProc/ltiLocalColorDescriptorExtractor.cpp -quiet -dumpbase ltiLocalColorDescriptorExtractor.cpp -march=pentium-m -msse -msse2 -ansi -auxbase-strip ../obj/release/ltiLocalColorDescriptorExtractor.o -O3 -Wundef -Wwrite-strings -Wall -ansi -version -ftree-vectorize -ftree-vectorizer-verbose=5 -fpic -o /tmp/ccrEtWY9.s ... ../src/imgProc/ltiGridSampling_template.h:227: note: vectorized 0 loops in function. ../src/imgProc/ltiSliceSampling_template.h: In function void __tcf_15(void*): ../src/imgProc/ltiSliceSampling_template.h:82: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. Unfortunately, if I use -save-temps the ICE does not occur. It also goes away without -ftree-vectorizer-verbose Here is what gdb tells me: Program received signal SIGSEGV, Segmentation fault. 0x40099d9b in strlen () from /lib/tls/libc.so.6 (gdb) bt #0 0x40099d9b in strlen () from /lib/tls/libc.so.6 #1 0x4006e3d8 in vfprintf () from /lib/tls/libc.so.6 #2 0x08694581 in __FUNCTION__.28397 () #3 0x0001 in ?? () #4 0x4072a1b8 in ?? () #5 0x in ?? () #6 0x4060a898 in ?? () #7 0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x0) at gt-cp-tree.h:89 #8 0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x40494b2c) at gt-cp-tree.h:89 #9 0x in ?? () #10 0x0002 in ?? () #11 0x in ?? () #12 0x in ?? () #13 0x0813df36 in gt_ggc_mx_lang_tree_node (x_p=0x8694582) at gt-cp-tree.h:89 #14 0x in ?? () (gdb) cont Continuing. ../src/imgProc/ltiSliceSampling_template.h: In function void __tcf_15(void*): ../src/imgProc/ltiSliceSampling_template.h:82: internal compiler error: Segmentation fault The source this happens on is a large library (ltilib-2). Here's a snippet - template bool sliceSampling::apply(Acc& acc, const matrix& img, const location& loc, dvector& destv) { const parameters& par = getParameters(); // interpolation static const bilinearInterpolation bilin; //create accumulators static std::vector accuVec; - the last line is the one reported as causing the ICE. Acc is a template struct with a few member functions and a C array. When compiled without -ftree-vectorizer-verbose __tcf_15 looks like this: -- .align 2 .p2align 4,,15 .type __tcf_15, @function __tcf_15: .LFB3101: pushl %ebp .LCFI428: movl%esp, %ebp .LCFI429: pushl %ebx .LCFI430: call__i686.get_pc_thunk.bx addl$_GLOBAL_OFFSET_TABLE_, %ebx subl$4, %esp .LCFI431: movl [EMAIL PROTECTED](%ebx) , %eax movl(%eax), %eax testl %eax, %eax je .L1085 movl%eax, (%esp) call[EMAIL PROTECTED] .L1085: popl%eax popl%ebx popl%ebp ret .LFE3101: .size __tcf_15, .-__tcf_15 I can post instructions for downloading and reproduction of the ICE if this is desired. I can also perform further analysis if somebody can give instructions what else I can do. -- Summary: ICE with -ftree-vectorizer-verbose Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27742
[Bug tree-optimization/27742] ICE with -ftree-vectorizer-verbose
--- Comment #2 from gcc at pdoerfler dot com 2006-05-23 15:38 --- Created an attachment (id=11501) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11501&action=view) gzipped prepocessed source code Please note again that the preprocessed source code does *not* trigger the ICE. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27742
[Bug tree-optimization/27753] New: ICE in make_ssa_name on autovect-branch
/usr/local/vect/bin/g++ -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-vect/configure --enable-languages=c,c++ --prefix=/usr/local/vect Thread model: posix gcc version 4.2.0-autovect 20060518 (experimental) Reduced testcase below ICEs: /usr/local/vect/bin/g++ -O3 -ftree-vectorize -march=pentium-m -c vecreduced.cpp vecreduced.cpp: In member function vector& vector::add(T) [with T = ppoint]: vecreduced.cpp:14: internal compiler error: in make_ssa_name, at tree-ssanames.c:129 template struct ppoint { int x, y; inline ppoint& operator+=(const ppoint& p) { x+=p.x; y+=p.y; return *this; } }; template class vector { public: vector& add(T cst) { for (int i=0; i >; -- Summary: ICE in make_ssa_name on autovect-branch Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27753
[Bug tree-optimization/27753] ICE in make_ssa_name on autovect-branch
--- Comment #1 from gcc at pdoerfler dot com 2006-05-24 11:41 --- This is probably related to or a duplicate of PR26362. Anyways, this is now a C++ testcase instead of fortran. The patch by rth posted in that PR makes the ICE go away. Here is an updated version that applies cleanly: Index: targhooks.c === --- targhooks.c (revision 114040) +++ targhooks.c (working copy) @@ -455,7 +455,8 @@ tree type; enum machine_mode mode; block_stmt_iterator bsi; - tree th, tl, result, x; + tree t1, t2, x; + int i, n; /* If the first argument is a type, just check if support is available. Return a non NULL value if supported, NULL_TREE otherwise. @@ -479,31 +480,36 @@ return NULL; bsi = bsi_for_stmt (stmt); - - th = make_rename_temp (type, NULL); - x = build2 (VEC_INTERLEAVE_HIGH_EXPR, type, vec1, vec2); - x = build2 (MODIFY_EXPR, type, th, x); - th = make_ssa_name (th, x); - TREE_OPERAND (x, 0) = th; - bsi_insert_before (&bsi, x, BSI_SAME_STMT); + n = exact_log2 (GET_MODE_NUNITS (mode)) - 1; + for (i = 0; i < n; ++i) +{ + t1 = create_tmp_var (type, NULL); + add_referenced_tmp_var (t1); + x = build2 (VEC_INTERLEAVE_HIGH_EXPR, type, vec1, vec2); + x = build2 (MODIFY_EXPR, type, t1, x); + t1 = make_ssa_name (t1, x); + TREE_OPERAND (x, 0) = t1; + bsi_insert_before (&bsi, x, BSI_SAME_STMT); - tl = make_rename_temp (type, NULL); - x = build2 (VEC_INTERLEAVE_LOW_EXPR, type, vec1, vec2); - x = build2 (MODIFY_EXPR, type, tl, x); - tl = make_ssa_name (tl, x); - TREE_OPERAND (x, 0) = tl; - bsi_insert_before (&bsi, x, BSI_SAME_STMT); + t2 = create_tmp_var (type, NULL); + add_referenced_tmp_var (t2); + x = build2 (VEC_INTERLEAVE_LOW_EXPR, type, vec1, vec2); + x = build2 (MODIFY_EXPR, type, t2, x); + t2 = make_ssa_name (t2, x); + TREE_OPERAND (x, 0) = t2; + bsi_insert_before (&bsi, x, BSI_SAME_STMT); - result = make_rename_temp (type, NULL); - /* ??? Endianness issues? */ + if (BYTES_BIG_ENDIAN) +vec1 = t1, vec2 = t2; + else +vec1 = t2, vec2 = t1; +} + x = build2 (odd_p ? VEC_INTERLEAVE_HIGH_EXPR : VEC_INTERLEAVE_LOW_EXPR, - type, th, tl); - x = build2 (MODIFY_EXPR, type, result, x); - result = make_ssa_name (result, x); - TREE_OPERAND (x, 0) = result; - bsi_insert_before (&bsi, x, BSI_SAME_STMT); + type, vec1, vec2); + x = build2 (MODIFY_EXPR, type, dest, x); - return result; + return x; } tree -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27753
[Bug other/22313] [4.2 Regression] profiledbootstrap is broken on the mainline
--- Comment #35 from gcc at pdoerfler dot com 2006-05-29 09:39 --- FWIW profiledbootstrap still fails with -march=pentium4 and fortran enabled because of PR26449. Last tested with 20060520. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22313
[Bug tree-optimization/27742] [4.2 regression] ICE with -ftree-vectorizer-verbose
--- Comment #4 from gcc at pdoerfler dot com 2006-06-03 12:23 --- This does not fail with gcc-4_1-branch, Revision: 114325, BTW. So I'm marking it a 4.2 regression. -- gcc at pdoerfler dot com changed: What|Removed |Added Known to fail||4.2.0 Known to work||4.1.1 Summary|ICE with -ftree-vectorizer- |[4.2 regression] ICE with - |verbose |ftree-vectorizer-verbose http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27742
[Bug rtl-optimization/21676] [4.0/4.1/4.2 Regression] Optimizer regression: SciMark sparse matrix benchmark
--- Comment #3 from gcc at pdoerfler dot com 2006-06-06 11:22 --- I get the following with -O3 -march=pentium4 -fomit-frame-pointer on a pentium4 gentoo machine: gcc-3.4.6 gcc-4.0.2 gcc-4.1.1 2.69s 4.14s 3.26s These are all with gentoo's patches. Also, current mainline is the same as gcc-4.1.1 I can confirm that the difference without -fomit-frame-pointer is much smaller. In fact, 3.4.6 and 4.1.1 are almost the same without it. -- gcc at pdoerfler dot com changed: What|Removed |Added CC| |gcc at pdoerfler dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21676
[Bug c/27950] New: [4.2 regression] undefined reference when compiling valgrind 3.2.0
if /usr/local/4.2/bin/gcc4.2.0 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../VEX/pub -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 -m32 -mpreferred-stack-boundary=2 -O -g -Wmissing-prototypes -Winline -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -O2 -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -save-temps -v -MT memcheck_x86_linux-mc_main.o -MD -MP -MF ".deps/memcheck_x86_linux-mc_main.Tpo" -c -o memcheck_x86_linux-mc_main.o `test -f 'mc_main.c' || echo './'`mc_main.c; \ then mv -f ".deps/memcheck_x86_linux-mc_main.Tpo" ".deps/memcheck_x86_linux-mc_main.Po"; else rm -f ".deps/memcheck_x86_linux-mc_main.Tpo"; exit 1; fi Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-svn/configure --enable-languages=c,c++ --prefix=/usr/local/4.2 --program-suffix=4.2.0 Thread model: posix gcc version 4.2.0 20060603 (experimental) /usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1 -E -quiet -v -I. -I. -I.. -I../include -I../VEX/pub -MD memcheck_x86_linux-mc_main.d -MF .deps/memcheck_x86_linux-mc_main.Tpo -MP -MT memcheck_x86_linux-mc_main.o -MQ memcheck_x86_linux-mc_main.o -DHAVE_CONFIG_H -DVGA_x86=1 -DVGO_linux=1 -DVGP_x86_linux=1 mc_main.c -m32 -mpreferred-stack-boundary=2 -mtune=generic -Wmissing-prototypes -Winline -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -fworking-directory -O -O2 -fpch-preprocess -o mc_main.i ignoring nonexistent directory "/usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/include" ignoring duplicate directory "." #include "..." search starts here: #include <...> search starts here: . .. ../include ../VEX/pub /usr/local/include /usr/local/4.2/include /usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/include /usr/include End of search list. /usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1 -fpreprocessed mc_main.i -quiet -dumpbase mc_main.c -m32 -mpreferred-stack-boundary=2 -mtune=generic -auxbase-strip memcheck_x86_linux-mc_main.o -g -O -O2 -Wmissing-prototypes -Winline -Wall -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -version -o mc_main.s GNU C version 4.2.0 20060603 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.2.0 20060603 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: a42b76558fd6d6863486421b7e5252eb as -V -Qy -o memcheck_x86_linux-mc_main.o mc_main.s GNU assembler version 2.16.91.0.2 (i586-suse-linux) using BFD version 2.16.91.0.2 20050720 (SuSE Linux) /usr/local/4.2/bin/gcc4.2.0 -Wno-long-long -Wno-pointer-sign -Wdeclaration-after-statement -save-temps -v -o memcheck-x86-linux -static -Wl,-defsym,valt_load_address=0x3800 -nodefaultlibs -nostartfiles -u _start -m32 -Wl,-T,../valt_load_address_x86_linux.lds memcheck_x86_linux-mc_leakcheck.o memcheck_x86_linux-mc_malloc_wrappers.o memcheck_x86_linux-mc_main.o memcheck_x86_linux-mc_translate.o ../coregrind/libcoregrind_x86_linux.a ../VEX/libvex_x86_linux.a -lgcc Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-svn/configure --enable-languages=c,c++ --prefix=/usr/local/4.2 --program-suffix=4.2.0 Thread model: posix gcc version 4.2.0 20060603 (experimental) /usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/collect2 -m elf_i386 -static -o memcheck-x86-linux -u _start -L/usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0 -L/usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../.. -defsym valt_load_address=0x3800 -T ../valt_load_address_x86_linux.lds memcheck_x86_linux-mc_leakcheck.o memcheck_x86_linux-mc_malloc_wrappers.o memcheck_x86_linux-mc_main.o memcheck_x86_linux-mc_translate.o ../coregrind/libcoregrind_x86_linux.a ../VEX/libvex_x86_linux.a -lgcc memcheck_x86_linux-mc_main.o:(.debug_info+0x9d50): undefined reference to `hacky_auxmaps' collect2: ld returned 1 exit status -- Summary: [4.2 regression] undefined reference when compiling valgrind 3.2.0 Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27950
[Bug c/27950] [4.2 regression] undefined reference when compiling valgrind 3.2.0
--- Comment #1 from gcc at pdoerfler dot com 2006-06-08 11:00 --- Created an attachment (id=11633) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11633&action=view) preprocessed source Preprocessed source of the file that contains declaration of hacky_auxmaps. Probably, this is not enough to reproduce the failure. valgrind-3.2.0 is available from valgrind.org ./configure make to reproduce at least on x86 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27950
[Bug tree-optimization/28029] New: [4.2 regression] missed optimization with -ftree-vectorize
0 vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: D.2381_12 = pretmp.24_1 + D.2380_11 vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: D.2382_17 = *D.2381_12 vectorizer.cpp:16: note: vectype: vector float vectorizer.cpp:16: note: nunits = 4 vectorizer.cpp:16: note: ==> examining statement: D.2383_19 = (const float *) D.2379_10 vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: D.2384_20 = D.2383_19 + op_3 vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: D.2385_21 = *D.2384_20 vectorizer.cpp:16: note: vectype: const vector float vectorizer.cpp:16: note: nunits = 4 vectorizer.cpp:16: note: ==> examining statement: D.2386_22 = D.2382_17 * D.2385_21 vectorizer.cpp:16: note: get vectype for scalar type: float vectorizer.cpp:16: note: get vectype with 4 units of type float vectorizer.cpp:16: note: vectype: vector float vectorizer.cpp:16: note: vectype: vector float vectorizer.cpp:16: note: nunits = 4 vectorizer.cpp:16: note: ==> examining statement: *D.2381_12 = D.2386_22 vectorizer.cpp:16: note: vectype: vector float vectorizer.cpp:16: note: nunits = 4 vectorizer.cpp:16: note: ==> examining statement: i_23 = i_4 + 1 vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: if (D.2376_16 > i_23) goto ; else goto ; vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: ==> examining statement: : vectorizer.cpp:16: note: skip. vectorizer.cpp:16: note: === vect_analyze_dependences === vectorizer.cpp:16: note: dependence distance = 0. vectorizer.cpp:16: note: accesses have the same alignment. vectorizer.cpp:16: note: dependence distance modulo vf == 0 between *D.2381_12 and *D.2381_12 vectorizer.cpp:16: note: not vectorized: can't determine dependence between *D.2384_20 and *D.2381_12 vectorizer.cpp:16: note: bad data dependence. vectorizer.cpp:16: note: vectorized 0 loops in function. The workaround with "op" is not needed with the current autovect-branch BTW. -- Summary: [4.2 regression] missed optimization with -ftree- vectorize Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28029
[Bug tree-optimization/28030] New: missed optimization with -ftree-vectorize and templates
The following code only gets vectorized with explicitly copying the "size_" member to the local "sz" variable for 4.1.1, 4.2.0 rev. 114610 and autovect branch. = template class vec { public: vec& multiply(const vec& other) { // do something to make sure restrict is valid... const T* __restrict__ op = other.data_; T* __restrict__ tp = data_; unsigned int sz = size_; // NEEDED! for (unsigned int i=0; i; = Without the local variable I get the following output: g++ -O3 -ftree-vectorize -ftree-vectorizer-verbose=7 -march=pentium-m -c vectorizer.cpp vectorizer.cpp:16: note: = analyze_loop_nest = vectorizer.cpp:16: note: === vect_analyze_loop_form === vectorizer.cpp:16: note: split exit edge. vectorizer.cpp:16: note: === get_loop_niters === vectorizer.cpp:16: note: not vectorized: number of iterations cannot be computed. vectorizer.cpp:16: note: bad loop form. vectorizer.cpp:16: note: vectorized 0 loops in function. It works fine for T in [float, double, long int] Using typedef int aint __attribute__ ((__aligned__(16))); as in the examples doesn't help. Replacing the template declaration with int and using the class in main() leads to vectorization of the loop without needing the local variable. -- Summary: missed optimization with -ftree-vectorize and templates Product: gcc Version: tree-ssa Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28030
[Bug c++/29123] New: accepts typedef as elaborated type specifier in friend declaration
In the following testcase wrap::type is accepted as elaborate type specifier which AFAIU is not permitted by the current standard. - template struct wrap { typedef C type; }; template class foo { friend class wrap::type; // T t; }; template class bar { // bar(); }; foo > f; ICC9.1 rejects this code with: testTypedefFriend.cpp(10): error: typedef "type" may not be used in an elaborated type specifier friend class wrap::type; ^ detected during instantiation of class "foo [with T=bar]" at line 20 This code will probably be valid in C++0x if I understand http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1791.pdf correctly. But gcc doesn't implement that behavior either as can be seen by uncommenting the two lines in the snippet above. Possibly related to: PR22047 /usr/local/4.2/bin/g++4.2.0 -v -c testTypedefFriend.cpp Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.2-svn/configure --prefix=/usr/local/4.2 --program-suffix=4.2.0 --enable-languages=c,c++,fortran Thread model: posix gcc version 4.2.0 20060918 (experimental) /usr/local/4.2/libexec/gcc/i686-pc-linux-gnu/4.2.0/cc1plus -quiet -v -D_GNU_SOURCE testTypedefFriend.cpp -quiet -dumpbase testTypedefFriend.cpp -mtune=generic -auxbase testTypedefFriend -version -o /tmp/cc79A4Nh.s ignoring nonexistent directory "/usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0 /usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/i686-pc-linux-gnu /usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/../../../../include/c++/4.2.0/backward /usr/local/include /usr/local/4.2/include /usr/local/4.2/lib/gcc/i686-pc-linux-gnu/4.2.0/include /usr/include End of search list. GNU C++ version 4.2.0 20060918 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.2.0 20060918 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: febaaa122a095acbe60b52a3bc2a2eca as -V -Qy -o testTypedefFriend.o /tmp/cc79A4Nh.s GNU assembler version 2.16.91.0.5 (i586-suse-linux) using BFD version 2.16.91.0.5 20051219 (SUSE Linux) -- Summary: accepts typedef as elaborated type specifier in friend declaration Product: gcc Version: 3.3.6 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: gcc at pdoerfler dot com GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29123