From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2922 invoked by alias); 16 May 2014 18:53:11 -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 2802 invoked by uid 48); 16 May 2014 18:53:06 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56724] sub-optimal location in error Date: Fri, 16 May 2014 18:53: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: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: manu 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: 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-05/txt/msg01474.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56724 --- Comment #8 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Tom Tromey from comment #5) > I tried this today with a recent-ish gcc trunk build, and > there's been a regression. I think the problem is that convert_for_assignment uses "location" instead = of "expr_loc". The original issue is harder to fix. I am not sure we have locations for the different types in a function declaration, do we? >>From gcc-bugs-return-451783-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri May 16 18:59:31 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 8893 invoked by alias); 16 May 2014 18:59:31 -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 8860 invoked by uid 48); 16 May 2014 18:59:28 -0000 From: "zsojka at seznam dot cz" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61203] New: [4.7/4.8/4.9/4.10 Regression] g++.old-deja/g++.jason/rvalue2.C FAILs with -O2 -fno-inline Date: Fri, 16 May 2014 18:59: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.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: zsojka at seznam dot cz 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 attachments.created 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: 2014-05/txt/msg01475.txt.bz2 Content-length: 1170 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61203 Bug ID: 61203 Summary: [4.7/4.8/4.9/4.10 Regression] g++.old-deja/g++.jason/rvalue2.C FAILs with -O2 -fno-inline Product: gcc Version: 4.10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: zsojka at seznam dot cz Created attachment 32809 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32809&action=edit reduced testcase I think the code has defined behaviour. The temporal object created by A() is afaict alive when the pointer comparison is being done (but it is not when the result of the comparison is being used)... but it might easily happen that I am wrong; I am certainly not an C++ expert, the code is quite artificial. Attached is a reduced testcase. Output: $ g++ -O2 testcase.C $ ./a.out a.out: testcase.C:16: int main(): Assertion `!r' failed. Aborted Tested revisions: trunk r210490 - fail 4.9 r210307 - fail 4.8 r210303 - fail 4.7 r210302 - fail 4.6 r197894 - OK