[gimplefe] patch that fixes the bug for the failure test case

Sandeep Soni soni.sandeepb@gmail.com
Sat Jun 9 02:33:00 GMT 2012


Hi,

This patch fixes the failure test case that I had submitted the last time.

The changeLog is testsuite/gChangeLog.gimplefe is as follows.

2012-06-09   Sandeep Soni <soni.sandeepb@gmail.com>
              * gimple.dg/20120605-2.gimple : New.

While the changelog in gimple/ChangeLog is as follows
2012-06-09   Sandeep Soni <soni.sandeepb@gmail.com>
              * parser.c (gp_parse_expect_return_var) : Modify to have
correct token consumption.

Index: gcc/testsuite/gimple.dg/20120604-2.gimple
===================================================================
--- gcc/testsuite/gimple.dg/20120604-2.gimple	(revision 0)
+++ gcc/testsuite/gimple.dg/20120604-2.gimple	(revision 0)
@@ -0,0 +1 @@
+gimple_cond<modify_expr,a,3,<tlabel>,<flabel>> /* { dg-error
"Unsupported gimple_cond expression" } */
Index: gcc/gimple/parser.c
===================================================================
--- gcc/gimple/parser.c	(revision 188324)
+++ gcc/gimple/parser.c	(working copy)
@@ -634,16 +634,11 @@
 static void
 gp_parse_expect_return_var (gimple_parser *parser)
 {
-  const gimple_token *next_token;
-
-  next_token = gl_consume_token (parser->lexer);
-
-  if (next_token->type == CPP_NAME)
-    next_token = gl_consume_token (parser->lexer);
-
   /* There may be no variable in which the return value is collected.
      In that case this field in the tuple will contain NULL. We need
      to handle it too.  */
+  gl_consume_expected_token (parser->lexer, CPP_NAME);
+
 }


@@ -664,7 +659,6 @@
       break;

     case CPP_MULT:
-      next_token = gl_consume_token (parser->lexer);
       gl_consume_expected_token (parser->lexer, CPP_NAME);
       break;

@@ -692,7 +686,6 @@
 	break;
       else if (next_token->type == CPP_COMMA)
         {
-          next_token = gl_consume_token (parser->lexer);
           gp_parse_expect_argument (parser);
         }
     }


-- 
Cheers
Sandy



More information about the Gcc-patches mailing list