Add a couple int128_t bit-field testcases.
2019-12-15 Andrew Pinski <apinski@marvell.com> * gcc.c-torture/compile/bitfield-1.c: New test. * gcc.c-torture/compile/bitfield-endian-1.c: New test. * gcc.c-torture/compile/bitfield-endian-2.c: New test. From-SVN: r279409
This commit is contained in:
parent
0f1374e98b
commit
438fbf6303
@ -1,3 +1,9 @@
|
||||
2019-12-15 Andrew Pinski <apinski@marvell.com>
|
||||
|
||||
* gcc.c-torture/compile/bitfield-1.c: New test.
|
||||
* gcc.c-torture/compile/bitfield-endian-1.c: New test.
|
||||
* gcc.c-torture/compile/bitfield-endian-2.c: New test.
|
||||
|
||||
2019-12-14 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/92930
|
||||
|
13
gcc/testsuite/gcc.c-torture/compile/bitfield-1.c
Normal file
13
gcc/testsuite/gcc.c-torture/compile/bitfield-1.c
Normal file
@ -0,0 +1,13 @@
|
||||
/* { dg-require-effective-target int128 } */
|
||||
|
||||
struct f
|
||||
{
|
||||
__uint128_t t:124;
|
||||
__uint128_t t1:4;
|
||||
};
|
||||
|
||||
struct f g(void)
|
||||
{
|
||||
struct f t = {1, 2};
|
||||
return t;
|
||||
}
|
15
gcc/testsuite/gcc.c-torture/compile/bitfield-endian-1.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/bitfield-endian-1.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-require-effective-target int128 } */
|
||||
|
||||
#define ENDIAN __attribute((scalar_storage_order ("big-endian")))
|
||||
|
||||
typedef struct ENDIAN
|
||||
{
|
||||
__uint128_t t:124;
|
||||
__uint128_t t1:4;
|
||||
}f;
|
||||
|
||||
f g(void)
|
||||
{
|
||||
f t = {1, 2};
|
||||
return t;
|
||||
}
|
15
gcc/testsuite/gcc.c-torture/compile/bitfield-endian-2.c
Normal file
15
gcc/testsuite/gcc.c-torture/compile/bitfield-endian-2.c
Normal file
@ -0,0 +1,15 @@
|
||||
/* { dg-require-effective-target int128 } */
|
||||
|
||||
#define ENDIAN __attribute((scalar_storage_order ("little-endian")))
|
||||
|
||||
typedef struct ENDIAN
|
||||
{
|
||||
__uint128_t t:124;
|
||||
__uint128_t t1:4;
|
||||
}f;
|
||||
|
||||
f g(void)
|
||||
{
|
||||
f t = {1, 2};
|
||||
return t;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user