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]

Bugfix in gen_mem_addressof


Fri Jun 15 18:05:22 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>

	* function.c (gen_mem_addressof): Handle case where DECL is SAVE_EXPR.

*** function.c	2001/06/08 19:52:05	1.275
--- function.c	2001/06/15 11:07:17
*************** gen_mem_addressof (reg, decl)
*** 2874,2879 ****
      {
        tree type = TREE_TYPE (decl);
  
!       PUT_MODE (reg, DECL_MODE (decl));
        MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl);
        MEM_SET_IN_STRUCT_P (reg, AGGREGATE_TYPE_P (type));
--- 2874,2882 ----
      {
        tree type = TREE_TYPE (decl);
+       enum machine_mode decl_mode
+ 	= (TREE_CODE (decl) == SAVE_EXPR ? TYPE_MODE (TREE_TYPE (decl))
+ 	   : DECL_MODE (decl));
  
!       PUT_MODE (reg, decl_mode);
        MEM_VOLATILE_P (reg) = TREE_SIDE_EFFECTS (decl);
        MEM_SET_IN_STRUCT_P (reg, AGGREGATE_TYPE_P (type));


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