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 rtl-optimization/78617] LRA clobbers live register during rematerialization


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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-11-30
                 CC|                            |ktkachov at gcc dot gnu.org
   Target Milestone|---                         |5.5
     Ever confirmed|0                           |1
      Known to fail|                            |5.4.1, 6.2.1

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed on GCC 5 and 6.
The slightly modified testcase below aborts at -Os but not at -O0.

int a = 0;
int d = 1;
int f = 1;

int fn1() {
  return a || 1 >> a;
}

int fn2(int p1, int p2) {
  return p2 >= 2 ? p1 : p1 >> 1;
}

int fn3(int p1) {
  return d ^ p1;
}

int fn4(int p1, int p2) {
  return fn3(!d > fn2((f = fn1() - 1000) || p2, p1));
}

int main() {
  if (fn4 (0, 0) != 1)
    __builtin_abort ();
  return 0;
}

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