changeset 93:0b0b0782e795

modify c-parser.c:cbc_finish_nested_function
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 17 Jan 2012 02:50:46 +0900
parents 689bf9141c8c
children 8bd24be3a2df
files CbC-examples/conv1/benchmark.sh gcc/c-parser.c
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CbC-examples/conv1/benchmark.sh	Wed Jan 04 02:15:01 2012 +0900
+++ b/CbC-examples/conv1/benchmark.sh	Tue Jan 17 02:50:46 2012 +0900
@@ -10,7 +10,7 @@
 echo "$CONV1 $1"
 while [[ $count -lt $num ]]; do
     # /usr/bin/time -p ./conv1 1 2>&1 >& - |grep '^user'|tr -s " "|cut -f2 -d" "
-    usertime=$( $time -p $CONV1 1 2>&1 >& - |grep '^user'|tr -s " " |cut -f2 -d" ")
+    usertime=$( $time -p $CONV1 $1 2>&1 >& - |grep '^user'|tr -s " " |cut -f2 -d" ")
     echo $usertime
 
     amount=$(($usertime+$amount))
--- a/gcc/c-parser.c	Wed Jan 04 02:15:01 2012 +0900
+++ b/gcc/c-parser.c	Tue Jan 17 02:50:46 2012 +0900
@@ -6176,6 +6176,7 @@
 
   /* add_stmt (RETURN_EXPR) */
   tree ret = c_finish_return (loc, retval, retval);
+  DECL_READ_P(retval) = 1; // (NODE)->decl_common.decl_read_flag = 1;
   //  TREE_USED(ret) = 1;
   tree stmt_body = c_end_compound_stmt (loc, stmt, true);
 
@@ -6264,7 +6265,7 @@
   tree cstmt = c_begin_compound_stmt (true);
 
   add_stmt (build_modify_expr (loc, retval_decl, NULL_TREE, NOP_EXPR, loc, _retval_decl, NULL_TREE));
-  //tree stmt = c_finish_goto_label (loc, label);
+  tree stmt = c_finish_goto_label (loc, label);
 
   /* end compound statement.  */
   fnbody = c_end_compound_stmt (loc, cstmt, true);
@@ -6776,6 +6777,7 @@
         decl =
           cbc_finish_nested_function (location, label, decl_cond);
 	TREE_USED(decl) = 1;
+	TREE_LANG_FLAG_5(decl) = 1;
 
         /* define if-ed goto label and return statement. */
         cbc_finish_labeled_goto (location, label, decl_cond);