From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55154 invoked by alias); 21 Jul 2015 15:24:12 -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 55066 invoked by uid 48); 21 Jul 2015 15:24:06 -0000 From: "dreamcooled at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/66957] New: irregular "is protected within this context" error Date: Tue, 21 Jul 2015 15:24: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: 5.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: dreamcooled at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 target_milestone attachments.created 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: 2015-07/txt/msg01819.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D66957 Bug ID: 66957 Summary: irregular "is protected within this context" error Product: gcc Version: 5.1.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dreamcooled at gmail dot com Target Milestone: --- Created attachment 36023 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D36023&action=3Dedit The code which produces the bug In the attachment you find code which I'm trying to compile with g++. I have a archlinux system and I have g++ version 5.1.0 from the offical rep= o of my system. I'm trying to compile the attached code by invoking=20 `g++ classtest.cpp`.=20 gcc fires the error: classtest.cpp: In constructor =E2=80=98DerivedB::DerivedB()=E2=80=99: classtest.cpp:9:5: error: =E2=80=98int BaseClass::x=E2=80=99 is protected int BaseClass::x; ^ classtest.cpp:22:32: error: within this context std::cout << DerivedA::x; ^ What I'm trying to achieve is completely legal according to the c++ standard ([class.access.base]/p5 ). More information, discussion, and a lot of people who agree that this is in= deed a gcc bug, can be found in the associated stackoverflow question: http://stackoverflow.com/questions/31389470/g-compilation-error-is-protecte= d-from-within-this-context-while-clang-do >>From gcc-bugs-return-492930-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Jul 21 15:35:25 2015 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 119272 invoked by alias); 21 Jul 2015 15:35:25 -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 119190 invoked by uid 55); 21 Jul 2015 15:35:21 -0000 From: "aldyh at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug debug/66468] [6 Regression] ICE in in check_die, at dwarf2out.c:5719 Date: Tue, 21 Jul 2015 15:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: debug X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: aldyh at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: aldyh at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: 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: 2015-07/txt/msg01820.txt.bz2 Content-length: 939 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66468 --- Comment #9 from Aldy Hernandez --- On 07/20/2015 03:14 PM, jason at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66468 > > --- Comment #8 from Jason Merrill --- > The problem seems to be that we inlined the function, but DECL_POSSIBLY_INLINED > remains unset, so dwarf2out doesn't think it needs to call > dwarf2out_abstract_function. > > There also doesn't seem to be a cgraph edge for the inlined function call; I'm > guessing that the function was inlined in the initial compilation, and this > relationship is forgotten by the time we get to LTO. > > So, doesn't look like a dwarf2out bug. > Jason, thanks for looking into this. Sorry it wasn't dwarf2out related. Do you think perhaps we could diagnose this sort of problem earlier so it doesn't show up (confusingly) in dwarf2out land? Thanks.