[Bug c++/49037] New: SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49037 Summary: SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: cra...@postincrement.com Created attachment 24275 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24275 preprocessed file A SEGV is generated if __gnu_cxx::bitmap_allocator is used within the constructor of a global static. This does not occur for gcc versions prior to gcc 4.4.0 (approximately), and does not occur if the same code is used with the std::allocator or __gnu_cxx::__mt_alloc allocators. Host system: (uname -a) Linux shogun.erina.postincrement.net 2.6.32.16-150.fc12.x86_64 #1 SMP Sat Jul 24 05:19:12 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux g++ version is compiled from release tarball, no patches g++ (GCC) 4.6.0 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. t.ii file is attached
[Bug tree-optimization/49000] [4.6/4.7 Regression] ICE: verify_ssa failed with -O2 -g
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49000 --- Comment #11 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 06:05:53 UTC --- It is the same bug actually and is also fixed by the patch. I'll post the patch momentarily.
[Bug other/49031] powl() function gives wrong results in some situations
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49031 --- Comment #3 from Elias Rudberg eliasrudberg at gmail dot com 2011-05-18 07:42:00 UTC --- There's no such thing, gcc is a compiler, libm is part of the C library Okay, thanks for explaining this. I'm sorry I filed the bug in the wrong place.
[Bug target/33049] [avr] bit extraction non optimal, inversing logic solves problem
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33049 --- Comment #12 from Georg-Johann Lay gjl at gcc dot gnu.org 2011-05-18 08:06:53 UTC --- Created attachment 24277 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24277 Proposed patch Patch that is less fuzzy in its attributes.
[Bug tree-optimization/49038] New: -ftree-vectorise introduces reads past end of array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49038 Summary: -ftree-vectorise introduces reads past end of array Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: rsand...@gcc.gnu.org Created attachment 24276 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24276 Test case The vectoriser has support for interleaved loads with gaps, such as: ...a[n*4] ...a[n*4+1] ...a[n*4+2] It implements this by loading blocks of 4*vectfactor elements from a[], then permuting them. However, it doesn't seem to check whether the gap elements are provably loadable. The attached testcase segfaults on x86_64-linux-gnu with -O2 -ftree-vectorize, but works with plain -O2.
[Bug target/49002] 128-bit AVX load incorrectly becomes 256-bit AVX load
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49002 --- Comment #2 from Yukhin Kirill kirill.yukhin at intel dot com 2011-05-18 08:24:10 UTC --- Created attachment 24278 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24278 The patch Hi, Here is fix for the bug. I made bootrstrap and make check on 4.6 BTW, it also have to be committed to trunk, since the problem is there is well K
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #11 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-18 08:34:50 UTC --- (In reply to comment #9) The libstdc++ uses glibc anyway? What about alternative implementations like hp-gcc for HP-UX? I don't know what hp-gcc is, but on non-glibc platforms the overloads aren't correct, see PR 33935 (In reply to comment #10) (In reply to comment #8) 3.4 and 4.1 are ancient history, active release series are listed on the home page, http://gcc.gnu.org/ Yes, I know. But I have no ability to upgrade them in all installations I didn't say you should upgrade them, but there's no point reporting bugs against old, unmaintained versions. You could install a current release to test before reporting a bug though.
[Bug tree-optimization/48702] [4.6/4.7 Regression] optimization regression with gcc-4.6 on x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702 --- Comment #19 from rguenther at suse dot de rguenther at suse dot de 2011-05-18 08:47:31 UTC --- On Tue, 17 May 2011, rakdver at kam dot mff.cuni.cz wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702 --- Comment #15 from rakdver at kam dot mff.cuni.cz rakdver at kam dot mff.cuni.cz 2011-05-17 19:26:18 UTC --- Hi, The following patch fixes the problem. Is it ok? as a heuristic, this probably makes sense. Still, it does not fix the problem, just masks it and makes it harder to reproduce, Looks similar to my original workaround, no? We can actually use something like the aliasing non-pointer base Zdenek mentioned upthread. TARGET_MEM_REF has two index operands (where usually TMR_INDEX2 is NULL of TMR_BASE is non-constant). So we could build a TARGET_MEM_REF based off TMR_BASE 0B and move the non-pointer base to TMR_INDEX2. The oracle then should not be able to disambiguate anything (and also no points-to info would be available, which probably doesn't make this the very very best idea either). Richard.
[Bug libstdc++/49022] [C++0x] std::begin and std::end specialized for std::valarray with some operators are missing.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49022 --- Comment #15 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 08:59:26 UTC --- Discussion on the LWG reflector started at c++std-lib-30761
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #12 from __vic d.v.a at ngs dot ru 2011-05-18 09:06:26 UTC --- (In reply to comment #11) I don't know what hp-gcc is, but on non-glibc platforms the overloads aren't correct, see PR 33935 PR 33935 is mostly about overloads in string.h. I'm not interested in them. Could you clarify what happen in following case. C-implementation don't provides overloads, only standard C prototype in string.h. Can I get standard-conformant prototypes by including cstring from libstdc++ on such platform? According to the trunk version of cstring answer is No. Is this true?
[Bug target/49002] 128-bit AVX load incorrectly becomes 256-bit AVX load
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49002 --- Comment #3 from Uros Bizjak ubizjak at gmail dot com 2011-05-18 09:12:21 UTC --- (In reply to comment #2) Created attachment 24278 [details] The patch Here is fix for the bug. I made bootrstrap and make check on 4.6 BTW, it also have to be committed to trunk, since the problem is there is well Please post the patch to gcc-patches@ mailing list for approval or further discussion. Please follow the procedure, as explained in details in [1]. [1] http://gcc.gnu.org/contribute.html
[Bug c++/49039] New: LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 Summary: LLVM StringRef miscompilation with -O2 Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: ism...@namtrac.org Hi; This is extracted from http://llvm.org/bugs/show_bug.cgi?id=9858 . I'll attach the testcase from Nick Lewycky. [/work/stuff] g++ pr9858.cc [/work/stuff] ./a.out [/work/stuff] g++ -O2 pr9858.cc [/work/stuff] ./a.out [1]2459 segmentation fault ./a.out
[Bug tree-optimization/49000] [4.6/4.7 Regression] ICE: verify_ssa failed with -O2 -g
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49000 --- Comment #12 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 09:22:45 UTC --- Author: jakub Date: Wed May 18 09:22:41 2011 New Revision: 173849 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173849 Log: PR tree-optimization/49000 * tree-ssa.c (execute_update_addresses_taken): Call maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't be rewritten and decl has been marked for renaming, reset the debug stmt. * gcc.dg/pr49000.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr49000.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa.c
[Bug tree-optimization/49033] [4.6/4.7 Regression] ICE in compute_affine_dependence (tree-data-ref.c:4090) with -O3 -fcheck-data-deps -march=amdfam10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49033 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.6.1
[Bug c++/49039] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #1 from İsmail cartman Dönmez ismail at namtrac dot org 2011-05-18 09:29:32 UTC --- Created attachment 24279 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24279 Testcase.
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #13 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 09:26:14 UTC --- If you don't use glibc 2.10+ as C library the answer is No indeed.
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #14 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-18 09:28:41 UTC --- As stated at http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33935#c4
[Bug tree-optimization/49000] [4.6/4.7 Regression] ICE: verify_ssa failed with -O2 -g
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49000 --- Comment #14 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 09:31:31 UTC --- Author: jakub Date: Wed May 18 09:31:25 2011 New Revision: 173851 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173851 Log: PR tree-optimization/49000 * tree-ssa.c (execute_update_addresses_taken): Call maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't be rewritten and decl has been marked for renaming, reset the debug stmt. * gcc.dg/pr49000.c: New test. Added: branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/pr49000.c
[Bug tree-optimization/49040] New: ICE in translate_clast, at graphite-clast-to-gimple.c:1123
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49040 Summary: ICE in translate_clast, at graphite-clast-to-gimple.c:1123 Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: b...@arklinux.org Host: i686-pc-linux-gnu Target: i686-pc-linux-gnu Build: i686-pc-linux-gnu Created attachment 24280 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24280 Preprocessed source (not yet reduced) Trying to build gsl 1.15 with gcc 4.6.0 -O -fgraphite-identity results in dd.c: In function 'gsl_poly_dd_taylor': dd.c:53:1: internal compiler error: in translate_clast, at graphite-clast-to-gimple.c:1123 Please submit a full bug report, with preprocessed source if appropriate. ppl 0.11.2 isl 0.06 cloog 0.16.2
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Target||x86_64-*-* Status|UNCONFIRMED |NEW Known to work||4.5.3 Keywords||wrong-code Last reconfirmed||2011.05.18 09:44:38 Ever Confirmed|0 |1 Summary|LLVM StringRef |[4.6/4.7 Regression] LLVM |miscompilation with -O2 |StringRef miscompilation ||with -O2 Target Milestone|--- |4.6.1 --- Comment #2 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 09:44:38 UTC --- Confirmed.
[Bug c++/49027] g++ ignores -fno-exceptions in uninstantiated template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49027 --- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 09:43:37 UTC --- I'm not sure. What about extern int f2(); struct NoExcept {}; templatetypename T void f1() { try { f2(); } catch (...) { } } template void f1NoExcept() { f2(); } template f1NoExcept(); ? EH code could be disabled by some tags and specialization. Especially for a library that has a non-exception variant that would sound useful.
[Bug tree-optimization/49000] [4.6/4.7 Regression] ICE: verify_ssa failed with -O2 -g
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49000 --- Comment #13 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 09:29:57 UTC --- Author: jakub Date: Wed May 18 09:29:46 2011 New Revision: 173850 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173850 Log: PR tree-optimization/49000 * tree-ssa.c (execute_update_addresses_taken): Call maybe_rewrite_mem_ref_base on debug stmt value. If it couldn't be rewritten and decl has been marked for renaming, reset the debug stmt. * gcc.dg/pr49000.c: New test. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/tree-ssa.c
[Bug libstdc++/49037] SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49037 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.18 09:27:49 Component|c++ |libstdc++ Ever Confirmed|0 |1 Known to fail||4.5.2, 4.6.0 --- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 09:27:49 UTC --- Confirmed.
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 __vic d.v.a at ngs dot ru changed: What|Removed |Added Status|CLOSED |UNCONFIRMED Version|4.1.1 |4.7.0 Resolution|DUPLICATE | --- Comment #15 from __vic d.v.a at ngs dot ru 2011-05-18 09:30:59 UTC --- The following code would work anyway: namespace std { #ifdef __CORRECT_ISO_CPP_STRING_H_PROTO using ::strchr; #else inline const char *strchr(const char *__s, int __c) { return ::strchr(__s, __c); } inline char *strchr(char *__s, int __c) { return ::strchr(__s, __c); } #endif }
[Bug rtl-optimization/49028] Missed optimization of pointer arithmetic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49028 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.18 09:40:28 Ever Confirmed|0 |1 --- Comment #2 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 09:40:28 UTC --- I think we are confused by the division by the element size which is of course what the language semantic requires. Thus, we start with (void) ((this)-m_Cursor = (void * *) (this)-m_Data + (long unsigned int) ((long unsigned int) long int) ((this)-m_Cursor + 8) - (long int) (this)-m_Data) /[ex] 8) % 16) * 8)) and because of the modulus we can't fold it. In the IL we end up with bb 2: D.2101_3 = this_1(D)-m_Cursor; D.2102_4 = D.2101_3 + 8; D.2103_5 = (long int) D.2102_4; D.2100_6 = this_1(D)-m_Data; D.2104_7 = (long int) D.2100_6; D.2105_8 = D.2103_5 - D.2104_7; D.2106_9 = D.2105_8 /[ex] 8; D.2107_10 = D.2106_9 % 16; D.2108_11 = (long unsigned int) D.2107_10; D.2110_13 = this_1(D)-m_Data[D.2108_11]{lb: 0 sz: 8}; this_1(D)-m_Cursor = D.2110_13; MEM[(void * *)this_1(D)].m_Data[D.2108_11]{lb: 0 sz: 8} = p_15(D); return; where it requires quite some elaboration to combine the D.2108_11 index computation with the address generation via the array-reference. Maybe we can do some generic clever tricks to (A /[ex] CST1) % CST2? We'd like to re-associate it somehow.
[Bug middle-end/49029] ICE in simplify_subreg, at simplify-rtx.c:5266
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49029 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.18 09:57:22 CC||jakub at gcc dot gnu.org Component|target |middle-end Ever Confirmed|0 |1
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #16 from __vic d.v.a at ngs dot ru 2011-05-18 09:55:34 UTC --- Initial problem is that the following standard-conforming code is not compiled by GCC. #includecstring templateclass Iter void f(Iter i1, Iter i2) { } int main() { const char *st = abc; f(st, std::strchr(st, '\0')); } Yes, workaround is obvious: add the const_cast to the return value. But is there a way to do without it?
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE --- Comment #17 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 10:08:22 UTC --- . *** This bug has been marked as a duplicate of bug 33935 ***
[Bug middle-end/49029] [4.6/4.7 Regression] ICE in simplify_subreg, at simplify-rtx.c:5266
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49029 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | --- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 10:12:16 UTC --- Created attachment 24281 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24281 gcc46-pr49029.patch Untested fix. I can bootstrap/regtest this on x86_64 and i686, but can't on arm. Can anyone please test it there?
[Bug libstdc++/49037] SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49037 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|NEW |RESOLVED Resolution||WONTFIX --- Comment #2 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 10:09:53 UTC --- Really, nobody is going to spend time on bitmap_allocator. If you ask me, I would be in favor of removing it completely.
[Bug tree-optimization/49038] [4.5/4.6/4.7 Regression] -ftree-vectorise introduces reads past end of array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49038 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Known to work||4.4.5 Keywords||wrong-code Last reconfirmed||2011.05.18 09:22:59 Ever Confirmed|0 |1 Summary|-ftree-vectorise introduces |[4.5/4.6/4.7 Regression] |reads past end of array |-ftree-vectorise introduces ||reads past end of array Target Milestone|--- |4.5.4 --- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 09:22:59 UTC --- Confirmed.
[Bug lto/49041] New: ICE when compiling with lto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49041 Summary: ICE when compiling with lto Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: blocker Priority: P3 Component: lto AssignedTo: unassig...@gcc.gnu.org ReportedBy: vincenzo.innoce...@cern.ch g++ -v Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ./configure -enable-gold=yes --enable-lto --with-fpmath=avx --with-build-config=bootstrap-lto --with-gmp-lib=/usr/local/lib64 --with-mpfr-lib=/usr/local/lib64 -with-mpc-lib=/usr/local/lib64 Thread model: posix gcc version 4.6.1 20110513 (prerelease) (GCC) g++ -g -c ranlux.ii (ok) g++ -flto -g -c ranlux.ii ranlux.cpp:171:1: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:158 g++ -flto -fuse-linker-plugin -g -c ranlux.ii ranlux.cpp:171:1: internal compiler error: in lhd_set_decl_assembler_name, at langhooks.c:158 Please submit a full bug report,
[Bug middle-end/45098] Missed induction variable optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45098 --- Comment #2 from vries at gcc dot gnu.org 2011-05-18 10:20:59 UTC --- Author: vries Date: Wed May 18 10:20:55 2011 New Revision: 173853 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173853 Log: 2011-05-18 Tom de Vries t...@codesourcery.com PR target/45098 * tree-ssa-loop-ivopts.c (seq_cost): Fix call to rtx_cost. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-loop-ivopts.c
[Bug c++/49042] New: wrong protected in c++0x when using template and decltype
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49042 Summary: wrong protected in c++0x when using template and decltype Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: len...@yahoo.com.cn Created attachment 24282 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24282 the preprocessed file of tmpl_decl.cpp preprocessed file is in the attachment. the source code is shown as below: == templatetypename T class W{ protected: T* p; public: W() { p=new T(); } ~W() { if(p) delete p; } auto test1(int i) - decltype(p-get(i)) { return p-get(i); } templatetypename Taint test2(Ta i) { return p-get(i); } #if 1// bug in g++ 4.4, 4.5 4.6 #define TESTCASE3 templatetypename Taauto test3(Ta i) - decltype(p-get(i)) { return p-get(i); } #endif #if 1 // bug in g++ 4.4 4.5 #define TESTCASE4 // this is an ugly workground for 4.6 templatetypename Taauto test4(Ta i) - decltype(((T*)0)-get(i)) { return p-get(i); } #endif }; class A; typedef WA B; class A{ protected: int _i; public: A():_i(0) {} A(int i):_i(i) {} int get(int i)const { return _i-i; } }; int main() { int s; B b; s+=b.test1(0); s+=b.test2(0); #ifdef TESTCASE3 s+=b.test3(0); #endif #ifdef TESTCASE4 s+=b.test4(0); #endif return s; } == While test1(), test2() are all ok for g++ -std=c++0x from 4.4 to 4.6, test3() is rejected by all, and test4() is accepted only by 4.6. G++4.6 gives a strange error message for test3() such as tmpl_decl.cpp:3:5: error: ‘A* WA::p’ is protected, while it accepts p in test1(). btw, g++ 4.4, 4.5 both reject test3() and test4() with other error messages, so this is not a regression error. output of g++ -v -save-temps -std=c++0x -c tmpl_decl.cpp == Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.6.0-3~ppa1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.1 20110409 (prerelease) (Ubuntu 4.6.0-3~ppa1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/cc1plus -E -quiet -v -D_GNU_SOURCE tmpl_decl.cpp -mtune=generic -march=x86-64 -std=c++0x -fpch-preprocess -fstack-protector -o tmpl_decl.ii ignoring nonexistent directory /usr/local/include/x86_64-linux-gnu ignoring nonexistent directory /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../../../x86_64-linux-gnu/include #include ... search starts here: #include ... search starts here: /usr/include/c++/4.6 /usr/include/c++/4.6/x86_64-linux-gnu /usr/include/c++/4.6/backward /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/include /usr/local/include /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/cc1plus -fpreprocessed tmpl_decl.ii -quiet -dumpbase tmpl_decl.cpp -mtune=generic -march=x86-64 -auxbase tmpl_decl -std=c++0x -version -fstack-protector -o tmpl_decl.s GNU C++ (Ubuntu 4.6.0-3~ppa1) version 4.6.1 20110409 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110409 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=62982 GNU C++ (Ubuntu 4.6.0-3~ppa1) version 4.6.1 20110409 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110409 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9
[Bug middle-end/49029] [4.6/4.7 Regression] ICE in simplify_subreg, at simplify-rtx.c:5266
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49029 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Target Milestone|--- |4.6.1 Summary|ICE in simplify_subreg, at |[4.6/4.7 Regression] ICE in |simplify-rtx.c:5266 |simplify_subreg, at ||simplify-rtx.c:5266 --- Comment #2 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 10:11:16 UTC --- I can reproduce with the trunk and 4.6 branch, works with 4.4, assuming it started with -fstrict-volatile-bitfields addition.
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 __vic d.v.a at ngs dot ru changed: What|Removed |Added Status|RESOLVED|CLOSED --- Comment #19 from __vic d.v.a at ngs dot ru 2011-05-18 10:35:51 UTC --- (In reply to comment #18) (In reply to comment #15) The following code would work anyway: No, it would make this ambiguous: #include cstring using namespace std; int main() { strchr(foo, 'f'); } (In reply to comment #16) Yes, workaround is obvious: add the const_cast to the return value. But is there a way to do without it? Only with assistance from the C library, which is why this is a dup of PR 33935 Yeah. Seems like it's not possible to do if C-library implementer didn't care about this...
[Bug libstdc++/33935] overloads in C headers
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33935 --- Comment #6 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 10:08:22 UTC --- *** Bug 49020 has been marked as a duplicate of this bug. ***
[Bug middle-end/48989] [4.7 Regression] FAIL: gfortran.dg/lto/pr46036 f_lto_pr46036_0.o assemble
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48989 --- Comment #4 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 10:36:50 UTC --- Author: rguenth Date: Wed May 18 10:36:45 2011 New Revision: 173854 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173854 Log: 2011-05-18 Richard Guenther rguent...@suse.de PR middle-end/48989 * tree-cfg.c (verify_gimple_assign_unary): Adjust TRUTH op operand verification. (verify_gimple_assign_binary): Likewise. * tree-ssa.c (useless_type_conversion_p): Preserve conversions to non-1-precision BOOLEAN_TYPEs. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-cfg.c trunk/gcc/tree-ssa.c
[Bug libstdc++/49037] SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49037 --- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-18 10:31:46 UTC --- The static data members aren't initialized before they're first used and I don't see an easy way to fix it. I agree with Paolo. At the very least we should mark it _GLIBCXX_DEPRECATED
[Bug libstdc++/49020] Invalid std::strchr prototype in cstring
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49020 --- Comment #18 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-18 10:22:42 UTC --- (In reply to comment #15) The following code would work anyway: No, it would make this ambiguous: #include cstring using namespace std; int main() { strchr(foo, 'f'); } (In reply to comment #16) Yes, workaround is obvious: add the const_cast to the return value. But is there a way to do without it? Only with assistance from the C library, which is why this is a dup of PR 33935
[Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Known to work|| --- Comment #16 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 10:48:08 UTC --- I don't see any calls to func() for the original testcase that survive at -O2 or -Os for 4.5, 4.6 and current trunk.
[Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48207 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added CC||vincenzo.innocente at cern ||dot ch --- Comment #8 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 11:08:35 UTC --- *** Bug 49041 has been marked as a duplicate of this bug. ***
[Bug lto/49041] ICE when compiling with lto
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49041 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||DUPLICATE --- Comment #1 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 11:08:35 UTC --- dup. *** This bug has been marked as a duplicate of bug 48207 ***
[Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494 --- Comment #17 from Jing Yu jingyu at google dot com 2011-05-18 11:06:35 UTC --- I am on leave from 02/01/2011 to 05/30/2011. I may not reply your email during this period. If you have Android toolchain questions/issues/requests, please contact Doug (dougk...@google.com) or my manager Bhaskar (bjanakira...@google.com). Thanks, Jing
[Bug c++/49042] wrong protected in c++0x when using template and decltype
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49042 Jonathan Wakely redi at gcc dot gnu.org changed: What|Removed |Added Keywords||rejects-valid Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.18 11:30:27 Ever Confirmed|0 |1 --- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2011-05-18 11:30:27 UTC --- possibly related to PR 48884 and PR 49003
[Bug tree-optimization/41881] [4.5/4.6/4.7 regression] Complete unrolling (inner) versus vectorization of reduction
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41881 --- Comment #10 from irar at gcc dot gnu.org 2011-05-18 11:27:56 UTC --- Author: irar Date: Wed May 18 11:27:51 2011 New Revision: 173856 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173856 Log: PR tree-optimization/41881 * tree-vectorizer.h (struct _loop_vec_info): Add new field reduction_chains along with a macro for its access. * tree-vect-loop.c (new_loop_vec_info): Initialize reduction chains. (destroy_loop_vec_info): Free reduction chains. (vect_analyze_loop_2): Return false if vect_analyze_slp() returns false. (vect_is_slp_reduction): New function. (vect_is_simple_reduction_1): Call vect_is_slp_reduction. (vect_create_epilog_for_reduction): Support SLP reduction chains. * tree-vect-slp.c (vect_get_and_check_slp_defs): Allow different definition types for reduction chains. (vect_supported_load_permutation_p): Don't allow permutations for reduction chains. (vect_analyze_slp_instance): Support reduction chains. (vect_analyze_slp): Try to build SLP instance from reduction chains. (vect_get_constant_vectors): Handle reduction chains. (vect_schedule_slp_instance): Mark the first statement of the reduction chain as reduction. Added: trunk/gcc/testsuite/gcc.dg/vect/O3-pr41881.c trunk/gcc/testsuite/gcc.dg/vect/O3-slp-reduc-10.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-vect-loop.c trunk/gcc/tree-vect-slp.c trunk/gcc/tree-vectorizer.h
[Bug c/49016] always_inline causes references below the current stack pointer
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49016 Michael Matz matz at gcc dot gnu.org changed: What|Removed |Added CC||matz at gcc dot gnu.org --- Comment #13 from Michael Matz matz at gcc dot gnu.org 2011-05-18 11:51:35 UTC --- The flag is for the compiler and tells it to no use (as in clobber) the red-zone.
[Bug libstdc++/49037] SEGV within __gnu_cxx::bitmap_allocator if used within in constructor of global static
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49037 --- Comment #4 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 11:30:15 UTC --- Jon, if you want to send to the mailing list the deprecation bits, just to make sure we are all on the same page on this, it would be great. Really, I never really liked this code, and I don't see who is going to spend time on it in the foreseeable future.
[Bug tree-optimization/41881] [4.5/4.6/4.7 regression] Complete unrolling (inner) versus vectorization of reduction
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41881 Ira Rosen irar at il dot ibm.com changed: What|Removed |Added CC||irar at il dot ibm.com --- Comment #11 from Ira Rosen irar at il dot ibm.com 2011-05-18 11:51:41 UTC --- This patch enables vectorization of reduction in SLP making the unrolled loop in fun2 vectorizable.
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 11:56:45 UTC --- -O -ftree-vrp is broken, -O works. VRP1 performs quite some jump threading.
[Bug rtl-optimization/49028] Missed optimization of pointer arithmetic
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49028 --- Comment #3 from Piotr Wyderski piotr.wyderski at gmail dot com 2011-05-18 12:02:58 UTC --- (In reply to comment #2) Maybe we can do some generic clever tricks to (A /[ex] CST1) % CST2? We'd like to re-associate it somehow. Wouldn't it be possible to do add the following subtree replacement rule? *% / \ / \ % BA * / \ = / \ / \ CB C A B It works in contexts where it can be proven that for_all a.(a % b) == 0, which by definition includes b-aligned pointers.
[Bug c++/49043] New: Returns from lambda functions incorrectly detected as exits from OpenMP loops in surrounding code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49043 Summary: Returns from lambda functions incorrectly detected as exits from OpenMP loops in surrounding code Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: bisq...@iki.fi GCC incorrectly considers return statements within lambda functions as exits from an OpenMP structured block. For the code below, this error message is generated: tmp3.cc: In lambda function: tmp3.cc:7:40: error: invalid exit from OpenMP structured block #include iostream int main() { #pragma omp parallel for for(int a=0; a10; ++a) { auto func = [=] () { return a; }; std::cout func(); } } Compiled with: -fopenmp -std=gnu++0x Tested versions: 4.5.3 , 4.6.1 The purpose of this error is to catch exits from an OpenMP construct (return, break, goto). No such thing happens when a lamdba function is called, which is not different from calling an inlined function, therefore the error message is misplaced.
[Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48207 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work||4.6.1 Resolution||FIXED Target Milestone|--- |4.6.1 --- Comment #10 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:30:00 UTC --- Fixed for 4.6.1.
[Bug debug/48703] segfault in canonicalize_for_substitution
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48703 --- Comment #4 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:29:28 UTC --- Author: rguenth Date: Wed May 18 13:29:24 2011 New Revision: 173860 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173860 Log: 2011-05-18 Richard Guenther rguent...@suse.de Backport from mainline 2011-04-19 Richard Guenther rguent...@suse.de PR lto/48207 * tree.c (free_lang_data): Do not reset the decl-assembler-name langhook. * g++.dg/lto/pr48207_0.C: New testcase. 2011-04-21 Richard Guenther rguent...@suse.de PR lto/48703 * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of DECL_NAME. * g++.dg/lto/pr48207-2_0.C: New testcase. * g++.dg/lto/pr48207-3_0.C: Likewise. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-2_0.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-3_0.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207_0.C Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/tree.c
[Bug tree-optimization/49018] Inline assembly block executed outside conditional check with -O1 -ftree-vrp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49018 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Known to work||4.6.1, 4.7.0 Resolution||FIXED Target Milestone|--- |4.6.1 Known to fail||4.6.0 --- Comment #4 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:34:25 UTC --- Fixed.
[Bug tree-optimization/48172] [4.5/4.6 Regression] incorrect vectorization of loop in GCC 4.5.* with -O3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48172 --- Comment #16 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:24:09 UTC --- Author: rguenth Date: Wed May 18 13:24:05 2011 New Revision: 173859 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173859 Log: 2011-05-18 Richard Guenther rguent...@suse.de Backport from mainline 2011-05-12 Richard Guenther rguent...@suse.de PR tree-optimization/48172 * tree-vect-loop-manip.c (vect_vfa_segment_size): Do not exclude the number of iterations from the segment size calculation. (vect_create_cond_for_alias_checks): Adjust. 2011-05-13 Richard Guenther rguent...@suse.de PR tree-optimization/48172 * tree-vect-loop-manip.c (vect_vfa_segment_size): Avoid multiplying by number of iterations for equal step. (vect_create_cond_for_alias_checks): Likewise. * gcc.dg/vect/pr48172.c: New testcase. Added: branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/vect/pr48172.c Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/tree-vect-loop-manip.c
[Bug tree-optimization/49018] Inline assembly block executed outside conditional check with -O1 -ftree-vrp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49018 --- Comment #2 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:33:24 UTC --- Author: rguenth Date: Wed May 18 13:33:21 2011 New Revision: 173861 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173861 Log: 2011-05-18 Richard Guenther rguent...@suse.de PR tree-optimization/49018 * gimple.c (gimple_has_side_effects): Volatile asms have side-effects. * tree-ssa-ifcombine.c (bb_no_side_effects_p): Use gimple_has_side_effects. Modified: trunk/gcc/ChangeLog trunk/gcc/gimple.c trunk/gcc/tree-ssa-ifcombine.c
[Bug debug/48207] ICE in lhd_set_decl_assembler_name, at langhooks.c:158
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48207 --- Comment #9 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:29:27 UTC --- Author: rguenth Date: Wed May 18 13:29:24 2011 New Revision: 173860 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173860 Log: 2011-05-18 Richard Guenther rguent...@suse.de Backport from mainline 2011-04-19 Richard Guenther rguent...@suse.de PR lto/48207 * tree.c (free_lang_data): Do not reset the decl-assembler-name langhook. * g++.dg/lto/pr48207_0.C: New testcase. 2011-04-21 Richard Guenther rguent...@suse.de PR lto/48703 * tree.c (free_lang_data_in_decl): Do not zero TREE_TYPE of DECL_NAME. * g++.dg/lto/pr48207-2_0.C: New testcase. * g++.dg/lto/pr48207-3_0.C: Likewise. Added: branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-2_0.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207-3_0.C branches/gcc-4_6-branch/gcc/testsuite/g++.dg/lto/pr48207_0.C Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/testsuite/ChangeLog branches/gcc-4_6-branch/gcc/tree.c
[Bug middle-end/48989] [4.7 Regression] FAIL: gfortran.dg/lto/pr46036 f_lto_pr46036_0.o assemble
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48989 Richard Guenther rguenth at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED --- Comment #5 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:20:25 UTC --- Fixed.
[Bug tree-optimization/49018] Inline assembly block executed outside conditional check with -O1 -ftree-vrp
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49018 --- Comment #3 from Richard Guenther rguenth at gcc dot gnu.org 2011-05-18 13:33:56 UTC --- Author: rguenth Date: Wed May 18 13:33:53 2011 New Revision: 173862 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173862 Log: 2011-05-18 Richard Guenther rguent...@suse.de PR tree-optimization/49018 * gimple.c (gimple_has_side_effects): Volatile asms have side-effects. * tree-ssa-ifcombine.c (bb_no_side_effects_p): Use gimple_has_side_effects. Modified: branches/gcc-4_6-branch/gcc/ChangeLog branches/gcc-4_6-branch/gcc/gimple.c branches/gcc-4_6-branch/gcc/tree-ssa-ifcombine.c
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #4 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 14:27:08 UTC --- Strange, I can't reproduce the segfault on x86_64-linux on the trunk and in 4.6 it doesn't segfault for me, but fails the assertion (-O2 or -O1 -ftree-vrp, with -O1 or -O0 it works). The problem seems to have started with: http://gcc.gnu.org/viewcvs?root=gccview=revrev=164136 and got on the trunk fixed or made latent with: http://gcc.gnu.org/viewcvs?root=gccview=revrev=171386 Smaller testcase without any includes: template class T1, class T2 struct pair { T1 first; T2 second; pair (const T1 a, const T2 b):first (a), second (b) {} }; template class T1, class T2 inline pair T1, T2 make_pair (T1 x, T2 y) { return pair T1, T2 (x, y); } typedef __SIZE_TYPE__ size_t; struct S { const char *Data; size_t Length; static size_t min (size_t a, size_t b) { return a b ? a : b; } static size_t max (size_t a, size_t b) { return a b ? a : b; } S () :Data (0), Length (0) { } S (const char *Str) : Data (Str), Length (__builtin_strlen (Str)) {} S (const char *data, size_t length) : Data (data), Length (length) {} bool empty () const { return Length == 0; } size_t size () const { return Length; } S slice (size_t Start, size_t End) const { Start = min (Start, Length); End = min (max (Start, End), Length); return S (Data + Start, End - Start); } pair S, S split (char Separator) const { size_t Idx = find (Separator); if (Idx == ~size_t (0)) return make_pair (*this, S ()); return make_pair (slice (0, Idx), slice (Idx + 1, ~size_t (0))); } size_t find (char C, size_t From = 0) const { for (size_t i = min (From, Length), e = Length; i != e; ++i) if (Data[i] == C) return i; return ~size_t (0); } }; void Test (const char *arg) { S Desc (arg); while (!Desc.empty ()) { pair S, S Split = Desc.split ('-'); S Token = Split.first; Desc = Split.second; if (Token.empty ()) continue; Split = Token.split (':'); S Specifier = Split.first; if (Specifier.empty ()) __builtin_abort (); } } int main () { Test (-); return 0; }
[Bug c++/49044] New: [C++0x] mangling overload in decltype
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49044 Summary: [C++0x] mangling overload in decltype Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: len...@yahoo.com.cn Created attachment 24283 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24283 preprocessed file of tmpl_decl2.cpp the source code is shown as below: == templatetypename T class W{ protected: T* p; public: W() { p=new T(); } ~W() { if(p) delete p; } auto test1(int i) - decltype(p-get(i)) { return p-get(i); } templatetypename Taint test2(Ta i) { return p-get(i); } #if 1 // bug in g++ 4.4, 4.5 4.6 #define TESTCASE3 templatetypename Taauto test3(Ta i) - decltype(((T*)0)-get(i)) { return p-get(i); } #endif }; class A; typedef WA B; class A{ protected: int _i; public: A():_i(0) {} int get(int i)const { return _i-i; } int get()const { return _i; } }; int main() { int s; B b; s=b.test1(0); s+=b.test2(0); #ifdef TESTCASE3 s+=b.test3(0); #endif return s; } == This bug is closely realted to the bug 49042. In this bug, TESTCASE3 is the same as the TESTCASE4 in bug 49042. While g++ 4.6 can handle TESTCASE4 in bug 49042, it can not handle in this bug, just because there is two get() in class A. In fact, test2() also involves overloaded A::get() and g++ 4.6 can handle it successfully. However, test3() uses A::get() in decltype and g++ 4.6 rejects it with an error message sorry, unimplemented: mangling overload. I have checked other mangling overload reports in this bugzilla, and I don't find any other cases which gives similar situation. btw, g++ 4.4, 4.5 both reject test3() with other error messages, so this is not a regression error. output of g++ -v -save-temps -std=c++0x -c tmpl_decl2.cpp == Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.6.0-3~ppa1' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-multiarch --with-multiarch-defaults=x86_64-linux-gnu --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib/x86_64-linux-gnu --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib/x86_64-linux-gnu --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix gcc version 4.6.1 20110409 (prerelease) (Ubuntu 4.6.0-3~ppa1) COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/cc1plus -E -quiet -v -D_GNU_SOURCE tmpl_decl2.cpp -mtune=generic -march=x86-64 -std=c++0x -fpch-preprocess -fstack-protector -o tmpl_decl2.ii ignoring nonexistent directory /usr/local/include/x86_64-linux-gnu ignoring nonexistent directory /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/../../../../../x86_64-linux-gnu/include #include ... search starts here: #include ... search starts here: /usr/include/c++/4.6 /usr/include/c++/4.6/x86_64-linux-gnu /usr/include/c++/4.6/backward /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/include /usr/local/include /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/include-fixed /usr/include/x86_64-linux-gnu /usr/include End of search list. COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-c' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.6.1/cc1plus -fpreprocessed tmpl_decl2.ii -quiet -dumpbase tmpl_decl2.cpp -mtune=generic -march=x86-64 -auxbase tmpl_decl2 -std=c++0x -version -fstack-protector -o tmpl_decl2.s GNU C++ (Ubuntu 4.6.0-3~ppa1) version 4.6.1 20110409 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110409 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p8, MPC version 0.9 GGC heuristics: --param ggc-min-expand=63 --param ggc-min-heapsize=62982 GNU C++ (Ubuntu 4.6.0-3~ppa1) version 4.6.1 20110409 (prerelease) (x86_64-linux-gnu) compiled by GNU C version 4.6.1 20110409 (prerelease), GMP version 4.3.2, MPFR version 3.0.0-p8, MPC
[Bug middle-end/48984] [4.7 Regression] Many testsuite failures
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48984 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution||FIXED Target Milestone|--- |4.7.0 --- Comment #5 from H.J. Lu hjl.tools at gmail dot com 2011-05-18 14:54:17 UTC --- Fixed by revision 173854: http://gcc.gnu.org/ml/gcc-cvs/2011-05/msg00633.html
[Bug middle-end/48984] [4.7 Regression] Many testsuite failures
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48984 H.J. Lu hjl.tools at gmail dot com changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|FIXED | --- Comment #6 from H.J. Lu hjl.tools at gmail dot com 2011-05-18 14:55:55 UTC --- Oops. It isn't fixed.
[Bug c++/49044] [C++0x] mangling overload in decltype
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49044 --- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 14:58:25 UTC --- Normally, a sorry message means the issue is known...
[Bug tree-optimization/42494] [4.4 Regression] Missed dead-code-elimination
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42494 --- Comment #18 from Arnaud Lacombe lacombar at gmail dot com 2011-05-18 15:17:48 UTC --- Yes, the original test case is fine now, but not the updated snippet I posted. Maybe should I open a new bug ?
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 15:18:13 UTC --- Asking Jason' help
[Bug c++/49045] New: [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 Summary: [C++0x] unexpected different exception specifier error with noexcept Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: paolo.carl...@oracle.com Hi. I'm seeing an error for this snippet which I cannot understand: templatetypename _Tp void swap(_Tp, _Tp); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(swap(*__a, *__b))); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(swap(*__a, *__b))) { }
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 15:43:33 UTC --- Apparently the second vrp pass incorrectly optimizes away the if (Token.empty ()) continue; test. We have: ... Split$Length_126 = MIN_EXPR Idx_44, Desc$Length_99; if (Split$Length_126 == 0) goto bb 17; else goto bb 9; bb 9: # Split$16$Length_97 = PHI Split$16$Length_43(8) # Split$16$Data_98 = PHI Split$16$Data_45(8) # Desc$Data_133 = PHI Desc$Data_101(8) # Split$Length_51 = PHI Split$Length_126(8) ... in *.reassoc2. *.vrp2 says: Split$Length_24: ~[0, 0] EQUIVALENCES: { Split$Length_126 } (1 elements) Idx_44: VARYING Split$Length_51: ~[0, 0] EQUIVALENCES: { Split$Length_126 } (1 elements) Desc$Length_99: VARYING Split$Length_126: ~[0, 0] ... Folding predicate Split$Length_126 == 0 to 0 Idx_44 and Desc$Length_99 are correctly VARYING, and it is correct that Split$Length_51 is ~[0, 0], but it isn't equivalent to Split$Length_126 in the sense that it has to have the exact same value range.
[Bug tree-optimization/48702] [4.6/4.7 Regression] optimization regression with gcc-4.6 on x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702 --- Comment #20 from davidxl xinliangli at gmail dot com 2011-05-18 15:51:06 UTC --- (In reply to comment #19) On Tue, 17 May 2011, rakdver at kam dot mff.cuni.cz wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702 --- Comment #15 from rakdver at kam dot mff.cuni.cz rakdver at kam dot mff.cuni.cz 2011-05-17 19:26:18 UTC --- Hi, The following patch fixes the problem. Is it ok? as a heuristic, this probably makes sense. Still, it does not fix the problem, just masks it and makes it harder to reproduce, Looks similar to my original workaround, no? We can actually use something like the aliasing non-pointer base Zdenek mentioned upthread. TARGET_MEM_REF has two index operands (where usually TMR_INDEX2 is NULL of TMR_BASE is non-constant). So we could build a TARGET_MEM_REF based off TMR_BASE 0B and move the non-pointer base to TMR_INDEX2. The oracle then should not be able to disambiguate anything (and also no points-to info would be available, which probably doesn't make this the very very best idea either). Richard. This is at the cost of making aliasing info conservative which should at least be modeled in the cost. Given that the alternative iv candidate exist (which does not require such treatment), discarding the troublesome candidate seems reasonable to me. David
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 16:04:51 UTC --- BTW, on the trunk it isn't really fixed, but actually made even worse. Not only is the _126 == 0 test optimized into false, but additionally the test above call to abort is optimized away too. So, if main calls Test (:-); instead of Test (-); (then the testcase should abort rather than succeed), then for trunk with -O2 it incorrectly exits with 0 status.
[Bug fortran/49023] ICE on invalid code with C_ASSOCIATED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49023 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus burnus at gcc dot gnu.org 2011-05-18 16:09:54 UTC --- ==31261== Invalid read of size 8 ==31261==at 0x510673: gfc_resolve_expr (resolve.c:2674) ==31261==by 0x50E37C: resolve_code (resolve.c:9026) That's at first if block gfc_iso_c_func_interface. In this example, one has expr_type == EXPR_ARRAY. I think the following patch should be OK (for F2003, in F2008, the pointer returned by functions also counts as variable). Additionally, one needs to add a check for the second argument; the program crashes for C_ASSOCIATED(x,[y]) at gfc_conv_array_constructor_expr, at fortran/trans-expr.c:4120 --- resolve.c (revision 173865) +++ resolve.c (working copy) @@ -2666,9 +2666,8 @@ gfc_iso_c_func_interface (gfc_symbol *sy gfc_typespec *arg_ts; symbol_attribute arg_attr; - if (args-expr-expr_type == EXPR_CONSTANT - || args-expr-expr_type == EXPR_OP - || args-expr-expr_type == EXPR_NULL) + if (args-expr-expr_type != EXPR_VARIABLE + || args-expr-symtree-n.sym-attr.flavor != FL_VARIABLE) { gfc_error (Argument to '%s' at %L is not a variable, sym-name, (args-expr-where));
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org |gnu.org | --- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 16:46:09 UTC --- Ok, I think I see the bug. extract_range_from_binary_expr is called with MIN_EXPR, where vr0 is ~[-1UL, -1UL] and vr1 is ~[0, 0] and performs: /* For operations that make the resulting range directly proportional to the original ranges, apply the operation to the same end of each range. */ min = vrp_int_const_binop (code, vr0.min, vr1.min); max = vrp_int_const_binop (code, vr0.max, vr1.max); which for MIN_EXPR unsurprisingly gives min 0 max 0 and thus returns ~[0, 0] although it should have been VARYING in this case. For PLUS we already give up for VR_ANTI_RANGE earlier: if (code == PLUS_EXPR vr0.type == VR_ANTI_RANGE) { set_value_range_to_varying (vr); return; } but we don't do so for MIN_EXPR/MAX_EXPR. For MAX_EXPR the same ranges will give similarly incorrect result: MAX_EXPR ~[-1UL, -1UL], ~[0, 0] will yield ~[-1UL, -1UL] instead of correct VARYING. So, either we can just remove code == PLUS_EXPR and give up with VR_ANTI_RANGE always, or if there is a way to do something better we could do so. I'll think about it some more. E.g. for MIN_EXPR/MAX_EXPR, if the anti ranges are the same we can certainly return that anti range instead of VARYING.
[Bug c/49046] New: code fragment with inline assembly seg faults gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49046 Summary: code fragment with inline assembly seg faults gcc Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: st...@acroname.com Created attachment 24284 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24284 source file that causes segmentation fault Enclosed is a complete file with details. This contains a minimized program that re-creates the crash. The version, compile line, and details are included a comment in the file.
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 16:55:20 UTC --- Shorter testcase: /* PR tree-optimization/49039 */ extern void abort (void); int cnt; __attribute__((noinline, noclone)) void foo (unsigned int x, unsigned int y) { unsigned int minv, maxv; if (x == 0 || y == -1U) return; minv = x y ? x : y; maxv = x y ? x : y; if (minv == 0) ++cnt; if (maxv == -1U) ++cnt; } int main () { foo (-1U, 0); if (cnt != 2) abort (); return 0; }
[Bug c++/49015] [C++0x] Non-defining constexpr function declarations require complete argument/return types
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49015 --- Comment #1 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 17:19:19 UTC --- Author: jason Date: Wed May 18 17:19:15 2011 New Revision: 173869 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173869 Log: PR c++/48948 PR c++/49015 * class.c (finalize_literal_type_property): Do check for constexpr member functions of non-literal class. (finish_struct): Don't call check_deferred_constexpr_decls. * cp-tree.h: Don't declare it. (DECL_DEFERRED_CONSTEXPR_CHECK): Remove. * decl.c (grok_special_member_properties): Don't check it (grokfnedcl): Don't call validate_constexpr_fundecl. (start_preparsed_function): Do call it. * pt.c (tsubst_decl): Don't call it. (instantiate_class_template_1): Don't call check_deferred_constexpr_decls. * semantics.c (literal_type_p): Check for any incompleteness. (ensure_literal_type_for_constexpr_object): Likewise. (is_valid_constexpr_fn): Revert deferral changes. (validate_constexpr_fundecl): Likewise. (register_constexpr_fundef): Likewise. (check_deferred_constexpr_decls): Remove. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
[Bug debug/49047] New: DW_AT_linkage_name missing for constructors and destructors
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49047 Summary: DW_AT_linkage_name missing for constructors and destructors Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: debug AssignedTo: unassig...@gcc.gnu.org ReportedBy: tro...@gcc.gnu.org Compile this with -g: struct K { K () { } ~K () { } int m () { return 5; } }; K k; If you run 'readelf -wi' on it, you will see that 'm' has a linkage name: 266: Abbrev Number: 5 (DW_TAG_subprogram) 67 DW_AT_external: 1 68 DW_AT_name: m 6a DW_AT_decl_file : 1 6b DW_AT_decl_line : 6 6c DW_AT_MIPS_linkage_name: (indirect string, offset: 0x76): _ZN1K1mEv However, the constructors and destructor do not.
[Bug c++/48948] [C++0x] constexpr friend function cannot be defined in-class
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48948 --- Comment #9 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 17:19:19 UTC --- Author: jason Date: Wed May 18 17:19:15 2011 New Revision: 173869 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173869 Log: PR c++/48948 PR c++/49015 * class.c (finalize_literal_type_property): Do check for constexpr member functions of non-literal class. (finish_struct): Don't call check_deferred_constexpr_decls. * cp-tree.h: Don't declare it. (DECL_DEFERRED_CONSTEXPR_CHECK): Remove. * decl.c (grok_special_member_properties): Don't check it (grokfnedcl): Don't call validate_constexpr_fundecl. (start_preparsed_function): Do call it. * pt.c (tsubst_decl): Don't call it. (instantiate_class_template_1): Don't call check_deferred_constexpr_decls. * semantics.c (literal_type_p): Check for any incompleteness. (ensure_literal_type_for_constexpr_object): Likewise. (is_valid_constexpr_fn): Revert deferral changes. (validate_constexpr_fundecl): Likewise. (register_constexpr_fundef): Likewise. (check_deferred_constexpr_decls): Remove. Added: trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/class.c trunk/gcc/cp/cp-tree.h trunk/gcc/cp/decl.c trunk/gcc/cp/pt.c trunk/gcc/cp/semantics.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
[Bug libstdc++/49048] New: setprecision rounding fails in some cases
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 Summary: setprecision rounding fails in some cases Product: gcc Version: unknown Status: UNCONFIRMED Severity: major Priority: P3 Component: libstdc++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: s.ceci...@gmail.com cecilio@pp1:~$ gcc --version gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3 I'm having problems with truncation. For instance, following code: cout test precision 5798.12500: fixed setprecision(2) setfill(' ') setw(10) 5798.12500 endl; cout test precision 5798.87500: fixed setprecision(2) setfill(' ') setw(10) 5798.87500 endl; Generates inconsistent results: 5798.12 (wrong, should be 5798.13) and 5798.88 (right). In first case rounds up and in second, down. The same code, compiled with Microsft Visual Studio, produces the right results in the same machine.
[Bug target/49049] New: ICE in copyprop_hardreg_forward_1, at regcprop.c:767
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49049 Summary: ICE in copyprop_hardreg_forward_1, at regcprop.c:767 Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassig...@gcc.gnu.org ReportedBy: rmansfi...@qnx.com Host: x86_64-linux-gnu Target: arm-unknown-linux-gnueabi Build: x86_64-linux-gnu Created attachment 24285 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24285 preprocessed source $ ./xgcc -v Using built-in specs. COLLECT_GCC=./xgcc Target: arm-unknown-linux-gnueabi Configured with: ../configure --target=arm-unknown-linux-gnueabi --prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi --with-sysroot=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi//sys-root --disable-multilib --with-local-prefix=/home/ryan/x-tools/arm-unknown-linux-gnueabi/arm-unknown-linux-gnueabi/sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace target_alias=arm-unknown-linux-gnueabi --enable-languages=c++ --disable-shared --disable-libmudflap --disable-libssp Thread model: posix gcc version 4.7.0 20110517 (experimental) [trunk revision 173832] (GCC) $ ./xgcc -B. ~/ice.i -O3 /home/ryan/ice.i: In function 'foo': /home/ryan/ice.i:28:1: error: insn does not satisfy its constraints: (insn 98 35 37 3 (set (reg:SI 4 r4 [195]) (minus:SI (const_int 4 [0x4]) (const_int 861 [0x35d]))) /home/ryan/ice.i:6 29 {*arm_subsi3_insn} (nil)) /home/ryan/ice.i:28:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:767 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions.
[Bug c++/49039] [4.6/4.7 Regression] LLVM StringRef miscompilation with -O2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49039 --- Comment #9 from Jakub Jelinek jakub at gcc dot gnu.org 2011-05-18 17:40:24 UTC --- Created attachment 24286 -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=24286 gcc46-pr49039.patch Untested fix.
[Bug c++/49027] g++ ignores -fno-exceptions in uninstantiated template
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49027 --- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org 2011-05-18 17:36:18 UTC --- IIRC this was done on purpose but I cannot find the original discussion.
[Bug c++/49015] [C++0x] Non-defining constexpr function declarations require complete argument/return types
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49015 Jason Merrill jason at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||jason at gcc dot gnu.org Resolution||FIXED AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org |gnu.org | --- Comment #2 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 17:47:58 UTC --- Fixed.
[Bug c/49046] code fragment with inline assembly seg faults gcc
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49046 --- Comment #1 from Steve Richards steve at acroname dot com 2011-05-18 17:40:54 UTC --- I simplified this down to the following code that segment faults: --- begin foo.c --- int main(const int argc, const char* argv[]) { asm (adr r2, #0x10002101); return 0; } --- end foo.c --- The compile line for this is: $ arm-none-eabi-gcc -c -mcpu=cortex-m3 -mthumb foo.c
[Bug fortran/49050] New: ICE with deferred character length derived type component
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49050 Summary: ICE with deferred character length derived type component Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: ka...@gcc.gnu.org The following code gives an ICE. I haven't check it against the standard yet to determine if this is valid or invalid code. Nonetheless, it should not ICE. module simple_module implicit none type :: item_type character(len=:), allocatable :: key end type item_type end module simple_module program test_simple use simple_module implicit none type(item_type) :: item ! ICE item = item_type('key') ! item%key = 'key' end program
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 --- Comment #2 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 18:03:17 UTC --- Hmm, that's tricky. G++ is saying that the two exception-specifications are different because the unqualified lookups for swap differ, because the latter one also finds the middle declaration. This seems like a core issue.
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 --- Comment #3 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 18:12:46 UTC --- Eh, interesting indeed. By the way, can you imagine a possible workaround for implementing in the library the swap overload for arrays while also declaring it?
[Bug libstdc++/49048] setprecision rounding fails in some cases
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49048 Paolo Carlini paolo.carlini at oracle dot com changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID --- Comment #1 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 17:55:34 UTC --- If anything, this is a glibc issue, because we use printf as an implementation detail. Try 'printf(%.2f, 5798.12500)'
[Bug fortran/49050] ICE with deferred character length derived type component
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49050 kargl at gcc dot gnu.org changed: What|Removed |Added Known to fail||4.6.1, 4.7.0 --- Comment #1 from kargl at gcc dot gnu.org 2011-05-18 18:04:23 UTC --- ev.f90: In function 'test_simple': ev.f90:8:0: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:2298 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html for instructions. (gdb) bt #0 gfc_get_derived_type (derived=0x202097380) at ../../gcc4x/gcc/fortran/trans-types.c:2325 #1 0x005451cc in gfc_get_module_backend_decl (sym=0x202097700) at ../../gcc4x/gcc/fortran/trans-decl.c:690 #2 0x005881eb in gfc_get_derived_type (derived=0x202097700) at ../../gcc4x/gcc/fortran/trans-types.c:2216 #3 0x00588752 in gfc_typenode_for_spec (spec=0x202097c60) at ../../gcc4x/gcc/fortran/trans-types.c:1049 #4 0x005b in gfc_sym_type (sym=0x202097c40) at ../../gcc4x/gcc/fortran/trans-types.c:1983 #5 0x005498e5 in gfc_get_symbol_decl (sym=0x202097c40) at ../../gcc4x/gcc/fortran/trans-decl.c:1303 #6 0x0054a722 in generate_local_decl (sym=0x202097c40) at ../../gcc4x/gcc/fortran/trans-decl.c:4207 #7 0x005155de in traverse_ns (st=0x2020073d0, func=0x54a460 generate_local_decl) at ../../gcc4x/gcc/fortran/symbol.c: #8 0x005155cf in traverse_ns (st=0x202007310, func=0x54a460 generate_local_decl) at ../../gcc4x/gcc/fortran/symbol.c:3330 #9 0x005155cf in traverse_ns (st=0x202007340, func=0x54a460 generate_local_decl) at ../../gcc4x/gcc/fortran/symbol.c:3330 #10 0x0054c834 in gfc_generate_function_code (ns=0x2021ab600) at ../../gcc4x/gcc/fortran/trans-decl.c:4900 #11 0x004ed9da in gfc_parse_file () at ../../gcc4x/gcc/fortran/parse.c:4271 #12 0x0052466e in gfc_be_parse_file () at ../../gcc4x/gcc/fortran/f95-lang.c:250 #13 0x00877ca2 in do_compile () at ../../gcc4x/gcc/toplev.c:570 #14 0x008788c5 in toplev_main (argc=2, argv=0x7fffd508) (gdb) list 2321{ 2322 if (c-ts.type == BT_CHARACTER) 2323{ 2324 /* Evaluate the string length. */ 2325 gfc_conv_const_charlen (c-ts.u.cl); 2326 gcc_assert (c-ts.u.cl-backend_decl); 2327} 2328 2329 field_type = gfc_typenode_for_spec (c-ts); 2330} (gdb) print c-ts.u.cl-backend_decl $6 = 0x0 (gdb) print *c-ts.u.cl $8 = {length = 0x0, next = 0x0, length_from_typespec = 0 '\0', backend_decl = 0x0, passed_length = 0x0, resolved = 1}
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 --- Comment #4 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 18:21:39 UTC --- A workaround would be to use a forwarding function: templatetypename _Tp void swap(_Tp, _Tp); templateclass T void __do_swap(T a,T b) { swap(a,b); } templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(__do_swap(*__a, *__b))); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(__do_swap(*__a, *__b))) { }
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 --- Comment #5 from Jason Merrill jason at gcc dot gnu.org 2011-05-18 18:24:31 UTC --- Or, rather: templatetypename _Tp void swap(_Tp, _Tp); templateclass T void __swap_dummy(T a,T b) noexcept(noexcept(swap(a,b))); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(__swap_dummy(*__a, *__b))); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(noexcept(__swap_dummy(*__a, *__b))) { swap(*__a,*__b); } - __swap_dummy doesn't actually need a body, but it does need a noexcept-specifier.
[Bug fortran/49050] ICE with deferred character length derived type component
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49050 --- Comment #3 from Tobias Burnus burnus at gcc dot gnu.org 2011-05-18 18:31:39 UTC --- For a variant (original, longer version), see: http://gcc.gnu.org/ml/fortran/2011-05/msg00129.html (That program compiles and runs w/o valgrind errors with ifort 11.1)
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 Daniel Krügler daniel.kruegler at googlemail dot com changed: What|Removed |Added CC||daniel.kruegler at ||googlemail dot com --- Comment #6 from Daniel Krügler daniel.kruegler at googlemail dot com 2011-05-18 18:35:09 UTC --- (In reply to comment #3) I found a similar approach to Jason based on a helper trait: templatetypename _Tp void swap(_Tp, _Tp); templatetypename _Tp struct __is_nothrow_swappable { static const bool value = noexcept(swap(std::declval_Tp(), std::declval_Tp())); }; templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(__is_nothrow_swappable_Tp::value); templatetypename _Tp, __SIZE_TYPE__ _Nm void swap(_Tp (__a)[_Nm], _Tp (__b)[_Nm]) noexcept(__is_nothrow_swappable_Tp::value) { }
[Bug fortran/49050] ICE with deferred character length derived type component
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49050 Tobias Burnus burnus at gcc dot gnu.org changed: What|Removed |Added CC||burnus at gcc dot gnu.org --- Comment #2 from Tobias Burnus burnus at gcc dot gnu.org 2011-05-18 18:29:49 UTC --- See also: PR 45170. It is known that deferred character length components do not work - they have not been implemented. I think we really should add a gfc_error(Sorry not implemented) as it is not the first such bug has been reported. * * * By the way, the documentation states this - albeit a bit hidden: http://gcc.gnu.org/gcc-4.6/changes.html#fortran http://gcc.gnu.org/wiki/GFortran#GCC4.6 Deferred type parameter: For scalar allocatable and pointer variables the character length can be deferred. (In particular: For components and for arrays, the length cannot be deferred.) And a bit more explicitly: http://gcc.gnu.org/wiki/Fortran2003Status http://gcc.gnu.org/onlinedocs/gfortran/Fortran-2003-status.html
[Bug middle-end/45098] Missed induction variable optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45098 --- Comment #3 from vries at gcc dot gnu.org 2011-05-18 18:27:15 UTC --- Author: vries Date: Wed May 18 18:27:11 2011 New Revision: 173872 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173872 Log: 2011-05-18 Tom de Vries t...@codesourcery.com PR target/45098 * tree-ssa-loop-ivopts.c (computation_cost): Prevent cost of 0. Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-loop-ivopts.c
[Bug fortran/48700] memory leak with MOVE_ALLOC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48700 --- Comment #7 from janus at gcc dot gnu.org 2011-05-18 18:51:11 UTC --- Author: janus Date: Wed May 18 18:51:08 2011 New Revision: 173874 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=173874 Log: 2011-05-18 Janus Weil ja...@gcc.gnu.org PR fortran/48700 * trans-intrinsic.c (gfc_conv_intrinsic_move_alloc): Deallocate 'TO' argument to avoid memory leaks. 2011-05-18 Janus Weil ja...@gcc.gnu.org PR fortran/48700 * gfortran.dg/move_alloc_4.f90: New. Added: trunk/gcc/testsuite/gfortran.dg/move_alloc_4.f90 Modified: trunk/gcc/fortran/trans-intrinsic.c
[Bug c++/49045] [C++0x] unexpected different exception specifier error with noexcept
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49045 --- Comment #7 from Paolo Carlini paolo.carlini at oracle dot com 2011-05-18 18:40:35 UTC --- Ok guys. Thanks a lot for the suggestions, indeed should figured out both myself, eh! ;)
[Bug fortran/48700] memory leak with MOVE_ALLOC
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48700 --- Comment #8 from janus at gcc dot gnu.org 2011-05-18 19:23:01 UTC --- r173874 should fix the issue mentioned in comment #2, but the problem with allocatable arrays in comment #5 is still present.
[Bug c++/49051] New: Doesn't SFINAE away an invalid substitution into toplevel parameter type T[N]
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49051 Summary: Doesn't SFINAE away an invalid substitution into toplevel parameter type T[N] Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: schaub.johan...@googlemail.com GCC incorrectly fails to compile this code templatetypename T void f(T[1]) = delete; templatetypename T void f(...); int main() { fvoid(0); } The substitution into T should fail, because T[1] is an invalid type, and hence the call should use the second template. Note that I think it's unspecified in the spec what happens when we tweak things as follows templatetypename T void f(T[1]) = delete; templatetypename T void f(T*); templatetypename T void f(...); int main() { fvoid(0); } The first two templates are equivalent, but behave different during substitution. The spec doesn't specify what the outcome of this is, I think.
[Bug fortran/48946] [OOP] Deferred Overloaded Assignment
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48946 janus at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2011.05.18 20:06:33 Ever Confirmed|0 |1 --- Comment #1 from janus at gcc dot gnu.org 2011-05-18 20:06:33 UTC --- (In reply to comment #0) The FE wrongly resolves the operator, leading to wrong code in the sense that the linker cannot find the symbol: undefined reference to `assign_interface_' The dump shows that the assignment one = two is incorrectly translated to: struct __class_foo_module_Foo class.1; struct __class_foo_module_Foo class.0; class.0._vptr = (struct __vtype_foo_module_Foo * {ref-all}) __vtab_bar_module_Bar; class.0._data = (struct foo *) one; class.1._vptr = (struct __vtype_foo_module_Foo * {ref-all}) __vtab_bar_module_Bar; class.1._data = (struct foo *) two; assign_interface (class.0, class.1); First we generate two temporaries to convert the TYPE variables to CLASS arguments, which is fine. However, the last line should be a polymorphic call like class.0._vptr-assign (class.0, class.1); Btw, it works when making the first argument polymorphic: program main use bar_module implicit none class(bar), allocatable :: one type(bar) :: two allocate(one) one%x = 1 two%x = 2 one = two end program