Add test of handling arithmetic-overflow from JIT
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 7 Jan 2015 20:03:06 +0000 (20:03 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 7 Jan 2015 20:03:06 +0000 (20:03 +0000)
gcc/testsuite/ChangeLog:
* jit.dg/test-arith-overflow.c: New test case.
* jit.dg/all-non-failing-tests.h: Add test-arith-overflow.c.
* jit.dg/test-combination.c (create_code): Likewise.
(verify_code): Likewise.
* jit.dg/test-threads.c (testcases): Likewise.

From-SVN: r219320

gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/all-non-failing-tests.h
gcc/testsuite/jit.dg/test-combination.c
gcc/testsuite/jit.dg/test-threads.c

index e320af4bb5b83440e6c292f2e53c2c81a68d24ec..8ab726d67e5f21afe0176f76ac5b0aae39db6ce1 100644 (file)
@@ -1,3 +1,11 @@
+2015-01-07  David Malcolm  <dmalcolm@redhat.com>
+
+       * jit.dg/test-arith-overflow.c: New test case.
+       * jit.dg/all-non-failing-tests.h: Add test-arith-overflow.c.
+       * jit.dg/test-combination.c (create_code): Likewise.
+       (verify_code): Likewise.
+       * jit.dg/test-threads.c (testcases): Likewise.
+
 2015-01-07  David Malcolm  <dmalcolm@redhat.com>
 
        * jit.dg/jit.exp: Load wrapper.exp with %{tool} set to "g++"
index 10d71993613009812afc326b0aa95f025a31d6ee..beb3d13d45ca35668b23a4c0fc52e5e35052080e 100644 (file)
 #undef create_code
 #undef verify_code
 
+/* test-arith-overflow.c */
+#define create_code create_code_arith_overflow
+#define verify_code verify_code_arith_overflow
+#include "test-arith-overflow.c"
+#undef create_code
+#undef verify_code
+
 /* test-array-as-pointer.c */
 #define create_code create_code_array_as_pointer
 #define verify_code verify_code_array_as_pointer
index 06ba90242a3f55371373b1d3faf38a6f0ecb93fd..e99f4d0921d9b2afbbf04d7b99c6b82b551702b3 100644 (file)
@@ -17,6 +17,7 @@ create_code (gcc_jit_context *ctxt, void * user_data)
 {
   create_code_accessing_struct (ctxt, user_data);
   create_code_accessing_union (ctxt, user_data);
+  create_code_arith_overflow (ctxt, user_data);
   create_code_array_as_pointer (ctxt, user_data);
   create_code_arrays (ctxt, user_data);
   create_code_calling_external_function (ctxt, user_data);
@@ -44,6 +45,7 @@ verify_code (gcc_jit_context *ctxt, gcc_jit_result *result)
 {
   verify_code_accessing_struct (ctxt, result);
   verify_code_accessing_union (ctxt, result);
+  verify_code_arith_overflow (ctxt, result);
   verify_code_array_as_pointer (ctxt, result);
   verify_code_arrays (ctxt, result);
   verify_code_calling_external_function (ctxt, result);
index 7c248ccde6d7fce475930a832bea8d0d02ed86f5..cd5ef6a4f62c234d6f9247a4749f651edce1cbeb 100644 (file)
@@ -107,6 +107,9 @@ const struct testcase testcases[] = {
   {"accessing_union",
    create_code_accessing_union,
    verify_code_accessing_union},
+  {"arith_overflow",
+   create_code_arith_overflow,
+   verify_code_arith_overflow},
   {"array_as_pointer",
    create_code_array_as_pointer,
    verify_code_array_as_pointer},