aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/bitint-99.c
blob: a0aa446087da9df61a1075efb9579ca0a064ab30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* PR tree-optimization/114278 */
/* { dg-do compile { target bitint } } */
/* { dg-options "-O2 -fno-tree-dce -fno-tree-dse -fno-tree-ccp" } */
/* { dg-additional-options "-mavx2" { target i?86-*-* x86_64-*-* } } */

void
foo (void *p)
{
  _BitInt(64) b = *(_BitInt(64) *) __builtin_memmove (&b, p, sizeof (_BitInt(64)));
}

#if __BITINT_MAXWIDTH__ >= 128
void
bar (void *p)
{
  _BitInt(128) b = *(_BitInt(128) *) __builtin_memmove (&b, p, sizeof (_BitInt(128)));
}
#endif

#if __BITINT_MAXWIDTH__ >= 256
void
baz (void *p)
{
  _BitInt(256) b = *(_BitInt(256) *) __builtin_memmove (&b, p, sizeof (_BitInt(256)));
}
#endif