FreeBSD Bugzilla – Attachment 114418 Details for
Bug 156082
gcc(1) makes incorrect code when swapping array elements by xor without optimization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
file.txt
file.txt (text/plain), 488 bytes, created by
Dmitry Afanasiev
on 2011-03-31 09:50:12 UTC
(
hide
)
Description:
file.txt
Filename:
MIME Type:
Creator:
Dmitry Afanasiev
Created:
2011-03-31 09:50:12 UTC
Size:
488 bytes
patch
obsolete
>#include <stdio.h> >#include <sysexits.h> > >int >main(int argc, char *argv[]) >{ > int a0 = 33; > int b0 = 127; > int a1 = 33; > int b1 = 127; > int a2 = 33; > int b2[] = {127}; > int a3 = 33; > int b3[] = {127}; > > a0 ^= b0 ^= a0 ^= b0; > b1 ^= a1 ^= b1 ^= a1; > a2 ^= b2[0] ^= a2 ^= b2[0]; > b3[0] ^= a3 ^= b3[0] ^= a3; > > printf("a0 = %i b0 = %i\n", a0, b0); > printf("a1 = %i b1 = %i\n", a1, b1); > printf("a2 = %i b2[0] = %i\n", a2, b2[0]); > printf("a3 = %i b3[0] = %i\n", a3, b3[0]); > > return EX_OK; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 156082
: 114418