From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3071 invoked by alias); 3 Jul 2008 19:27:02 -0000 Received: (qmail 2735 invoked by alias); 3 Jul 2008 19:26:18 -0000 Date: Thu, 03 Jul 2008 19:27:00 -0000 Message-ID: <20080703192618.2734.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/36713] [4.4 regression] r137252 breaks -O2 optimization on x86_64-unknown-linux-gnu In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenther at suse dot de" 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: 2008-07/txt/msg00218.txt.bz2 ------- Comment #16 from rguenther at suse dot de 2008-07-03 19:26 ------- Subject: Re: [4.4 regression] r137252 breaks -O2 optimization on x86_64-unknown-linux-gnu On Thu, 3 Jul 2008, dfranke at gcc dot gnu dot org wrote: > ------- Comment #15 from dfranke at gcc dot gnu dot org 2008-07-03 18:59 ------- >> Your challenge is now to produce a testcase from your source ;) > > I do have a testcase that shows said flags. The difference in assembler between > -foptimize-sibling-calls and -fno-optimize-sibling-calls is: > > --- without.s 2008-07-03 20:51:59.000000000 +0200 > +++ with.s 2008-07-03 20:52:26.000000000 +0200 > @@ -64,10 +64,9 @@ > movq %rsp, %rdi > call dummy_atom_model_inertia_tensor_ > movq %rsp, %rdi > - call inertia_tensor_to_rg_ > addq $80, %rsp > popq %rbx > - ret > + jmp inertia_tensor_to_rg_ > .LFE2: > .size dummy_atom_model_radius_of_gyration_, > .-dummy_atom_model_radius_of_gyration_ > .section .eh_frame,"a",@progbits > > Is this correct? Running the code compiled with -foptimize-sibling-calls seems > to yield the correct result. Not sure if I need to investigate further. Well, the circumstances where the miscompilation occurs may be tricky. So you say you have a testcase but that doesn't show wrong behavior? That's unfortunate ... :/ Richard. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36713