From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29788 invoked by alias); 3 Oct 2014 11:37:49 -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 29772 invoked by uid 48); 3 Oct 2014 11:37:44 -0000 From: "manu at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/63446] dangling reference results in confusing diagnostic from -Wuninitialized Date: Fri, 03 Oct 2014 11:37:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.6.0 X-Bugzilla-Keywords: diagnostic 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-10/txt/msg00196.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D63446 --- Comment #4 from Manuel L=C3=B3pez-Ib=C3=A1=C3=B1ez --- (In reply to Marc Glisse from comment #2) > make_foo: >=20 > MEM[(struct foo *)&D.2281] =3D &x; > x =3D{v} {CLOBBER}; > return D.2281; >=20 > That doesn't seem so easy to warn about. We could walk from return to find > some of the latest non-clobbered dominating writes to that variable, then= if > it is an ADDR_EXPR look for dominating clobbers, but that would be very > specialized, slight variations on this code would not warn (and all those > walks may start to get costly if we do them naively). It is easier to warn > in the caller when it tries to dereference the dangling pointer. At some moment (in dcce1), gcc decides that x =3D 4 is not needed. For the = same reason, it could realize that MEM[(struct foo *)&D.2281] =3D &x must produc= e a dangling reference, no? >>From gcc-bugs-return-463176-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 03 12:06:32 2014 Return-Path: Delivered-To: listarch-gcc-bugs@gcc.gnu.org Received: (qmail 13188 invoked by alias); 3 Oct 2014 12:06: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 13149 invoked by uid 48); 3 Oct 2014 12:06:26 -0000 From: "svante.signell at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/63448] ICE when compiling atlas 3.10.2 Date: Fri, 03 Oct 2014 12:06: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.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: svante.signell 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: 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-10/txt/msg00197.txt.bz2 Content-length: 189 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63448 --- Comment #5 from Svante Signell --- FYI: atlas builds fine with gcc-4.8.3-11 (and gfortran-4.9-15)