This is the mail archive of the gcc-bugs@gcc.gnu.org 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]

ridpointer problem [Re: block reordering problem]


On Sat, Sep 09, 2000 at 11:15:48PM -0700, Ulrich Drepper wrote:
> This means the memcpy() call (or the inlining) was optimized out.

The problem is that the __volatile__ qualifier got lost.  The existing
test in c-parse.in is only true if you use "volatile", but not if you
use either of the alternate spellings.

This fixes C, but there are many spots in the C++ front end that 
probably need similar treatment.  Further, c-semantics.c has additional
problems in that the definition on C_RID_CODE is not compatible
between the C and C++ front ends.


r~



Index: c-parse.in
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-parse.in,v
retrieving revision 1.55
diff -c -p -d -r1.55 c-parse.in
*** c-parse.in	2000/09/07 22:24:31	1.55
--- c-parse.in	2000/09/10 06:49:40
*************** stmt:
*** 1901,1914 ****
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, NULL_TREE, NULL_TREE,
! 					 $2 == ridpointers[(int)RID_VOLATILE],
  					 input_filename, lineno); }
  	/* This is the case with input operands as well.  */
  	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ')' ';'
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, $8, NULL_TREE,
! 					 $2 == ridpointers[(int)RID_VOLATILE],
  					 input_filename, lineno); }
  	/* This is the case with clobbered registers as well.  */
  	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':'
--- 1901,1914 ----
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, NULL_TREE, NULL_TREE,
! 					 $2 && C_RID_CODE ($2) == RID_VOLATILE,
  					 input_filename, lineno); }
  	/* This is the case with input operands as well.  */
  	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':' asm_operands ')' ';'
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, $8, NULL_TREE,
! 					 $2 && C_RID_CODE ($2) == RID_VOLATILE,
  					 input_filename, lineno); }
  	/* This is the case with clobbered registers as well.  */
  	| ASM_KEYWORD maybe_type_qual '(' expr ':' asm_operands ':'
*************** stmt:
*** 1916,1922 ****
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, $8, $10,
! 					 $2 == ridpointers[(int)RID_VOLATILE],
  					 input_filename, lineno); }
  	| GOTO identifier ';'
  		{ tree decl;
--- 1916,1922 ----
  		{ stmt_count++;
  		  emit_line_note ($<filename>-1, $<lineno>0);
  		  c_expand_asm_operands ($4, $6, $8, $10,
! 					 $2 && C_RID_CODE ($2) == RID_VOLATILE,
  					 input_filename, lineno); }
  	| GOTO identifier ';'
  		{ tree decl;

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