This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51455] Possible uninitialized register use when array subscript is unsigned
- From: "frederik.deweerdt at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Dec 2011 19:25:30 +0000
- Subject: [Bug c/51455] Possible uninitialized register use when array subscript is unsigned
- Auto-submitted: auto-generated
- References: <bug-51455-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51455
--- Comment #2 from frederik.deweerdt at gmail dot com 2011-12-07 19:25:30 UTC ---
(In reply to comment #1)
> ((unsigned char *)offsets)[index] still sign extends to int.
I'm not sure how to parse this. My problem is that '((unsigned char
*)offsets)[index]' uses the 'l' version of mov and eax as destination register.
I would expect the generate asm to use the 'q' version of mov and use rax as
destination register.