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]

Re: c/544: current GCC failed with "invalid lvalue in assignment"

On Mon, Sep 18, 2000 at 06:21:11AM -0000, wrote:
> rcmd2.i: In function `rcmd_af':
> rcmd2.i:28: invalid lvalue in assignment

I think it moderately interesting that this is the second time
I've fixed this bug.  The last time was in the C++ front end:

2000-04-23  Richard Henderson  <>

        * typeck.c (c_expand_asm_operands): Restore the original
        contents of the output list.


        * c-typeck.c (c_expand_asm_operands): Restore the output tree
        after expanding.

Index: c-typeck.c
RCS file: /cvs/gcc/egcs/gcc/c-typeck.c,v
retrieving revision 1.91
diff -c -p -d -r1.91 c-typeck.c
*** c-typeck.c	2000/09/19 03:26:10	1.91
--- c-typeck.c	2000/09/19 14:22:59
*************** c_expand_asm_operands (string, outputs, 
*** 6603,6608 ****
--- 6603,6612 ----
  	  expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
  		       NULL_RTX, VOIDmode, EXPAND_NORMAL);
  	  free_temp_slots ();
+ 	  /* Restore the original value so that it's correct the next
+ 	     time we expand this function.  */
+ 	  TREE_VALUE (tail) = o[i];
        /* Detect modification of read-only values.
  	 (Otherwise done by build_modify_expr.)  */

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