[Bug tree-optimization/57169] New: fully unrolled matrix multiplication not vectorized
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57169 Bug #: 57169 Summary: fully unrolled matrix multiplication not vectorized Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: vincenzo.innoce...@cern.ch a lot of legacy code still fully unroll linear algebra for small dimensions As shown below gcc fails to vectorized a unrolled 4x4 matrix multiplication while vectorize well the corresponding loop expression sample code alignas(32) float a[4][4]; alignas(32) float b[4][4]; alignas(32) float c[4][4]; void matmul() { for (int i=0;i!=4;++i) for (int j=0;j!=4;++j) { float sum=0; for (int k=0;k!=4;++k) sum += a[i][k]*b[k][j]; c[i][j]=sum; } } alignas(32) float src1[4][4]; alignas(32) float src2[4][4]; alignas(32) float dest[4][4]; void matmulU(){ dest[0][0] = src1[0][0] * src2[0][0] + src1[0][1] * src2[1][0] + src1[0][2] * src2[2][0] + src1[0][3] * src2[3][0]; dest[0][1] = src1[0][0] * src2[0][1] + src1[0][1] * src2[1][1] + src1[0][2] * src2[2][1] + src1[0][3] * src2[3][1]; dest[0][2] = src1[0][0] * src2[0][2] + src1[0][1] * src2[1][2] + src1[0][2] * src2[2][2] + src1[0][3] * src2[3][2]; dest[0][3] = src1[0][0] * src2[0][3] + src1[0][1] * src2[1][3] + src1[0][2] * src2[2][3] + src1[0][3] * src2[3][3]; dest[1][0] = src1[1][0] * src2[0][0] + src1[1][1] * src2[1][0] + src1[1][2] * src2[2][0] + src1[1][3] * src2[3][0]; dest[1][1] = src1[1][0] * src2[0][1] + src1[1][1] * src2[1][1] + src1[1][2] * src2[2][1] + src1[1][3] * src2[3][1]; dest[1][2] = src1[1][0] * src2[0][2] + src1[1][1] * src2[1][2] + src1[1][2] * src2[2][2] + src1[1][3] * src2[3][2]; dest[1][3] = src1[1][0] * src2[0][3] + src1[1][1] * src2[1][3] + src1[1][2] * src2[2][3] + src1[1][3] * src2[3][3]; dest[2][0] = src1[2][0] * src2[0][0] + src1[2][1] * src2[1][0] + src1[2][2] * src2[2][0] + src1[2][3] * src2[3][0]; dest[2][1] = src1[2][0] * src2[0][1] + src1[2][1] * src2[1][1] + src1[2][2] * src2[2][1] + src1[2][3] * src2[3][1]; dest[2][2] = src1[2][0] * src2[0][2] + src1[2][1] * src2[1][2] + src1[2][2] * src2[2][2] + src1[2][3] * src2[3][2]; dest[2][3] = src1[2][0] * src2[0][3] + src1[2][1] * src2[1][3] + src1[2][2] * src2[2][3] + src1[2][3] * src2[3][3]; dest[3][0] = src1[3][0] * src2[0][0] + src1[3][1] * src2[1][0] + src1[3][2] * src2[2][0] + src1[3][3] * src2[3][0]; dest[3][1] = src1[3][0] * src2[0][1] + src1[3][1] * src2[1][1] + src1[3][2] * src2[2][1] + src1[3][3] * src2[3][1]; dest[3][2] = src1[3][0] * src2[0][2] + src1[3][1] * src2[1][2] + src1[3][2] * src2[2][2] + src1[3][3] * src2[3][2]; dest[3][3] = src1[3][0] * src2[0][3] + src1[3][1] * src2[1][3] + src1[3][2] * src2[2][3] + src1[3][3] * src2[3][3]; }; generated asm c++ -v Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin12.3.0/4.9.0/lto-wrapper Target: x86_64-apple-darwin12.3.0 Configured with: ./configure --disable-multilib --disable-bootstrap --enable-lto -disable-libitm --enable-languages=c,c++,fortran,lto --no-create --no-recursion Thread model: posix gcc version 4.9.0 20130428 (experimental) [trunk revision 198366] (GCC) Vincenzos-MacBook-Pro:vectorize innocent$ c++ -O3 -march=corei7-avx -std=c++11 -S matmul.cc -mavx2 -mfma Vincenzos-MacBook-Pro:vectorize innocent$ cat matmul.s .text .align 4,0x90 .globl __Z6matmulv __Z6matmulv: LFB0: vmovss8+_b(%rip), %xmm7 vmovss24+_b(%rip), %xmm1 vinsertps$0x10, 12+_b(%rip), %xmm7, %xmm0 vmovss_b(%rip), %xmm7 vmovss16+_b(%rip), %xmm2 vinsertps$0x10, 4+_b(%rip), %xmm7, %xmm8 vmovss40+_b(%rip), %xmm3 vmovlhps%xmm0, %xmm8, %xmm8 vmovss32+_b(%rip), %xmm4 vinsertf128$1, %xmm8, %ymm8, %ymm8 vinsertps$0x10, 28+_b(%rip), %xmm1, %xmm0 vmovss56+_b(%rip), %xmm7 vinsertps$0x10, 20+_b(%rip), %xmm2, %xmm6 vmovlhps%xmm0, %xmm6, %xmm6 vmovss48+_b(%rip), %xmm1 vinsertf128$1, %xmm6, %ymm6, %ymm6 vinsertps$0x10, 44+_b(%rip), %xmm3, %xmm0 vinsertps$0x10, 36+_b(%rip), %xmm4, %xmm5 vmovlhps%xmm0, %xmm5, %xmm5 vinsertps$0x10, 60+_b(%rip), %xmm7, %xmm0 vinsertps$0x10, 52+_b(%rip), %xmm1, %xmm4 vmovlhps%xmm0, %xmm4, %xmm4 vxorps%xmm7, %xmm7, %xmm7 vmovaps_a(%rip), %ymm0 vinsertf128$1, %xmm5, %ymm5, %ymm5 vinsertf128$1, %xmm4, %ymm4, %ymm4 vpermilps$255, %ymm0, %ymm1 vpermilps$170, %ymm0, %ymm2 vpermilps$85, %ymm0, %ymm3 vpermilps$0, %ymm0, %ymm0 vfmadd132ps%ymm8, %ymm7, %ymm0 vfmadd132ps%ymm6, %ym
[Bug c++/46759] incorrect array bounds warning?
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46759 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Known to work||4.8.0, 4.9.0 Resolution||FIXED --- Comment #7 from Paolo Carlini 2013-05-04 10:48:00 UTC --- Cannot reproduce with active branches. If you can still see something wrong please re-open or file a new issue. Thanks.
[Bug c++/47749] Wrong function return value
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47749 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED --- Comment #14 from Paolo Carlini 2013-05-04 10:49:36 UTC --- I guess we can close this.
[Bug tree-optimization/57144] [4.9 regression] mpfr miscompiled after r198413
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57144 Andreas Schwab changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #4 from Andreas Schwab 2013-05-04 11:20:08 UTC --- Works. http://gcc.gnu.org/ml/gcc-testresults/2013-05/msg00274.html
[Bug c++/57170] New: No diagnostic for a negative case when switching over unsigned
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57170 Bug #: 57170 Summary: No diagnostic for a negative case when switching over unsigned Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: vvnic.ho...@gmail.com A signed->unsigned conversion is narrowing, so -1 is not a converted constant expression. However, the following emits no warning with -Wall, with or without -std=c++11: int main() { unsigned a = 10; switch (a) { case -1: break; } return 0; } But replacing "unsigned" with any smaller unsigned type (unsigned char or unsigned short) yields the following warning: test.cpp:4:9: warning: case label value is less than minimum value for type [enabled by default] case -1:
[Bug c++/51927] [C++0x] Cannot access non-static members in initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51927 Paolo Carlini changed: What|Removed |Added Known to work||4.8.0, 4.9.0 Known to fail|4.8.0 | --- Comment #5 from Paolo Carlini 2013-05-04 12:20:56 UTC --- This is fixed. I'm adding the testcase and closing the report.
[Bug c++/51927] [C++0x] Cannot access non-static members in initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51927 Paolo Carlini changed: What|Removed |Added Status|NEW |RESOLVED Blocks||54367 Resolution||FIXED --- Comment #6 from Paolo Carlini 2013-05-04 12:33:13 UTC --- Done.
[Bug c++/53745] [C++11] Poor diagnostic for ill-formed narrowing conversion in enumerator initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53745 Paolo Carlini changed: What|Removed |Added Status|REOPENED|ASSIGNED AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com --- Comment #5 from Paolo Carlini 2013-05-04 13:09:37 UTC --- I'm going to propose changing the message to "... outside the range...", similarly to ICC: it seems a good compromise, less misleading than the current message, less technical than clang's.
[Bug target/53949] [SH] Add support for mac.w / mac.l instructions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53949 --- Comment #9 from Oleg Endo 2013-05-04 13:39:10 UTC --- (In reply to comment #3) > - Loops with multiple running sums like > for (int i = 0; i < 16; ++i) > { > sum0 += (int64_t)(*a++) * (int64_t)(*b++); > sum1 += (int64_t)(*c++) * (int64_t)(*d++); > } > > result in macl:mach swapping to general reg pairs between subsequent > mac.w instructions. Ideally such loops should be split into multiple > loops like in the previous example. This is basically what -ftree-loop-distribution does. The question would be how to re-use it for this particular case.
[Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865 --- Comment #9 from Alan Modra 2013-05-04 14:34:39 UTC --- >From what I see on current mainline for a testcase based on glibc/nss/nss_files/files-init.c the var_decl size and the type size agree and are correct. What causes a problem with -fsection-anchors is that the actual data emitted by output_constant() is wrong. struct traced_file { long pad; char fname[]; }; #define TF(id, filename, ...)\ union\ {\ struct traced_file file;\ char buf[sizeof (struct traced_file) + sizeof (filename)];\ } id##_traced_file =\ {\ .file =\ {\ .fname = filename\ }\ } TF (pwd, "/etc/passwd"); TF (grp, "/etc/group"); Gives me .file"unioninit.c" .globl grp_traced_file .globl pwd_traced_file .section".data" .align 2 .LANCB0: .org .LANCB0+0 .typegrp_traced_file, @object .sizegrp_traced_file, 16 grp_traced_file: .zero4 .string"/etc/group" .zero12 .org .LANCB0+16 .typepwd_traced_file, @object .sizepwd_traced_file, 16 pwd_traced_file: .zero4 .string"/etc/passwd" .zero12 .ident"GCC: (GNU) 4.9.0 20130502 (experimental)" .section.note.GNU-stack,"",@progbits Those ".zero 12" lines shouldn't be there.
[Bug middle-end/28865] Structures with a flexible arrray member have wrong .size
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28865 --- Comment #10 from Alan Modra 2013-05-04 14:39:34 UTC --- Incidentall, I expect the patch referred to in comment #6 will ICE with tree-checking on due to CONSTRUCTOR nodes not having the required fields for DECL_SIZE_UNIT.
[Bug tree-optimization/55459] Firefox 17: internal compiler error: in scan_tree_for_params_right_scev, at graphite-sese-to-poly.c:633
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55459 dE changed: What|Removed |Added CC||de.techno at gmail dot com --- Comment #5 from dE 2013-05-04 15:16:00 UTC --- Confirm identical bug with Thuderbird https://bugs.gentoo.org/show_bug.cgi?id=466568
[Bug c++/57171] New: Internal compiler error: Error reporting routines re-entered.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57171 Bug #: 57171 Summary: Internal compiler error: Error reporting routines re-entered. Classification: Unclassified Product: gcc Version: 4.7.3 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: zgen...@yahoo.com I'm using Ubuntu and get this message. I've attached the file from the output. libtool: compile: g++ -DPACKAGE_NAME=\"libbitcoin\" -DPACKAGE_TARNAME=\"libbitcoin\" -DPACKAGE_VERSION=\"0.1\" "-DPACKAGE_STRING=\"libbitcoin 0.1\"" -DPACKAGE_BUGREPORT=\"gen...@riseup.net\" -DPACKAGE_URL=\"\" -DPACKAGE=\"libbitcoin\" -DVERSION=\"0.1\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" "-DHAVE_BOOST=/**/" -I. -I./../include -std=gnu++0x -Wall -Wno-unused-parameter -pedantic -pthread -Wextra -fstack-protector-all -ggdb -MT leveldb_blockchain.lo -MD -MP -MF .deps/leveldb_blockchain.Tpo -c blockchain/leveldb/leveldb_blockchain.cpp -fPIC -DPIC -o .libs/leveldb_blockchain.o blockchain/leveldb/leveldb_blockchain.cpp: In member function 'void libbitcoin::leveldb_blockchain::do_store(const libbitcoin::message::block&, libbitcoin::blockchain::store_block_handler)': blockchain/leveldb/leveldb_blockchain.cpp:183:54: warning: narrowing conversion of 'depth' from 'int' to 'size_t {aka unsigned int}' inside { } [-Wnarrowing] ' Internal compiler error: Error reporting routines re-entered. Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Preprocessed source stored into /tmp/ccaY0ov7.out file, please attach this to your bugreport. make[1]: *** [leveldb_blockchain.lo] Error 1 make[1]: Leaving directory `/home/genjix/src/libbitcoin/src' make: *** [install-recursive] Error 1
[Bug c++/57171] Internal compiler error: Error reporting routines re-entered.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57171 Paolo Carlini changed: What|Removed |Added Status|UNCONFIRMED |WAITING Last reconfirmed||2013-05-04 Ever Confirmed|0 |1 Severity|critical|normal --- Comment #1 from Paolo Carlini 2013-05-04 16:06:06 UTC --- Please provide the preprocessed .ii per the bug reporting instructions.
[Bug c++/49777] for c++ code, without -g option, cannot generate PIC *.so library.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49777 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||FIXED --- Comment #6 from Paolo Carlini 2013-05-04 16:26:05 UTC --- Closing.
[Bug c++/50592] g++ fails to see function side effect
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50592 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID --- Comment #3 from Paolo Carlini 2013-05-04 16:27:09 UTC --- Feedback not forthcoming.
[Bug c++/57171] Internal compiler error: Error reporting routines re-entered.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57171 --- Comment #2 from Amir Taaki 2013-05-04 16:31:05 UTC --- https://mega.co.nz/#!P5ACwTCS!FKmUL1h0s77t2Wq0R5h8XRJCfuwSThAf30C1VDPHBno "The file you are trying to attach is 3772 kilobytes (KB) in size. Attachments cannot be more than 1000 KB. We recommend that you store your attachment elsewhere and then insert the URL to it in a comment, or in the URL field for this bug. Alternately, if your attachment is an image, you could convert it to a compressible format like JPG or PNG and try again. " I figured out where the bug was coming from. I'm using std::unique_ptr, and passing some of those into a constructor for an object which expects leveldb::DB*. The implicit cast was proving problematic (yielding the error given above), but using foo.get() instead of just passing foo is fine.
[Bug c++/52467] ICE: canonical types differ for int [0] and int [0]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52467 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Known to work||4.7.3, 4.8.0, 4.9.0 Resolution||WORKSFORME --- Comment #5 from Paolo Carlini 2013-05-04 16:33:00 UTC --- Closing.
[Bug c++/52527] When using '-g', get an ICE: seg fault in add_name_attribute (called by modified_type_die)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52527 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID --- Comment #3 from Paolo Carlini 2013-05-04 16:33:44 UTC --- Feedback not forthcoming.
[Bug c++/53781] ICE when compiling a deeply nested template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53781 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID --- Comment #5 from Paolo Carlini 2013-05-04 16:36:14 UTC --- Feedback not forthcoming.
[Bug c++/55550] internal compiler segmentation fault on openmp for collapse
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=0 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Resolution||INVALID --- Comment #3 from Paolo Carlini 2013-05-04 16:36:54 UTC --- Feedback not forthcoming.
[Bug c++/57171] Internal compiler error: Error reporting routines re-entered.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57171 Paolo Carlini changed: What|Removed |Added Status|WAITING |RESOLVED Known to work||4.8.0, 4.9.0 Resolution||FIXED --- Comment #3 from Paolo Carlini 2013-05-04 16:41:57 UTC --- Thanks. Note that normally you really want to reduce your testcase to a manageable size. Anyway, the problem doesn't affect 4.8 and 4.9 and doesn't seem a regression.
[Bug c++/28525] ICE after duplicate_decls
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28525 Paolo Carlini changed: What|Removed |Added CC|gcc-bugs at gcc dot gnu.org | --- Comment #3 from Paolo Carlini 2013-05-04 17:23:05 UTC --- Volker?
[Bug c++/57102] [4.9 Regression] ICE: SIGSEGV in fndecl_declared_return_type with -fcompare-debug
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57102 Uros Bizjak changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2013-05-04 Ever Confirmed|0 |1 --- Comment #1 from Uros Bizjak 2013-05-04 18:48:32 UTC --- Confirmed, the segfault can be triggered with: ~/gcc-build/gcc/cc1plus -O2 -std=gnu++11 -fno-inline -fdump-final-insns=aaa The important part is "-fdump-final-insns=...". ... Performing interprocedural optimizations <*free_lang_data> <*free_inline_summary> Assembling functions: constexpr _Tp&& std::forward(typename std::remove_reference<_Tp>::type&) [with _Tp = ; typename std::remove_reference<_Tp>::type = ] constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&) [with _Tp = &; typename std::remove_reference<_Tp>::type = ] std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Impl::_Impl(_Alloc) [with _Tp = std::__future_base::_Task_state<, __gnu_test::SimpleAllocator, int()>; _Alloc = __gnu_test::SimpleAllocator; __gnu_cxx::_Lock_policy _Lp = (__gnu_cxx::_Lock_policy)2u] std::function<_Res(_ArgTypes ...)>::function(_Functor) [with _Functor = std::reference_wrapper >()> >; = void; _Res = int; _ArgTypes = {}] final.ii:765:61: internal compiler error: Segmentation fault packaged_task p(allocator_arg, a, []() { return 1; }); ^ 0xa94bff crash_signal ../../gcc-svn/trunk/gcc/toplev.c:333 0x54160b fndecl_declared_return_type(tree_node*) ../../gcc-svn/trunk/gcc/cp/decl.c:14388 0x5f620c dump_function_decl ../../gcc-svn/trunk/gcc/cp/error.c:1416 0x5f7b40 decl_as_string(tree_node*, int) ../../gcc-svn/trunk/gcc/cp/error.c:2642 0x69f562 cxx_printable_name_internal ../../gcc-svn/trunk/gcc/cp/tree.c:1953 0xa95312 announce_function(tree_node*) ../../gcc-svn/trunk/gcc/toplev.c:229 0x7c26f6 expand_function ../../gcc-svn/trunk/gcc/cgraphunit.c:1610 0x7c44d6 expand_all_functions ../../gcc-svn/trunk/gcc/cgraphunit.c:1744 0x7c44d6 compile() ../../gcc-svn/trunk/gcc/cgraphunit.c:2042 0x7c4b79 finalize_compilation_unit() ../../gcc-svn/trunk/gcc/cgraphunit.c:2119 0x5ea280 cp_write_global_declarations() ../../gcc-svn/trunk/gcc/cp/decl2.c:4330 Please submit a full bug report, It looks that compilation fails during IPO, trying to dump fndecl. gdb says: Program received signal SIGSEGV, Segmentation fault. 0x0054160b in fndecl_declared_return_type (fn=0x7165ad00) at ../../gcc-svn/trunk/gcc/cp/decl.c:14388 14388 ->x_auto_return_pattern); (gdb) bt #0 0x0054160b in fndecl_declared_return_type (fn=0x7165ad00) at ../../gcc-svn/trunk/gcc/cp/decl.c:14388 #1 0x005f620d in dump_function_decl (t=0x7165ad00, flags=4) at ../../gcc-svn/trunk/gcc/cp/error.c:1416 #2 0x005f7b41 in decl_as_string (decl=0x7165ad00, flags=4) at ../../gcc-svn/trunk/gcc/cp/error.c:2642 #3 0x0069f563 in cxx_printable_name_internal (decl=0x7165ad00, v=2, translate=) at ../../gcc-svn/trunk/gcc/cp/tree.c:1953 #4 0x00b2a8f9 in dump_function_header (dump_file=0x17cb5a0, fdecl=0x7165ad00, flags=0) at ../../gcc-svn/trunk/gcc/tree-pretty-print.c:3138 #5 0x0087f4b1 in rest_of_clean_state () at ../../gcc-svn/trunk/gcc/final.c:4455 #6 0x009f846f in execute_one_pass (pass=pass@entry=0x1639380 ) at ../../gcc-svn/trunk/gcc/passes.c:2337 (gdb) list 14383 fndecl_declared_return_type (tree fn) 14384 { 14385 fn = STRIP_TEMPLATE (fn); 14386 if (FNDECL_USED_AUTO (fn)) 14387 return (DECL_STRUCT_FUNCTION (fn)->language 14388 ->x_auto_return_pattern); 14389 else 14390 return TREE_TYPE (TREE_TYPE (fn)); 14391 } 14392
[Bug c++/57102] [4.9 Regression] ICE: SIGSEGV in fndecl_declared_return_type with -fdump-final-insns=...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57102 Uros Bizjak changed: What|Removed |Added Summary|[4.9 Regression] ICE: |[4.9 Regression] ICE: |SIGSEGV in |SIGSEGV in |fndecl_declared_return_type |fndecl_declared_return_type |with -fcompare-debug|with -fdump-final-insns=... --- Comment #2 from Uros Bizjak 2013-05-04 18:50:10 UTC --- Updated Summary.
[Bug fortran/57160] short-circuit IF only with -ffrontend-optimize
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57160 Tobias Burnus changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus 2013-05-04 19:23:08 UTC --- GCC (the middle end) has TRUTH_AND_EXPR (matching Fortran's .AND.) and TRUTH_ANDIF_EXPR (matching C's &&) - besides the IAND/& which is BIT_AND_EXPR. Currently, the code generation directly translates all .AND. into TRUTH_AND_EXPR. Hence, the middle end/target-code generation might decide to evaluate "A.AND.B" as "A andif B", "B andif A" or both as "A and B". That's really outside the scope of the Fortran front end. What you would like is that both A and B are /always/ evaluated with .AND. That's quite some work with little gain. As I know for experience, the current TRUTH_AND_EXPR does no short-circuit evaluation in the given order - I already had segfaults for code similar to your's. * * * As a side note, see http://www.j3-fortran.org/doc/year/13/13-234.txt for a proposal for the next Fortran standard which allows to explicitly require short-circuit evaluation, using: if ( IF (ASSOCIATED(m)) THEN (m%T) ELSE (.false.) ) then write (6,*) s1(m) end if Or even as: write (6,*) IF (ASSOCIATED(m)) THEN ( IF(m%T)then("X")ELSE("") ) ELSE ("")
gcc-bugs@gcc.gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57172 Bug #: 57172 Summary: [C++11][DR 1164] Template overload resolution ambiguous for T&& versus T& Classification: Unclassified Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: daniel.krueg...@googlemail.com The following code is rejected by gcc 4.9.0 20130428 (experimental) using the compiler flags -std=c++11 -Wall -pedantic-errors //- template int f(T&){} template int f(T&&); int i; int j = f(i); //- "main.cpp|4|error: call of overloaded 'f(int&)' is ambiguous| main.cpp|4|note: candidates are:| main.cpp|1|note: int f(T&) [with T = int]| main.cpp|2|note: int f(T&&) [with T = int&]|" This example was relevant for http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#1164 and the core language has been adapted to make it well-formed as described by [temp.deduct.partial] p9 b1. The compiler should select the first overload here.
[Bug other/32185] unused result warnings and -werror
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32185 Paulo J. Matos changed: What|Removed |Added CC||pa...@matos-sorge.com --- Comment #7 from Paulo J. Matos 2013-05-04 21:01:22 UTC --- This still occurs with HEAD of gcc in the call to getcwd in server.c if you build with --enable-werror-always. It's not high priority but it would be nice to see this warning gone (via checking within gcc).
gcc-bugs@gcc.gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57172 --- Comment #1 from Marc Glisse 2013-05-04 21:27:02 UTC --- Created attachment 30031 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30031 rough untested patch This patch (missing at least testing and an update of the comments) seems to help for this specific case.
[Bug tree-optimization/57027] [4.9 Regression] ICE in gimple_assign_rhs_code, at gimple.h:2022
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57027 --- Comment #7 from dave.anglin at bell dot net 2013-05-04 23:03:36 UTC --- On 3-May-13, at 6:11 AM, amylaar at gcc dot gnu.org wrote: > Created attachment 30016 > > --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30016 > > amended patch Works for me. Thanks, Dave -- John David Anglindave.ang...@bell.net
[Bug c++/53745] [C++11] Poor diagnostic for ill-formed narrowing conversion in enumerator initializer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53745 Paolo Carlini changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED Target Milestone|--- |4.9.0 --- Comment #6 from Paolo Carlini 2013-05-05 00:29:13 UTC --- Fixed for 4.9.0.
[Bug fortran/56660] Fails to read NAMELIST with certain form array syntax
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56660 --- Comment #4 from Jerry DeLisle 2013-05-05 00:37:10 UTC --- Fixed on trunk. Shall we close this? The type extension bug, PR56117 remains.
[Bug libstdc++/57173] New: Regex match group contain extraneous character...
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57173 Bug #: 57173 Summary: Regex match group contain extraneous character... Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: mj...@mailinator.com Created attachment 30032 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30032 a small program that encapsulates the issue summary: I have a regex built from "/asdf(/.*)" I match this regex against this string: "/asdf/qwerty" expected output std::smatch: 1) /asdf/qwerty 2) /qwerty actual output std::smatch: 1) /asdf/qwerty 2) f/qwerty Notice that in (2) of the actual output, there's a prefix "f" which shouldn't be there... compile command: g++ -std=c++11 -Wall -Wextra foo.cpp g++ version: g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 program output: result: 1 match: /asdf/qwerty match: f/qwerty
[Bug c++/29143] address-of overloaded function does not work in function call
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29143 Paolo Carlini changed: What|Removed |Added Status|NEW |ASSIGNED CC|gcc-bugs at gcc dot gnu.org | AssignedTo|unassigned at gcc dot |paolo.carlini at oracle dot |gnu.org |com --- Comment #3 from Paolo Carlini 2013-05-05 00:58:59 UTC --- Looking into it, seems doable.