URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [fold-cond-1.c] - Rev 298
Compare with Previous | Blame | View Log
/* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-original" } */ _Bool test1(int a, int b) { return a ? b : 0; } _Bool test2(int c, int d) { return c ? d : 1; } _Bool test3(int e, int f) { return e ? 0 : f; } _Bool test4(int g, int h) { return g ? 1 : h; } /* { dg-final { scan-tree-dump-times "a != 0 \&\& b != 0" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "c == 0 \\|\\| d != 0" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "e == 0 \&\& f != 0" 1 "original" } } */ /* { dg-final { scan-tree-dump-times "g == 0 \\? h != 0 : 1" 0 "original" } } */ /* { dg-final { scan-tree-dump-times "g != 0 \\? 1 : h != 0" 0 "original" } } */ /* { dg-final { cleanup-tree-dump "original" } } */