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

Alexander Monakov <amonakov at gcc dot gnu.org> changed:

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

--- Comment #9 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
OK, so on the following testcase:

struct s {int f:1;};
struct s f(int x, int y)
{
  struct s r;
  if (x) {
    r.f = 1;
    asm("");
  }
  if (y) {
    r.f = 1;
    asm("");
  }
  return r;
}

with -O -fno-tree-sra we emit:

        .proc f#
f:
        .prologue
        .body
        cmp4.eq p6, p7 = 0, r32
        (p6) br.cond.dptk .L2
        addl r8 = 1, r0
        ;;
.L2:
        ;;
        cmp4.eq p6, p7 = 0, r33
        (p6) br.cond.dptk .L3
        dep r8 = -1, r8, 0, 1
        ;;
.L3:
        ;;
        br.ret.sptk.many b0
        ;;
        .endp f#

Thus the call f(0, 1) won't clear the NaT bit on r8. So the bug should be
valid.

Reply via email to