URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.dg/] [fold-cond-1.c] - Rev 12
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 \\| h\\) != 0" 1 "original" } } */ /* { dg-final { cleanup-tree-dump "original" } } */