comparison gcc/testsuite/c-c++-common/pr85822.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
comparison
equal deleted inserted replaced
111:04ced10e8804 131:84e7813d76e9
1 /* { dg-options "-O2" } */
2 /* { dg-do run } */
3
4 static const long long int TagTypeNumber = 0xffff000000000000ll;
5
6 long long int x;
7
8 void foo(void)
9 {
10 x = TagTypeNumber + 1;
11 }
12
13 int main(int argc, char **argv)
14 {
15 if (argc > 0)
16 foo ();
17
18 if ((x & TagTypeNumber) == TagTypeNumber)
19 {
20 unsigned y = (unsigned)x;
21 __builtin_printf ("v: %u\n", y);
22 if (y != 1)
23 __builtin_abort ();
24 }
25
26 return 0;
27 }