This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/21111] IA-64 NaT consumption faults due to uninitialized register reads
- From: "amonakov at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 27 Jul 2017 09:40:49 +0000
- Subject: [Bug middle-end/21111] IA-64 NaT consumption faults due to uninitialized register reads
- Auto-submitted: auto-generated
- References: <bug-21111-4@http.gcc.gnu.org/bugzilla/>
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.