* [PATCH, committed] fix comments in a jit testcase
@ 2015-07-08 14:56 David Malcolm
0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2015-07-08 14:56 UTC (permalink / raw)
To: jit, gcc-patches; +Cc: David Malcolm
Fix a copy-and-paste error.
Tested with "make check-jit"; jit.sum remains at 8494 passes.
Committed to trunk as r225559.
gcc/testsuite/ChangeLog:
* jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c: Fix
comments.
---
...t-error-gcc_jit_block_end_with_switch-NULL-case.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
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
};
--
1.8.5.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-08 14:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 14:56 [PATCH, committed] fix comments in a jit testcase David Malcolm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).