Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/tree-ssa/pr94718-3.c @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
145:1830386684a0 | 152:2b5abeee2509 |
---|---|
1 /* PR tree-optimization/94718 */ | |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-O2 -fno-ipa-icf -fdump-tree-optimized" } */ | |
4 /* { dg-final { scan-tree-dump-times " \\\(int\\\) " 2 "optimized" } } */ | |
5 /* { dg-final { scan-tree-dump-times " \\\(unsigned int\\\) " 2 "optimized" } } */ | |
6 | |
7 int | |
8 f1 (int x, int y) | |
9 { | |
10 return (int) ((unsigned) x | (unsigned) y); | |
11 } | |
12 | |
13 int | |
14 f2 (int x, int y) | |
15 { | |
16 unsigned a = x; | |
17 unsigned b = y; | |
18 return a | b; | |
19 } | |
20 | |
21 int | |
22 f3 (int x, unsigned y) | |
23 { | |
24 return (int) ((unsigned) x | y); | |
25 } | |
26 | |
27 int | |
28 f4 (int x, unsigned y) | |
29 { | |
30 unsigned a = x; | |
31 return a | y; | |
32 } | |
33 | |
34 unsigned | |
35 f5 (int x, unsigned y) | |
36 { | |
37 return (unsigned) (x | (int) y); | |
38 } | |
39 | |
40 unsigned | |
41 f6 (int x, unsigned y) | |
42 { | |
43 int a = y; | |
44 return x | a; | |
45 } |