public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/65301] New: gcc can't detect some uninit reads in ctor init lists
@ 2015-03-03 15:55 dcb314 at hotmail dot com
2015-03-03 16:28 ` [Bug c++/65301] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: dcb314 at hotmail dot com @ 2015-03-03 15:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65301
Bug ID: 65301
Summary: gcc can't detect some uninit reads in ctor init lists
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Given the following source code
class K
{
public:
K * copy();
};
class FunctionExpr
{
public:
FunctionExpr( const FunctionExpr & );
private:
K * args;
};
FunctionExpr::FunctionExpr(const FunctionExpr& expr)
: args(expr.args ? args->copy() : 0)
{
}
then trunk gcc can't detect the read of uninit memory for args->copy.
$ ~/gcc/results/bin/gcc -c -g -O2 -Wall -Wextra -pedantic bug189.cc
$
Here is clang doing the right thing:
$ ~/llvm/results/bin/clang++ -c -g -O2 -Wall -Wextra -pedantic bug189.cc
bug189.cc:18:28: warning: field 'args' is uninitialized when used here
[-Wuninitialized]
: args(expr.args ? args->copy() : 0)
^
1 warning generated.
$
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65301] gcc can't detect some uninit reads in ctor init lists
2015-03-03 15:55 [Bug c++/65301] New: gcc can't detect some uninit reads in ctor init lists dcb314 at hotmail dot com
@ 2015-03-03 16:28 ` redi at gcc dot gnu.org
2015-03-03 16:31 ` redi at gcc dot gnu.org
2015-03-03 17:45 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-03 16:28 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65301
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Yes, this is well known and a dup of another bug, maybe several.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65301] gcc can't detect some uninit reads in ctor init lists
2015-03-03 15:55 [Bug c++/65301] New: gcc can't detect some uninit reads in ctor init lists dcb314 at hotmail dot com
2015-03-03 16:28 ` [Bug c++/65301] " redi at gcc dot gnu.org
@ 2015-03-03 16:31 ` redi at gcc dot gnu.org
2015-03-03 17:45 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2015-03-03 16:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65301
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I pointed out other similar cases in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18016#c9 when fixing the simple
case of args(args)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c++/65301] gcc can't detect some uninit reads in ctor init lists
2015-03-03 15:55 [Bug c++/65301] New: gcc can't detect some uninit reads in ctor init lists dcb314 at hotmail dot com
2015-03-03 16:28 ` [Bug c++/65301] " redi at gcc dot gnu.org
2015-03-03 16:31 ` redi at gcc dot gnu.org
@ 2015-03-03 17:45 ` manu at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: manu at gcc dot gnu.org @ 2015-03-03 17:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65301
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |manu at gcc dot gnu.org
Resolution|--- |DUPLICATE
--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
I think this is relatively easy to fix
(seehttps://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808#c24). I think Anthony
mentioned to me that he got it mostly working, but I haven't heard from him in
a while.
*** This bug has been marked as a duplicate of bug 19808 ***
>From gcc-bugs-return-479219-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 03 17:45:33 2015
Return-Path: <gcc-bugs-return-479219-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 69206 invoked by alias); 3 Mar 2015 17:45:32 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 68844 invoked by uid 48); 3 Mar 2015 17:45:29 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/19808] miss a warning about uninitialized member usage in member initializer list in constructor
Date: Tue, 03 Mar 2015 17:45: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: 3.4.4
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P2
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-19808-4-W0hln0FZth@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-19808-4@http.gcc.gnu.org/bugzilla/>
References: <bug-19808-4@http.gcc.gnu.org/bugzilla/>
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-03/txt/msg00363.txt.bz2
Content-length: 483
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19808
Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #26 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
*** Bug 65301 has been marked as a duplicate of this bug. ***
>From gcc-bugs-return-479220-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Mar 03 17:50:01 2015
Return-Path: <gcc-bugs-return-479220-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 86990 invoked by alias); 3 Mar 2015 17:50:01 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 86925 invoked by uid 48); 3 Mar 2015 17:49:58 -0000
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug ipa/65298] [5 Regression] lto1: ICE: in operator[], at vec.h:736 during LTO/PGO Firefox build
Date: Tue, 03 Mar 2015 17:50:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: ipa
X-Bugzilla-Version: 5.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: hubicka at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P1
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 5.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-65298-4-W9WQQf9vlM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-65298-4@http.gcc.gnu.org/bugzilla/>
References: <bug-65298-4@http.gcc.gnu.org/bugzilla/>
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-03/txt/msg00364.txt.bz2
Content-length: 1014
https://gcc.gnu.org/bugzilla/show_bug.cgi?ide298
--- Comment #1 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
lto1: internal compiler error: in operator[], at vec.h:736
0xffc277 vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
../../gcc/gcc/vec.h:736
0xffd678 vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
../../gcc/gcc/vec.h:1184
0xffd678 vec<tree_node*, va_heap, vl_ptr>::operator[](unsigned int)
../../gcc/gcc/vec.h:1202
0xffd678 ipa_value_from_jfunc(ipa_node_params*, ipa_jump_func*)
../../gcc/gcc/ipa-cp.c:937
The out of range access here is caused by pass through function specifying an
index of function parameter that is past the end of ipa-cp lattice.
I suppose it is either some kind of datastructure corruption or a fact that we
manage to inline function call with mismatching arguments?
I saw ICE on this spot in the past and they usually were the first - we forgot
to update correctly after inlining...
What is your -march=native?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-03 17:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 15:55 [Bug c++/65301] New: gcc can't detect some uninit reads in ctor init lists dcb314 at hotmail dot com
2015-03-03 16:28 ` [Bug c++/65301] " redi at gcc dot gnu.org
2015-03-03 16:31 ` redi at gcc dot gnu.org
2015-03-03 17:45 ` manu at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).