summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.c-torture/execute/pr24142.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-02 20:15:55 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-10-02 20:15:55 +0000
commit0cc06088adc97d6ca9e66489d8a23397fa86f80c (patch)
tree03e110a82bcb3ef30244905ac0866fc09e18c916 /gcc/testsuite/gcc.c-torture/execute/pr24142.c
parent7e58afa1fccd88427cb22c4b94cffc49a30ea95c (diff)
downloadgcc-0cc06088adc97d6ca9e66489d8a23397fa86f80c.tar.gz
PR 24142
* tree-vrp.c (vrp_meet): Fix call to range_includes_zero_p in case of anti-ranges. testsuite/ PR 24142 * gcc.c-torture/execute/pr24142.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@104874 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/pr24142.c')
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr24142.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr24142.c b/gcc/testsuite/gcc.c-torture/execute/pr24142.c
new file mode 100644
index 00000000000..eed3e8bc679
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr24142.c
@@ -0,0 +1,19 @@
+void abort (void);
+
+int f (int a, int b)
+{
+ if (a == 1)
+ a = 0;
+ if (b == 0)
+ a = 1;
+ if (a != 0)
+ return 0;
+ return 1;
+}
+
+int main (void)
+{
+ if (f (1, 1) != 1)
+ abort ();
+ return 0;
+}