public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136
@ 2013-11-29 10:55 krebbel at gcc dot gnu.org
  2013-11-29 11:18 ` [Bug rtl-optimization/59340] [4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2013-11-29 10:55 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

            Bug ID: 59340
           Summary: LRA enable-checking bootstrap failure since r205136
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: krebbel at gcc dot gnu.org

The following code has been added to s390_decompose_address for the LRA
enablement to prevent strict displacement checking for addresses including
eliminable registers. Only during LRA execution the displacements are expected
to be valid. 

199754   vmakarov       if (lra_in_progress
199754   vmakarov         || (base != arg_pointer_rtx
199754   vmakarov             && indx != arg_pointer_rtx
199754   vmakarov             && base != return_address_pointer_rtx
199754   vmakarov             && indx != return_address_pointer_rtx
199754   vmakarov             && base != frame_pointer_rtx
199754   vmakarov             && indx != frame_pointer_rtx
199754   vmakarov             && base != virtual_stack_vars_rtx
199754   vmakarov             && indx != virtual_stack_vars_rtx))

However, with:

Author: law
Date: Wed Nov 20 18:17:49 2013
New Revision: 205136

URL: http://gcc.gnu.org/viewcvs?rev=205136&root=gcc&view=rev
Log:
        * lra.c (lra): Set lra_in_progress before check_rtl call.
        * recog.c (insn_invalid_p): Add !lra_in_progress to prevent
        adding clobber regs when LRA is running

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra.c
    trunk/gcc/recog.c


the lra_in_progress = 1; statement has been moved before the initial LRA
check_rtl invokation so s390_decompose_address now expects the displacements to
be valid already what obviously is not the case.

This leads to a bootstrap failure:

/home/andreas/patched/gcc-head/libgcc/libgcc2.c: In function ‘__mulsc3’:
/home/andreas/patched/gcc-head/libgcc/libgcc2.c:1932:1: error: insn does not
satisfy its constraints:
 }
 ^
(insn 21 26 23 2 (set (mem/c:SF (plus:DI (reg/f:DI 34 %fp)
                (const_int -16 [0xfffffffffffffff0])) [2 ac+0 S4 A64])
        (reg:SF 108 [ D.5596 ]))
/home/andreas/patched/gcc-head/libgcc/libgcc2.c:1874 88 {movsf}
     (expr_list:REG_DEAD (reg:SF 108 [ D.5596 ])
        (nil)))
/home/andreas/patched/gcc-head/libgcc/libgcc2.c:1932:1: internal compiler
error: in check_rtl, at lra.c
:2043

It can easily be reproduced with:

cc1 -O0 t.c
t.c:
void foo (int a) {}
>From gcc-bugs-return-436226-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 29 10:57:58 2013
Return-Path: <gcc-bugs-return-436226-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 2269 invoked by alias); 29 Nov 2013 10:57:58 -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 2222 invoked by uid 48); 29 Nov 2013 10:57:54 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/58844] [4.8/4.9 Regression] ICE with invalid use of ##
Date: Fri, 29 Nov 2013 10:57:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: preprocessor
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub 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: 4.8.3
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-58844-4-Y3yaCCnOHX@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-58844-4@http.gcc.gnu.org/bugzilla/>
References: <bug-58844-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: 2013-11/txt/msg03003.txt.bz2
Content-length: 671

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX844

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dodji at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Doesn't ICE with -ftrack-macro-expansion=0, so regressed with r186977 which
made -ftrack-macro-expansion=2 the default, before that it crashed with
explicit -ftrack-macro-expansion=2.  Dodji, can you please  have a look?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
@ 2013-11-29 11:18 ` rguenth at gcc dot gnu.org
  2013-11-29 14:53 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-29 11:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-checking
             Target|                            |s390x-*-*
   Target Milestone|---                         |4.9.0
            Summary|LRA enable-checking         |[4.9 Regression] LRA
                   |bootstrap failure since     |enable-checking bootstrap
                   |r205136                     |failure since r205136


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
  2013-11-29 11:18 ` [Bug rtl-optimization/59340] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-11-29 14:53 ` jakub at gcc dot gnu.org
  2013-11-29 15:51 ` vmakarov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-11-29 14:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps we want a different flag for the recog call than lra_in_progress?


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
  2013-11-29 11:18 ` [Bug rtl-optimization/59340] [4.9 Regression] " rguenth at gcc dot gnu.org
  2013-11-29 14:53 ` jakub at gcc dot gnu.org
@ 2013-11-29 15:51 ` vmakarov at gcc dot gnu.org
  2013-11-29 20:08 ` vmakarov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-11-29 15:51 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

Vladimir Makarov <vmakarov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at gcc dot gnu.org

--- Comment #2 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #1)
> Perhaps we want a different flag for the recog call than lra_in_progress?

Or don't use it all, it is too heavy.  It is better to use something light.  I
added this code on early stages of LRA development because it is hard to
predict what RTL could be.  Most important check before was one on addresses
and it is gone.  Insn_invalid_p check is just a paranoid check.  If something
goes wrong, the current LRA catches it later in any case.

I hope to fix it today.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2013-11-29 15:51 ` vmakarov at gcc dot gnu.org
@ 2013-11-29 20:08 ` vmakarov at gcc dot gnu.org
  2013-11-29 20:18 ` vmakarov at gcc dot gnu.org
  2013-12-02 12:15 ` krebbel at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-11-29 20:08 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

--- Comment #3 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Author: vmakarov
Date: Fri Nov 29 20:08:38 2013
New Revision: 205541

URL: http://gcc.gnu.org/viewcvs?rev=205541&root=gcc&view=rev
Log:
2013-11-29  Vladimir Makarov  <vmakarov@redhat.com>

    PR rtl-optimization/59340
    * lra.c (check_rtl): Use recog_memoized instead of insn_invalid_p.

    Revert
    2013-11-20  Robert Suchanek  <Robert.Suchanek@imgtec.com>

    * lra.c (lra): Set lra_in_progress before check_rtl call.
    * recog.c (insn_invalid_p): Add !lra_in_progress to prevent
    adding clobber regs when LRA is running.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/lra.c
    trunk/gcc/recog.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2013-11-29 20:08 ` vmakarov at gcc dot gnu.org
@ 2013-11-29 20:18 ` vmakarov at gcc dot gnu.org
  2013-12-02 12:15 ` krebbel at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: vmakarov at gcc dot gnu.org @ 2013-11-29 20:18 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

--- Comment #4 from Vladimir Makarov <vmakarov at gcc dot gnu.org> ---
Andreas, could you check that the bootstrap is fixed.  At least, the test is
compiled by the cross-compiler.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/59340] [4.9 Regression] LRA enable-checking bootstrap failure since r205136
  2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2013-11-29 20:18 ` vmakarov at gcc dot gnu.org
@ 2013-12-02 12:15 ` krebbel at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: krebbel at gcc dot gnu.org @ 2013-12-02 12:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59340

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Bootstrap works again with r205541. Thanks!


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-12-02 12:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29 10:55 [Bug rtl-optimization/59340] New: LRA enable-checking bootstrap failure since r205136 krebbel at gcc dot gnu.org
2013-11-29 11:18 ` [Bug rtl-optimization/59340] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-11-29 14:53 ` jakub at gcc dot gnu.org
2013-11-29 15:51 ` vmakarov at gcc dot gnu.org
2013-11-29 20:08 ` vmakarov at gcc dot gnu.org
2013-11-29 20:18 ` vmakarov at gcc dot gnu.org
2013-12-02 12:15 ` krebbel 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).