align_test.c
text/x-c++src
Filename: align_test.c
Type: text/x-c++src
Part: 0
#include <stddef.h>
#include <stdio.h>
# ifndef PG_ALIGN_128
#define PG_ALIGN_128 8
# endif
/* GCC, Sunpro and XLC support aligned */
#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__IBMC__)
#define pg_attribute_aligned(a) __attribute__((aligned(a)))
#endif
typedef __int128 int128a
#if defined(pg_attribute_aligned)
pg_attribute_aligned(PG_ALIGN_128)
#endif
;
int128a holder;
void pass_by_val(void *buffer,int128a par) {
holder=par;
}
int
main()
{
long int i64 = 97656225L << 12;
int128a q;
pass_by_val(main,(int128a) i64);
q=(int128a) i64;
printf("pass int 64 %s\n",(q==holder)?"OK":"FAILED");
if (q!=holder)
return 1;
return 0;
}