summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/Wstrict-overflow-16.c
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-17 05:33:38 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>2007-04-17 05:33:38 +0000
commit5c7155ca9f97caf24576418d4d7e6a0a9bbbe135 (patch)
tree260efc901363034c740d1c84a2d888987c09e4ec /gcc/testsuite/gcc.dg/Wstrict-overflow-16.c
parent40b49e8f39058037d11ff52800ccebbef729cb4e (diff)
downloadgcc-5c7155ca9f97caf24576418d4d7e6a0a9bbbe135.tar.gz
./:
PR tree-optimization/31522 * tree-vrp.c (vr_phi_edge_counts): New static variable. (vrp_initialize): Allocate vr_phi_edge_counts. (vrp_visit_phi_node): Don't push to infinity if we saw a new executable edge. Drop test for all constants. (vrp_finalize): Free vrp_phi_edge_counts. testsuite/: PR tree-optimization/31522 * gcc.dg/Wstrict-overflow-16.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123908 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/Wstrict-overflow-16.c')
-rw-r--r--gcc/testsuite/gcc.dg/Wstrict-overflow-16.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/Wstrict-overflow-16.c b/gcc/testsuite/gcc.dg/Wstrict-overflow-16.c
new file mode 100644
index 00000000000..e8c31cf5046
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstrict-overflow-16.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fstrict-overflow -O2 -Wstrict-overflow" } */
+
+/* From PR 31522. */
+
+int f (int x) {
+ int y;
+ if (x <= 4) y = 1;
+ else y = x / 4;
+ return y <= 0;
+}