public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/53187] New: ICE in arm_select_dominance_cc_mode
@ 2012-05-02  8:13 jakub at gcc dot gnu.org
  2012-05-02  9:34 ` [Bug target/53187] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-02  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53187
           Summary: ICE in arm_select_dominance_cc_mode
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org
            Target: armv7hl-linux-gnueabi


void bar (int);

void
foo (int x, double y, double z)
{
  _Bool t = z >= y;
  if (!t || x)
    bar (t ? 1 : 16);
}

ICEs onboth 4.7 branch and trunk at -O2 -mfloat-abi=hard with:
rh817086.i: In function 'foo':
rh817086.i:9:1: internal compiler error: in arm_select_dominance_cc_mode, at
config/arm/arm.c:11544
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

This prevents mesa from building on arm hard float.


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
@ 2012-05-02  9:34 ` jakub at gcc dot gnu.org
  2012-05-02  9:50 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-02  9:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-05-02
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-02 09:33:29 UTC ---
This happens during combine, where simplify_set on
(set (reg:CC_NOOV 24 cc)
    (compare:CC_NOOV (ior:SI (unlt:SI (reg:CCFPE 24 cc)
                (const_int 0 [0]))
            (ne:SI (reg:SI 0 r0 [ x ])
                (const_int 0 [0])))
        (const_int 0 [0])))
calls SELECT_CC_MODE on the arguments of the compare (ior and const0_rtx).


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
  2012-05-02  9:34 ` [Bug target/53187] " jakub at gcc dot gnu.org
@ 2012-05-02  9:50 ` jakub at gcc dot gnu.org
  2012-05-03  7:44 ` nickc at redhat dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-02  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-02 09:50:22 UTC ---
Created attachment 27285
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27285
gcc48-pr53187.patch

Untested fix.  If combine puts there (*:SI (reg:CC* cc) (const_int 0)) we
should
probably select the already selected CC mode, then in this case
arm_select_cc_mode will return the CCFPEmode and thus the caller won't try to
optimize it any way.


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
  2012-05-02  9:34 ` [Bug target/53187] " jakub at gcc dot gnu.org
  2012-05-02  9:50 ` jakub at gcc dot gnu.org
@ 2012-05-03  7:44 ` nickc at redhat dot com
  2012-05-03 10:16 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: nickc at redhat dot com @ 2012-05-03  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nickc at redhat dot com

--- Comment #3 from Nick Clifton <nickc at redhat dot com> 2012-05-03 07:44:12 UTC ---
Hi Jakub,

  I have tested the patch - it works and there are no regressions in the gcc
testsuite.  Thus I am happy to approve the ARM specific parts of the patch (for
the mainline and the 4.7 branch).

Cheers
  Nick


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2012-05-03  7:44 ` nickc at redhat dot com
@ 2012-05-03 10:16 ` jakub at gcc dot gnu.org
  2012-05-03 10:17 ` jakub at gcc dot gnu.org
  2012-05-03 10:29 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-03 10:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-03 10:16:05 UTC ---
Author: jakub
Date: Thu May  3 10:16:01 2012
New Revision: 187085

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187085
Log:
    PR target/53187
    * config/arm/arm.c (arm_select_cc_mode): If x has MODE_CC class
    mode, return that mode.

    * gcc.target/arm/pr53187.c: New test.
    * gcc.c-torture/compile/pr53187.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr53187.c
    trunk/gcc/testsuite/gcc.target/arm/pr53187.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/arm/arm.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2012-05-03 10:16 ` jakub at gcc dot gnu.org
@ 2012-05-03 10:17 ` jakub at gcc dot gnu.org
  2012-05-03 10:29 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-03 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-03 10:17:06 UTC ---
Author: jakub
Date: Thu May  3 10:17:02 2012
New Revision: 187086

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=187086
Log:
    PR target/53187
    * config/arm/arm.c (arm_select_cc_mode): If x has MODE_CC class
    mode, return that mode.

    * gcc.target/arm/pr53187.c: New test.
    * gcc.c-torture/compile/pr53187.c: New test.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/gcc.c-torture/compile/pr53187.c
    branches/gcc-4_7-branch/gcc/testsuite/gcc.target/arm/pr53187.c
Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config/arm/arm.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog


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

* [Bug target/53187] ICE in arm_select_dominance_cc_mode
  2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2012-05-03 10:17 ` jakub at gcc dot gnu.org
@ 2012-05-03 10:29 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-05-03 10:29 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-05-03 10:28:49 UTC ---
Fixed.


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

end of thread, other threads:[~2012-05-03 10:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02  8:13 [Bug target/53187] New: ICE in arm_select_dominance_cc_mode jakub at gcc dot gnu.org
2012-05-02  9:34 ` [Bug target/53187] " jakub at gcc dot gnu.org
2012-05-02  9:50 ` jakub at gcc dot gnu.org
2012-05-03  7:44 ` nickc at redhat dot com
2012-05-03 10:16 ` jakub at gcc dot gnu.org
2012-05-03 10:17 ` jakub at gcc dot gnu.org
2012-05-03 10:29 ` jakub 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).