diff options
author | David Malcolm <dmalcolm@redhat.com> | 2015-07-08 14:55:33 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2015-07-08 14:55:33 +0000 |
commit | 18b80efb60bc598f1027d36c5d65539815e3bbad (patch) | |
tree | f2a1a8fc9cd12b554a83b91cc2cf4c3633524fbc | |
parent | d17f7d5994e7cb76d9708da59b89f68b78c20de3 (diff) | |
download | gcc-18b80efb60bc598f1027d36c5d65539815e3bbad.zip gcc-18b80efb60bc598f1027d36c5d65539815e3bbad.tar.gz gcc-18b80efb60bc598f1027d36c5d65539815e3bbad.tar.bz2 |
Fix comments in a jit testcase
gcc/testsuite/ChangeLog:
* jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c: Fix
comments.
From-SVN: r225559
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c | 20 |
2 files changed, 9 insertions, 16 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0eb7a8c..d39b273 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-07-08 David Malcolm <dmalcolm@redhat.com> + * jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c: Fix + comments. + +2015-07-08 David Malcolm <dmalcolm@redhat.com> + PR jit/66783 * jit.dg/test-error-gcc_jit_context_new_field-opaque-struct.c (verify_code): Update expected error message. diff --git a/gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c b/gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c index 07a9848..009ad66 100644 --- a/gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c +++ b/gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c @@ -6,25 +6,12 @@ #include "harness.h" +/* Try to create a switch statement with a NULL case, so that + we can verify that we get a sane error message. */ + void create_code (gcc_jit_context *ctxt, void *user_data) { - /* Let's try to inject the equivalent of: - int - test_switch (int x) - { - switch (x) - { - case x: - return 3; - - default: - return 10; - } - } - and verify that we get a sane error about the non-const - case. - */ gcc_jit_type *t_int = gcc_jit_context_get_type (ctxt, GCC_JIT_TYPE_INT); gcc_jit_type *return_type = t_int; @@ -44,6 +31,7 @@ create_code (gcc_jit_context *ctxt, void *user_data) gcc_jit_block *b_default = gcc_jit_function_new_block (func, "default"); + /* Erroneous NULL case. */ gcc_jit_case *cases[1] = { NULL }; |