pr22026.c
来自「linux下编程用 编译软件」· C语言 代码 · 共 50 行
C
50 行
/* PR tree-optimization/22026 VRP used think that ~[0,0] + ~[0,0] = ~[0,0], which is wrong. The same applies to subtraction and unsigned multiplication. *//* { dg-do compile } *//* { dg-options "-O2 -fdump-tree-vrp" } */intplus (int x, int y){ if (x != 0) if (y != 0) { int z = x + y; if (z != 0) return 1; } return 0;}intminus (int x, int y){ if (x != 0) if (y != 0) { int z = x - y; if (z != 0) return 1; } return 0;}intmult (unsigned x, unsigned y){ if (x != 0) if (y != 0) { unsigned z = x * y; if (z != 0) return 1; } return 0;}/* None of the predicates can be folded in these functions. *//* { dg-final { scan-tree-dump-times "Folding predicate" 0 "vrp" } } *//* { dg-final { cleanup-tree-dump "vrp" } } */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?