From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26263 invoked by alias); 22 Nov 2013 05:41:47 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 26241 invoked by uid 48); 22 Nov 2013 05:41:42 -0000 From: "eric.niebler at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59244] New: [c++11] can't specialize template on ref-qualified member function pointer type Date: Fri, 22 Nov 2013 05:41:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.8.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: eric.niebler at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02250.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59244 Bug ID: 59244 Summary: [c++11] can't specialize template on ref-qualified member function pointer type Product: gcc Version: 4.8.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: eric.niebler at gmail dot com I believe the following should compile: ``` template struct U; template struct U {}; template struct U {}; template struct U {}; ``` g++ 4.8.1 in C++11 mode gives this: ``` test.cpp:9:8: error: redefinition of =E2=80=98struct U=E2=80=99 struct U ^ test.cpp:5:8: error: previous definition of =E2=80=98struct U= =E2=80=99 struct U ^ test.cpp:13:8: error: redefinition of =E2=80=98struct U=E2=80=99 struct U ^ test.cpp:5:8: error: previous definition of =E2=80=98struct U= =E2=80=99 struct U ^ ``` >>From gcc-bugs-return-435474-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 22 06:53:31 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 23945 invoked by alias); 22 Nov 2013 06:53:30 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 23922 invoked by uid 48); 22 Nov 2013 06:53:25 -0000 From: "su at cs dot ucdavis.edu" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/59245] New: ICE on valid code at -O3 on x86_64-linux-gnu in set_value_range, at tree-vrp.c:443 Date: Fri, 22 Nov 2013 06:53:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: su at cs dot ucdavis.edu X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02251.txt.bz2 Content-length: 2611 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D59245 Bug ID: 59245 Summary: ICE on valid code at -O3 on x86_64-linux-gnu in set_value_range, at tree-vrp.c:443 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: su at cs dot ucdavis.edu The following code causes an ICE when compiled with the current gcc trunk at -O3 on x86_64-linux-gnu (in both 32-bit and 64-bit modes).=20 This is a regression from 4.8.x. $ gcc-trunk -v Using built-in specs. COLLECT_GCC=3Dgcc-trunk COLLECT_LTO_WRAPPER=3D/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux= -gnu/4.9.0/lto-wrapper Target: x86_64-unknown-linux-gnu Configured with: ../gcc-trunk/configure --prefix=3D/usr/local/gcc-trunk --enable-languages=3Dc,c++ --disable-werror --enable-multilib Thread model: posix gcc version 4.9.0 20131121 (experimental) [trunk revision 205234] (GCC)=20 $=20 $ gcc-trunk -O2 -c small.c $ gcc-4.8.2 -O3 -c small.c $ $ gcc-trunk -O3 -c small.c small.c: In function =E2=80=98fn2=E2=80=99: small.c:18:1: internal compiler error: in set_value_range, at tree-vrp.c:443 fn2 () ^ 0xba89bc set_value_range ../../gcc-trunk/gcc/tree-vrp.c:443 0xbb913a extract_range_from_assert ../../gcc-trunk/gcc/tree-vrp.c:1749 0xbb913a extract_range_from_assignment ../../gcc-trunk/gcc/tree-vrp.c:3772 0xbba671 vrp_visit_assignment_or_call ../../gcc-trunk/gcc/tree-vrp.c:6742 0xbba671 vrp_visit_stmt ../../gcc-trunk/gcc/tree-vrp.c:7553 0xb00612 simulate_stmt ../../gcc-trunk/gcc/tree-ssa-propagate.c:324 0xb00bfd simulate_block ../../gcc-trunk/gcc/tree-ssa-propagate.c:447 0xb00bfd ssa_propagate(ssa_prop_result (*)(gimple_statement_base*, edge_def= **, tree_node**), ssa_prop_result (*)(gimple_statement_base*)) ../../gcc-trunk/gcc/tree-ssa-propagate.c:854 0xbbb66b execute_vrp ../../gcc-trunk/gcc/tree-vrp.c:9710 0xbbb66b execute ../../gcc-trunk/gcc/tree-vrp.c:9801 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. $=20 ---------------------------------------- int a, b, c, e, g; char d[5], f; int fn1 () { if (b) { g =3D 0; return 0; } for (f =3D 0; f !=3D 1; f--) ; return 0; } void fn2 () { d[4] =3D -1; for (a =3D 4; a; a--) { fn1 (); e =3D c < -2147483647 - 1 - d[a] ? c : 0; } } >>From gcc-bugs-return-435475-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 22 06:55:04 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 25522 invoked by alias); 22 Nov 2013 06:55:04 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Delivered-To: mailing list gcc-bugs@gcc.gnu.org Received: (qmail 25122 invoked by uid 48); 22 Nov 2013 06:55:00 -0000 From: "boostcpp at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/59246] New: GCC should issue runtime error for calling pure virtual function with definition Date: Fri, 22 Nov 2013 06:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: boostcpp at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-11/txt/msg02252.txt.bz2 Content-length: 1061 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59246 Bug ID: 59246 Summary: GCC should issue runtime error for calling pure virtual function with definition Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: boostcpp at gmail dot com Consider the following code: struct Base { virtual void f() = 0 ; virtual ~Base() ; } ; // pure virtual function with definition void Base::f() { } Base::~Base() { // call by unqualified name is virtual function call. // virtual function call during destruction is undefined. f() ; } GCC does not issue runtime abort for a virtual function that also has definition. According to the standard(10.4 paragraph 6), this is undefined. Since this is undefined, GCC can do anything. But I think GCC should issue runtime abort if it is technically possible. Clang issues runtime abort for this code.