From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25926 invoked by alias); 14 Mar 2014 12:13:02 -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 25412 invoked by uid 48); 14 Mar 2014 12:12:56 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/60517] warning/error for taking address of member of a temporary object Date: Fri, 14 Mar 2014 12:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: glisse at gcc dot gnu.org 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: Message-ID: In-Reply-To: References: 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: 2014-03/txt/msg01154.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D60517 --- Comment #5 from Marc Glisse --- (In reply to Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez from comment #4) > Where is the clobber added? front-end, I expect (sorry, I'm trying to get something to work on windows = and don't have my usual sources at hand). > The closer to the FE that we warn, the better > diagnostic we can generate. Then do it in the front-end and ignore my message ;-) > I'm not very concerned about maybe-branches, since=20 > I expect most bugs to appear in temporaries created in the middle of > expressions (such as a.getB().getA().x), where no branching occurs. An exemple I have in mind is (pseudo): ref id(ref x){return x;} ref fun(){return id(temporary);} where the function call hides that we are returning a reference to a tempor= ary (id could return a reference to a global object, for all fun knows) and we = know more after inlining (I need id inlined into fun, and either fun inlined into something that uses its returned ref (so my previous technique works) or I would need a different (middle-end) warning that detects return &local_var, which seems even easier except that it would give a lot of duplicates with front-end warnings). >>From gcc-bugs-return-446286-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Mar 14 12:24:40 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 32588 invoked by alias); 14 Mar 2014 12:24:39 -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 32568 invoked by uid 48); 14 Mar 2014 12:24:36 -0000 From: "mpolacek at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/60484] [4.7/4.8/4.9 Regression] -fdump-rtl-expand and attribute optimize gives incorrect dump file path Date: Fri, 14 Mar 2014 12:24:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 4.8.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mpolacek at gcc dot gnu.org X-Bugzilla-Status: NEW 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_status cf_reconfirmed_on cc short_desc everconfirmed 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: 2014-03/txt/msg01155.txt.bz2 Content-length: 868 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60484 Marek Polacek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-03-14 CC| |mpolacek at gcc dot gnu.org Summary|-fdump-rtl-expand and |[4.7/4.8/4.9 Regression] |attribute optimize gives |-fdump-rtl-expand and |incorrect dump file path |attribute optimize gives | |incorrect dump file path Ever confirmed|0 |1 --- Comment #1 from Marek Polacek --- Confirmed. GCC 4.4 works.