This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Volatile MEMs in statement expressions and functions inlined astrees

Alexandre Oliva <> writes:

> Here's the patch, bootstrapped and tested on athlon-pc-linux-gnu.  Ok
> to install?
> Index: gcc/ChangeLog
> from  Alexandre Oliva  <>
> 	* stmt.c (expand_expr_stmt): Keep last_expr_value non-NULL iff
> 	we're interested in the result.  Use it to tell whether to
> 	ignore results of enclosed expressions.
> 	(expand_start_stmt_expr): Added new argument, and initialize
> 	last_expr_value accordingly.
> 	* tree.h (expand_start_stmt_expr): Adjusted declaration.
> 	* c-common.c (c_expand_expr): Adjust call.
> 	* expr.c (expand_expr) [EXPR_WFL]: Pass const0_rtx down if
> 	ignoring the result.

Alexandre, you forgot to change ada/trans.c:

/cvs/gcc/gcc/ada/trans.c: In function `tree_transform':
/cvs/gcc/gcc/ada/trans.c:1800: too few arguments to function `expand_start_stmt_expr'
make[3]: *** [trans.o] Error 1

I've committed the appended patch as obvious to get the tree working
again, I'm finishing bootstrap now on i686-linux,


2001-12-04  Andreas Jaeger  <>

	* trans.c (tree_transform): Adjust call of expand_start_stmt_expr.

Index: gcc/ada/trans.c
RCS file: /cvs/gcc/egcs/gcc/ada/trans.c,v
retrieving revision 1.5
diff -u -p -r1.5 trans.c
--- trans.c	2001/11/15 23:34:17	1.5
+++ trans.c	2001/12/04 12:59:12
@@ -1797,7 +1797,7 @@ tree_transform (gnat_node)
 	   we need to make sure it gets executed after the LHS.  */
 	gnu_lhs = gnat_to_gnu (Left_Opnd (gnat_node));
 	clear_last_expr ();
-	gnu_rhs_side = expand_start_stmt_expr ();
+	gnu_rhs_side = expand_start_stmt_expr (1);
 	gnu_rhs = gnat_to_gnu (Right_Opnd (gnat_node));
 	expand_end_stmt_expr (gnu_rhs_side);
 	gnu_result_type = get_unpadded_type (Etype (gnat_node));

 Andreas Jaeger
  SuSE Labs

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]