[Bug middle-end/21111] IA-64 NaT consumption faults due to uninitialized register reads
amonakov at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 27 09:40:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list