Fix comments in a jit testcase
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 8 Jul 2015 14:55:33 +0000 (14:55 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Wed, 8 Jul 2015 14:55:33 +0000 (14:55 +0000)
gcc/testsuite/ChangeLog:
* jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c: Fix
comments.

From-SVN: r225559

gcc/testsuite/ChangeLog
gcc/testsuite/jit.dg/test-error-gcc_jit_block_end_with_switch-NULL-case.c

index 0eb7a8ce606061667f0cd1613922823c479464c5..d39b273a615e205572bbd108cd1276d73fa64724 100644 (file)
@@ -1,3 +1,8 @@
+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
index 07a984806939166e3f0c627d648ec74b1f22a818..009ad66e0d1a0ce59451acd6dea2b467f836fff5 100644 (file)
@@ -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
   };