[Bug c/20961] New: ICE on pragma weak/__attribute__((weak))
The following program fails on x86_64-unknown-linux-gnu but succeedes on x86-unknown-linux-gnu with the prerelease. > /dept/rnd/vendor/gcc-4.0.0pre1-amd64/bin/gcc -c bug.C gcc: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. See http://gcc.gnu.org/bugs.html> for instructions. bug.C int foo(); #pragma weak foo __attribute__((weak)) int foo() { return 0; } > /dept/rnd/vendor/gcc-4.0.0pre1-amd64/bin/gcc -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.0.0-20050410/configure --enable-languages=c,c++ --prefix=/dept/rnd/vendor/gcc-4.0.0-20050410-amd64 --enable-threads Thread model: posix gcc version 4.0.0 20050410 (prerelease) -- Summary: ICE on pragma weak/__attribute__((weak)) Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20961
[Bug c/20961] ICE on pragma weak/__attribute__((weak))
--- Additional Comments From nick at ilm dot com 2005-04-12 02:37 --- I meant to say that it succedes with i686-pc-linux-gnu not x86-unknown-linux-gnu > /dept/rnd/vendor/gcc-4.0.0-20050410/bin/gcc -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0.0-20050410/configure --enable-languages=c,c++ --prefix=/dept/rnd/vendor/gcc-4.0.0-20050410 --enable-threads Thread model: posix gcc version 4.0.0 20050410 (prerelease) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20961
[Bug c++/20961] ICE on pragma weak/__attribute__((weak))
--- Additional Comments From nick at ilm dot com 2005-04-12 02:42 --- mislabeled as c - should be c++ compiling as c on x86_64-unknown-linux-gnu succedes compiling as c++ on x86_64-unknown-linux-gnu fails compiling as c on i686-pc-linux-gnu succedes compiling as c++ on i686-pc-linux-gnu succedes -- What|Removed |Added Component|c |c++ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20961
[Bug c++/21012] New: [4.0 regression] incorrect name lookup from nested struct
> /dept/rnd/vendor/gcc-4.0.0pre1-amd64/bin/g++ -c bug.C -o /dev/null bug.C: In member function 'int B::Foo::foo()': bug.C:9: error: 'int B::Foo::Bar::v' is protected bug.C:12: error: within this context > /dept/rnd/vendor/gcc-4.0.0pre1-amd64/bin/g++ -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.0.0-20050410/configure --enable-languages=c,c++ --prefix=/dept/rnd/vendor/gcc-4.0.0-20050410-amd64 --enable-threads Thread model: posix gcc version 4.0.0 20050410 (prerelease) > cat bug.C namespace A { struct Foo {}; } namespace B { struct Foo : public A::Foo { public: struct Bar { friend struct Foo; protected: int v; }; Bar bar; int foo () { return bar.v; } }; } I believe that friend struct Foo should refer to B::Foo but it seems to instead refer to A::Foo. This code compiles correctly on gcc-3.4.1. -- Summary: [4.0 regression] incorrect name lookup from nested struct Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21012
[Bug c++/21012] [4.0 regression] incorrect name lookup from nested struct
-- What|Removed |Added Keywords||rejects-valid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21012
[Bug rtl-optimization/14868] ICE with -msse2 -mfpmath=sse -fnon-call-exceptions
--- Additional Comments From nick at ilm dot com 2005-04-14 02:15 --- testcase compiles successfuly with gcc-4.0.0-20050410 on x68 and amd64, removed 4.0.0 from known to fail line. -- What|Removed |Added Known to fail|3.2.3 3.2.2 3.3.3 4.0.0 |3.2.3 3.2.2 3.3.3 3.3.1 |3.3.1 3.4.0 |3.4.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14868
[Bug rtl-optimization/21169] New: [4.0 regression] ICE in reload_cse_simplify_operands with -fnon-call-exceptions -fPIC -O2
The following code compiles successfully under gcc-3.4.3 on amd64: > cat bug.C float foo(); int _numTransitions; int _offset; void bar(int &base) { float tmp = foo(); tmp -= (float)_offset; if (tmp < 0.0) tmp = 0.0; if (tmp > (float)(_numTransitions-1)) tmp = (float)(_numTransitions-1); base = (int) tmp; } > /dept/rnd/vendor/gcc-4.0.0-amd64/bin/g++ -fnon-call-exceptions -fPIC -O2 -c bug.C -o /dev/null bug.C: In function 'void bar(int&)': bug.C:15: error: insn does not satisfy its constraints: (insn 67 35 36 0 (set (reg:SF 24 xmm3) (lt:SF (reg/v:SF 22 xmm1 [orig:60 tmp ] [60]) (reg:SF 23 xmm2 [65]))) 487 {*sse_setccsf} (nil) (nil)) bug.C:15: internal compiler error: in reload_cse_simplify_operands, at postreload.c:391 Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. > /dept/rnd/vendor/gcc-4.0.0-amd64/bin/g++ -v Using built-in specs. Target: x86_64-unknown-linux-gnu Configured with: ../gcc-4.0.0/configure --prefix=/dept/rnd/vendor/gcc-4.0.0-amd64 --enable-threads --enable-languages=c,c++ Thread model: posix gcc version 4.0.0 -- Summary: [4.0 regression] ICE in reload_cse_simplify_operands with -fnon-call-exceptions -fPIC -O2 Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21169
[Bug c++/19731] New: arguments incorrectly named in static member specialization
It looks like in the specialization of a static template member of a template class, the argument names are used from the original declaration, rather than from the specialization declaration. template struct W { template static S getAsS(const T &v_orig); }; template <> template inline S W::getAsS(const float &v_spec) { return S(v_spec); } the above code compiles on 3.3, but does not compile under 3.4.2 and 3.4.3: foo.C: In static member function `static S W::getAsS(const T&) [with S = S, T = float]': foo.C:10: error: `v_spec' undeclared (first use this function) foo.C:10: error: (Each undeclared identifier is reported only once for each function it appears in.) if you change the second to last line to: return S(v_orig); (using the variable name from the original declaration) the code erroneously compiles under 3.4.1, 3.4.2, even if the function gets instantiated. -nick -- Summary: arguments incorrectly named in static member specialization Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19731
[Bug c++/19731] arguments incorrectly named in static member specialization
-- What|Removed |Added Keywords||accepts-invalid, rejects- ||valid http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19731
[Bug c++/19744] New: ICE in if_convert with -fnon-call-exceptions -O2 on amd64
I'm running into an ICE on amd64 > /dept/rnd/vendor/gcc-3.4.3-amd64/bin/g++ -fnon-call-exceptions -O2 -g -c > test.C test.C: In member function `void M::foo() const': test.C:19: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. it's also reproducable on x86 with -msse > /dept/rnd/vendor/gcc-3.4.3/bin/g++ -msse -fnon-call-exceptions -O2 -g -c > test.C test.C: In member function `void M::foo() const': test.C:19: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See http://gcc.gnu.org/bugs.html> for instructions. on the flollowing the following code: struct E {}; class M { public: float x[4][4]; voidfoo () const throw (E); }; void M::foo () const throw (E) { for (int i = 0; i < 3 ; i++) { float p = x[i][i]; if (p < 0) p = -p; } return; } -- here's the stacktrace. with -fno-if-conversion (gdb) where #0 find_if_header (test_bb=0xa49488, pass=1) at ../../gcc-3.4.3/gcc/ifcvt.c:1641 #1 0x00708661 in if_convert (x_life_data_ok=Variable "x_life_data_ok" is not available. ) at ../../gcc-3.4.3/gcc/ifcvt.c:3251 #2 0x00697968 in rest_of_compilation (decl=0x2a959cb1a0) at ../../gcc-3.4.3/gcc/toplev.c:2443 #3 0x006d1f4c in tree_rest_of_compilation (fndecl=0x2a959cb1a0, nested_p=false) at ../../gcc-3.4.3/gcc/tree-optimize.c:168 #4 0x0046e881 in expand_body (fn=0x2a959cb1a0) at ../../gcc-3.4.3/gcc/cp/semantics.c:2920 #5 0x006d39cf in cgraph_expand_function (node=0x2a959d1700) at ../../gcc-3.4.3/gcc/cgraphunit.c:538 #6 0x006d4131 in cgraph_optimize () at ../../gcc-3.4.3/gcc/cgraphunit.c:1542 #7 0x00441885 in finish_file () at ../../gcc-3.4.3/gcc/cp/decl2.c:2856 #8 0x00694e43 in toplev_main (argc=Variable "argc" is not available. ) at ../../gcc-3.4.3/gcc/toplev.c:1822 #9 0x002a95688e5d in __libc_start_main () from /lib64/tls/libc.so.6 #10 0x004025aa in _start () at ../sysdeps/x86_64/elf/start.S:96 -- Summary: ICE in if_convert with -fnon-call-exceptions -O2 on amd64 Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: nick at ilm dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19744
[Bug c++/19744] ICE in if_convert with -fnon-call-exceptions -O2 on amd64
-- What|Removed |Added Keywords||ice-on-valid-code http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19744