From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32025 invoked by alias); 3 May 2012 19:53:24 -0000 Received: (qmail 32016 invoked by uid 22791); 3 May 2012 19:53:23 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 03 May 2012 19:53:09 +0000 From: "ppluzhnikov at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53220] g++ mis-compiles compound literals Date: Thu, 03 May 2012 19: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ppluzhnikov at google 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-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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 X-SW-Source: 2012-05/txt/msg00329.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53220 --- Comment #1 from Paul Pluzhnikov 2012-05-03 19:53:07 UTC --- gcc-compiled code for reference: (gdb) disas main Dump of assembler code for function main: 0x0000000000400540 <+0>: push %rbp 0x0000000000400541 <+1>: mov $0x1,%esi 0x0000000000400546 <+6>: mov $0x2,%ebp 0x000000000040054b <+11>: push %rbx 0x000000000040054c <+12>: sub $0x18,%rsp 0x0000000000400550 <+16>: movl $0x1,(%rsp) <<=== 0x0000000000400557 <+23>: movl $0x2,0x4(%rsp) <<=== 0x000000000040055f <+31>: mov %rsp,%rbx 0x0000000000400562 <+34>: movl $0x3,0x8(%rsp) <<=== 0x000000000040056a <+42>: movl $0x0,0xc(%rsp) <<=== 0x0000000000400572 <+50>: jmp 0x40057d 0x0000000000400574 <+52>: nopl 0x0(%rax) 0x0000000000400578 <+56>: mov %ebp,%esi 0x000000000040057a <+58>: mov 0x4(%rbx),%ebp 0x000000000040057d <+61>: xor %eax,%eax 0x000000000040057f <+63>: mov $0x40068c,%edi 0x0000000000400584 <+68>: add $0x4,%rbx 0x0000000000400588 <+72>: callq 0x4003b8 0x000000000040058d <+77>: test %ebp,%ebp 0x000000000040058f <+79>: jne 0x400578 0x0000000000400591 <+81>: add $0x18,%rsp 0x0000000000400595 <+85>: xor %eax,%eax 0x0000000000400597 <+87>: pop %rbx 0x0000000000400598 <+88>: pop %rbp 0x0000000000400599 <+89>: retq End of assembler dump.