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 c/51455] Possible uninitialized register use when array subscript is unsigned


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.


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