From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11091 invoked by alias); 25 May 2006 08:29:49 -0000 Received: (qmail 11044 invoked by uid 48); 25 May 2006 08:29:41 -0000 Date: Thu, 25 May 2006 08:29:00 -0000 Subject: [Bug tree-optimization/27768] New: [4.2 regression] wrong-code with vectors X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "reichelt at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg02605.txt.bz2 List-Id: The following code crashes when I compile it with -O2 (mainline) ========================== #include struct A { std::vector v; char c; }; struct B {}; int main() { A a; A a2(a); std::vector b; return 0; } ========================== The program dies with: *** glibc detected *** free(): invalid pointer: 0x00002aaaaabc0c60 *** zsh: 13987 abort a.out I'll come up with a reduced testcase next week if nobody beats me. Happens only with mainline, -O1 is not affected. -- Summary: [4.2 regression] wrong-code with vectors Product: gcc Version: 4.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: reichelt at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27768