From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9892 invoked by alias); 6 Aug 2014 12:56:23 -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 9852 invoked by uid 48); 6 Aug 2014 12:56:18 -0000 From: "doko at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62035] New: [4.9 Regresion] wrong code building libapache-mod-perl with -O1, works with -O1 -fno-tree-dse Date: Wed, 06 Aug 2014 12:56:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 4.9.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: doko at gcc dot gnu.org 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: 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-08/txt/msg00364.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62035 Bug ID: 62035 Summary: [4.9 Regresion] wrong code building libapache-mod-perl with -O1, works with -O1 -fno-tree-dse Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: doko at gcc dot gnu.org Created attachment 33260 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33260&action=edit test case [forwarded from http://bugs.debian.org/754901] libapache2-mod-perl2 build segfaults in the test suite when built with gcc 4.9 (r213317) with -O1 or higher, building with -O1 -fno-tree-dse works around it. seen at least on x86_64-linux-gnu. attributing one function with __attribute__((optimize("-fno-tree-dse"))) modperl_enc.c (modperl_env_table_populate) is enough to avoid the segfaults in the test suite. The diff in the assembler is: --- ok/modperl_env.s 2014-08-06 12:42:36.714269110 +0000 +++ bad/modperl_env.s 2014-08-06 12:40:44.441445210 +0000 @@ -118,7 +118,6 @@ .LVL15: movq %rax, %r14 .LVL16: - movq %rax, 40(%rsp) subq $8, %rsp .cfi_def_cfa_offset 120 pushq $0