Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/pr51628-10.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:84e7813d76e9 | 145:1830386684a0 |
---|---|
1 /* PR c/51628. */ | |
2 /* { dg-do run { target int128 } } */ | |
3 /* { dg-options "-O2" } */ | |
4 | |
5 struct pair_t | |
6 { | |
7 char c; | |
8 __int128_t i; | |
9 } __attribute__ ((packed)); | |
10 | |
11 typedef struct unaligned_int128_t_ | |
12 { | |
13 __int128_t value; | |
14 } __attribute__((packed, may_alias)) unaligned_int128_t; | |
15 | |
16 struct pair_t p = {0, 1}; | |
17 unaligned_int128_t *addr = (unaligned_int128_t *) &p.i; | |
18 | |
19 int | |
20 main() | |
21 { | |
22 addr->value = ~(__int128_t)0; | |
23 return (p.i != 1) ? 0 : 1; | |
24 } |