From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9616 invoked by alias); 12 Jun 2013 00:50:10 -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 9597 invoked by uid 48); 12 Jun 2013 00:50:07 -0000 From: "dhazeghi at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/57592] New: ICE in tree_unroll_loops_completely at -O3 Date: Wed, 12 Jun 2013 00:50: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: dhazeghi at yahoo 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-06/txt/msg00609.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D57592 Bug ID: 57592 Summary: ICE in tree_unroll_loops_completely at -O3 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dhazeghi at yahoo dot com With current gcc trunk on x86_64-linux, the following code causes an ICE wh= en compiled at -O3. This is a regression from 4.8.x. $ gcc-trunk -v gcc version 4.9.0 20130611 (experimental) [trunk revision 199947] (GCC)=20 $ gcc-trunk -m32 -O2 -c ice.c=20 $ gcc-4.8 -m32 -O3 -c ice.c=20 $ gcc-trunk -m32 -O3 -c ice.c=20 ice.c: In function =E2=80=98f=E2=80=99: ice.c:4:1: internal compiler error: Segmentation fault f () ^ 0x7d419f crash_signal ../../gcc-trunk/gcc/toplev.c:333 0x7fc29b ssa_default_def(function*, tree_node*) ../../gcc-trunk/gcc/tree-dfa.c:314 0x7fc560 get_or_create_ssa_default_def(function*, tree_node*) ../../gcc-trunk/gcc/tree-dfa.c:362 0x81585a get_reaching_def ../../gcc-trunk/gcc/tree-into-ssa.c:1184 0x81b9db maybe_replace_use ../../gcc-trunk/gcc/tree-into-ssa.c:1784 0x81b9db rewrite_update_stmt ../../gcc-trunk/gcc/tree-into-ssa.c:1967 0x81b9db rewrite_update_enter_block ../../gcc-trunk/gcc/tree-into-ssa.c:2136 0xb3561a walk_dominator_tree(dom_walk_data*, basic_block_def*) ../../gcc-trunk/gcc/domwalk.c:210 0x814563 rewrite_blocks ../../gcc-trunk/gcc/tree-into-ssa.c:2216 0x81ac8e update_ssa(unsigned int) ../../gcc-trunk/gcc/tree-into-ssa.c:3303 0xb99fe4 tree_unroll_loops_completely(bool, bool) ../../gcc-trunk/gcc/tree-ssa-loop-ivcanon.c:1207 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See for instructions. --------------------- int a, b, c; void f () { int d, e; a =3D 0; for (; a <=3D 1; a++) { e =3D 4; for (; e; e--) { d |=3D c < b++; c =3D 0; } } g (d); } >>From gcc-bugs-return-424231-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Jun 12 06:19:03 2013 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 29192 invoked by alias); 12 Jun 2013 06:19:03 -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 29140 invoked by uid 48); 12 Jun 2013 06:18:52 -0000 From: "potswa at mac dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/57593] New: Friendship not extended into friend member-declaration Date: Wed, 12 Jun 2013 06:19: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: potswa at mac 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-06/txt/msg00610.txt.bz2 Content-length: 1192 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57593 Bug ID: 57593 Summary: Friendship not extended into friend member-declaration Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: potswa at mac dot com The access granted by friendship extends into the "member declarations of the befriended class" (11.3/2). Friend declarations are member-declarations but not member declarations per se, so the standard is ambiguous. But GCC is inconsistent. class c { class n {}; friend struct s; }; struct s { friend class c::n; // OK friend c::n g(); // OK friend void f() { c::n(); } // Error }; All three should go the same way, if access is granted per declaration. If the first two were invalid, private nested classes and related functions would be impossible to befriend. Rejection of the third case impedes use of a friend as part of a class implementation, akin to members, such as the common case of operator <<. Clang does accept it. A defect report has been submitted.