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]
Other format: [Raw text]

[Bug target/13132] long-double code leads to unresolved reference to __trunctfxf2


------- Additional Comments From wilson at gcc dot gnu dot org  2003-12-09 00:55 -------
The voltile mem problem seems to be an IA-64 specific issue.  The IA-64 port
calls gen_mem_addressof during reload, to fix XFmode GR/FR moves.  It passes no
decl when it does this.  In all other cases, we have a decl, and the flag bits
are set by the set_mem_attributes call.  Nowadays, REGs can have a decl in the
reg attributes field, but I am uncertain of what will happen if I try to use it.
 I also doubt that the decl will always be there.  So the simplest fix is to
just clear the fields manually.  Since this happens in reload, taking the same
action as alter_reg seems to be correct.  Here is an as yet untested patch.

2003-12-08  James E Wilson  <wilson@specifixinc.com>

        * function.c (gen_mem_addressof): When no decl, explicitly clear flag
        bits.

Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.471
diff -p -r1.471 function.c
*** function.c  1 Dec 2003 13:07:12 -0000       1.471
--- function.c  9 Dec 2003 00:46:34 -0000
*************** gen_mem_addressof (rtx reg, tree decl, i
*** 2851,2857 ****
        fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), reg, 0);
      }
    else if (rescan)
!     fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);

    return reg;
  }
--- 2851,2867 ----
        fixup_var_refs (reg, GET_MODE (reg), TREE_UNSIGNED (type), reg, 0);
      }
    else if (rescan)
!     {
!       /* This can only happen during reload.  Clear the same flag bits as
!        reload.  */
!       MEM_VOLATILE_P (reg) = 0;
!       RTX_UNCHANGING_P (reg) = 0;
!       MEM_IN_STRUCT_P (reg) = 0;
!       MEM_SCALAR_P (reg) = 0;
!       MEM_ATTRS (reg) = 0;
!
!       fixup_var_refs (reg, GET_MODE (reg), 0, reg, 0);
!     }

    return reg;
  }


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13132


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