This is the mail archive of the gcc-patches@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]

Minor bugs in expr.c and varasm.c


These bugs cause problems for initializers at file level.  I committed the
following:

Wed May  3 09:29:17 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* expr.c (expand_expr, case COMPONENT_REF): Don't check for checking
	memory usage if not in a function.
	* varasm.c (initializer_constant_valid_p, case ADDR_EXPR): Only
	return address if static.

*** expr.c	2000/04/28 18:25:23	1.233
--- expr.c	2000/05/03 13:14:42
*************** expand_expr (exp, target, tmode, modifie
*** 6735,6739 ****
  
  	/* Check the access.  */
! 	if (current_function_check_memory_usage && GET_CODE (op0) == MEM)
            {
  	    enum memory_use_mode memory_usage;
--- 6735,6740 ----
  
  	/* Check the access.  */
! 	if (cfun != 0 && current_function_check_memory_usage
! 	    && GET_CODE (op0) == MEM)
            {
  	    enum memory_use_mode memory_usage;
*** varasm.c	2000/04/28 20:25:38	1.112
--- varasm.c	2000/05/03 13:14:47
*************** initializer_constant_valid_p (value, end
*** 4069,4073 ****
  
      case ADDR_EXPR:
!       return TREE_OPERAND (value, 0);
  
      case NON_LVALUE_EXPR:
--- 4069,4073 ----
  
      case ADDR_EXPR:
!       return staticp (TREE_OPERAND (value, 0) ? TREE_OPERAND (value, 0) : 0);
  
      case NON_LVALUE_EXPR:

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