This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/62261] New: [sh64] ICE for negative shift counts


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62261

            Bug ID: 62261
           Summary: [sh64] ICE for negative shift counts
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kkojima at gcc dot gnu.org
                CC: dhowells at redhat dot com, olegendo at gcc dot gnu.org
            Target: sh64-*

This was reported originally by dhowells at #c7 of PR62111.

void foo (unsigned long long x)
{
  bar (x << -1);
}

causes an error: unrecognizable insn:

(insn 7 6 8 2 (set (reg:DI 160 [ D.1442 ])
        (ashift:DI (reg:DI 161)
            (const_int -1 [0xffffffffffffffff]))) xx.c:3 -1
     (nil))

A possible patch is proposed at #c14 of PR62111.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]