GCC Bugzilla – Attachment 8436 Details for
Bug 20607
[3.4 Regression] -fstrict-aliasing causes incorrect scheduling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Source code for bug
u64solrs.c (text/plain), 952 bytes, created by
Ganesh Sittampalam
on 2005-03-23 19:04:40 UTC
(
hide
)
Description:
Source code for bug
Filename:
MIME Type:
Creator:
Ganesh Sittampalam
Created:
2005-03-23 19:04:40 UTC
Size:
952 bytes
patch
obsolete
>extern "C" void abort(void); > >typedef unsigned int uint32_t; >typedef unsigned long long uint64_t; > >#define HOST_ENDIAN_BIG > >#if defined(HOST_ENDIAN_BIG) >#define ENDIANFIXUP(count,n) ((count)-1-(n)) >#elif defined(HOST_ENDIAN_LITTLE) >#define ENDIANFIXUP(count,n) (n) >#else >#error Must have HOST_ENDIAN_BIG or HOST_ENDIAN_LITTLE defined >#endif > >typedef struct __x_uint32_t { uint32_t a[2]; } x_uint32_t; >typedef struct __x_uint64_t { uint64_t a[1]; } x_uint64_t; > >#define VECELEM(vec,n) ((vec).a[ENDIANFIXUP(2,n)]) > >void dotests_1() >{ > x_uint64_t arg1; > x_uint32_t result; > arg1.a[0] = 0x00008000ffffffffull; > { > union { > x_uint64_t first; > x_uint32_t second; > } conv; > conv.first = arg1; > result = conv.second; > } > { > uint32_t exp; > uint32_t got; > got=VECELEM(result,0); > exp=4294967295U; > if(got!=exp) abort(); > got=VECELEM(result,1); > exp=32768U; > if(got!=exp) abort(); > } >} > > >int main() { > dotests_1(); > return 0; >}
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 20607
: 8436 |
8437
|
8849