diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-01-07 20:03:06 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-01-07 20:03:06 +0000 |
commit | f63c7f852468f409205d1d0182b2fba989c38f93 (patch) | |
tree | 4468dd2ff9ce9e001c65083ecba9f6ef355455ac | |
parent | 11af98ff71ced554c2402d738ff3f811d2df367a (diff) | |
download | gcc-f63c7f852468f409205d1d0182b2fba989c38f93.zip gcc-f63c7f852468f409205d1d0182b2fba989c38f93.tar.gz gcc-f63c7f852468f409205d1d0182b2fba989c38f93.tar.bz2 |
Add test of handling arithmetic-overflow from JIT
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
-rw-r--r-- | gcc/testsuite/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/testsuite/jit.dg/all-non-failing-tests.h | 7 | ||||
-rw-r--r-- | gcc/testsuite/jit.dg/test-combination.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/jit.dg/test-threads.c | 3 |
4 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index e320af4..8ab726d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,13 @@ 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++" rather than "jit". Load g++.exp, and call g++_init. Run test-*.cc files within the testsuite and *.cc files within diff --git a/gcc/testsuite/jit.dg/all-non-failing-tests.h b/gcc/testsuite/jit.dg/all-non-failing-tests.h index 10d7199..beb3d13 100644 --- a/gcc/testsuite/jit.dg/all-non-failing-tests.h +++ b/gcc/testsuite/jit.dg/all-non-failing-tests.h @@ -22,6 +22,13 @@ #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 diff --git a/gcc/testsuite/jit.dg/test-combination.c b/gcc/testsuite/jit.dg/test-combination.c index 06ba902..e99f4d0 100644 --- a/gcc/testsuite/jit.dg/test-combination.c +++ b/gcc/testsuite/jit.dg/test-combination.c @@ -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); diff --git a/gcc/testsuite/jit.dg/test-threads.c b/gcc/testsuite/jit.dg/test-threads.c index 7c248cc..cd5ef6a 100644 --- a/gcc/testsuite/jit.dg/test-threads.c +++ b/gcc/testsuite/jit.dg/test-threads.c @@ -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}, |