public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/55010] New: Internal consistency failure : invalid rtl sharing found in the insn
@ 2012-10-21 17:45 merkil at savhon dot org
  2012-10-22  8:51 ` [Bug rtl-optimization/55010] " jakub at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: merkil at savhon dot org @ 2012-10-21 17:45 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55010
           Summary: Internal consistency failure : invalid rtl sharing
                    found in the insn
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: merkil@savhon.org


Hi !
With GCC 4.8.0 as of 20121021, at -O2 and higher :

$ cat consistency.c
#include <stdint.h>

int64_t a;
uint64_t b;

void f(void)
{
    a = (a < 0) / ((a -= b) ? b >= ((b = a) || 0) : 0);
}

$ xgcc -w -m32 -O2 consistency.c
consistency.c: In function ‘f’:
consistency.c:9:1: error: invalid rtl sharing found in the insn
 }
 ^
(insn 57 55 33 5 (set (reg:SI 83 [ D.1743 ])
        (if_then_else:SI (leu (reg:CC 17 flags)
                (const_int 0 [0]))
            (reg:SI 83 [ D.1743 ])
            (reg:SI 59 [ iftmp.1 ]))) consistency.c:8 908 {*movsicc_noc}
     (expr_list:REG_EQUAL (ne:SI (subreg:SI (reg:DI 65 [ D.1745 ]) 0)
            (const_int 0 [0]))
        (nil)))
consistency.c:9:1: error: shared rtx
(subreg:SI (reg:DI 65 [ D.1745 ]) 0)
consistency.c:9:1: internal compiler error: internal consistency failure
linux-vdso.so.1: No such file or directory
0x6a8575 verify_rtx_sharing
    ../../srcdir/gcc/emit-rtl.c:2574
0x6a849f verify_rtx_sharing
    ../../srcdir/gcc/emit-rtl.c:2590
0x6a849f verify_rtx_sharing
    ../../srcdir/gcc/emit-rtl.c:2590
0x6ad46c verify_rtl_sharing()
    ../../srcdir/gcc/emit-rtl.c:2655
0x82f87c execute_function_todo
    ../../srcdir/gcc/passes.c:1966
0x8304cd execute_todo
    ../../srcdir/gcc/passes.c:1989
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Please note that it was found on an x86 machine, and that I had to add -m32 to
the commandline to reproduce the crash on my x86_64 machine.


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

* [Bug rtl-optimization/55010] Internal consistency failure : invalid rtl sharing found in the insn
  2012-10-21 17:45 [Bug rtl-optimization/55010] New: Internal consistency failure : invalid rtl sharing found in the insn merkil at savhon dot org
@ 2012-10-22  8:51 ` jakub at gcc dot gnu.org
  2012-10-24  9:13 ` jakub at gcc dot gnu.org
  2012-10-26 19:24 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-22  8:51 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-10-22
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-22 08:51:19 UTC ---
Created attachment 28503
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28503
gcc48-pr55010.patch

Untested fix.


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

* [Bug rtl-optimization/55010] Internal consistency failure : invalid rtl sharing found in the insn
  2012-10-21 17:45 [Bug rtl-optimization/55010] New: Internal consistency failure : invalid rtl sharing found in the insn merkil at savhon dot org
  2012-10-22  8:51 ` [Bug rtl-optimization/55010] " jakub at gcc dot gnu.org
@ 2012-10-24  9:13 ` jakub at gcc dot gnu.org
  2012-10-26 19:24 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-24  9:13 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-24 09:13:14 UTC ---
Author: jakub
Date: Wed Oct 24 09:13:09 2012
New Revision: 192760

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=192760
Log:
    PR rtl-optimization/55010
    * cse.c (fold_rtx) <RTX_COMPARE>: Call copy_rtx on folded_arg{0,1}
    before passing it to simplify_relational_operation.

    * gcc.dg/pr55010.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr55010.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cse.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug rtl-optimization/55010] Internal consistency failure : invalid rtl sharing found in the insn
  2012-10-21 17:45 [Bug rtl-optimization/55010] New: Internal consistency failure : invalid rtl sharing found in the insn merkil at savhon dot org
  2012-10-22  8:51 ` [Bug rtl-optimization/55010] " jakub at gcc dot gnu.org
  2012-10-24  9:13 ` jakub at gcc dot gnu.org
@ 2012-10-26 19:24 ` jakub at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-10-26 19:24 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.8.0

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-26 19:24:29 UTC ---
Fixed.


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

end of thread, other threads:[~2012-10-26 19:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-21 17:45 [Bug rtl-optimization/55010] New: Internal consistency failure : invalid rtl sharing found in the insn merkil at savhon dot org
2012-10-22  8:51 ` [Bug rtl-optimization/55010] " jakub at gcc dot gnu.org
2012-10-24  9:13 ` jakub at gcc dot gnu.org
2012-10-26 19:24 ` 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).