OSDN Git Service

2010-01-26 Richard Guenther <rguenther@suse.de>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / pr38245-1.c
1 /* PR rtl-optimization/38245 */
2 /* { dg-do compile } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4
5 static inline int
6 f1 (int si1, int si2)
7 {
8   return si2 == 0 ? si1 : si1 / si2;
9 }
10
11 static inline unsigned long long
12 f2 (unsigned long long ui1, unsigned long long ui2)
13 {
14   return ui1 % ui2;
15 }
16
17 unsigned char g;
18 volatile unsigned int h;
19
20 void
21 f3 (void)
22 {
23   if (!((signed char) f1 (0, f2 (g, 2123)) - 1))
24     h;
25 }
26
27 int
28 main (void)
29 {
30   f3 ();
31   return 0;
32 }
33
34 /* { dg-final { scan-tree-dump-not "% 2123" "optimized" } } */
35 /* { dg-final { scan-tree-dump-not "0 / " "optimized" } } */
36 /* { dg-final { cleanup-tree-dump "optimized" } } */