diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-30 05:04:38 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-30 05:04:38 +0000 |
commit | c9891437485466308ee5bb3b047d17ef62152402 (patch) | |
tree | 90dc9931e97d11f9a0953b896af59c8872979b38 /gcc/config | |
parent | b1b72f562b4fc47c44e1e73ba872080c1543f1cb (diff) | |
download | gcc-c9891437485466308ee5bb3b047d17ef62152402.tar.gz |
* config/i386/winnt.c (i386_pe_encode_section_info): Smash rtlname's
XSTR in place, so we don't lose SYMBOL_REF_DECL info.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83893 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/i386/winnt.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/config/i386/winnt.c b/gcc/config/i386/winnt.c index cf80087c870..f0b1aec0821 100644 --- a/gcc/config/i386/winnt.c +++ b/gcc/config/i386/winnt.c @@ -488,16 +488,16 @@ i386_pe_encode_section_info (tree decl, rtx rtl, int first) { default_encode_section_info (decl, rtl, first); - if (TREE_CODE (decl) == FUNCTION_DECL) + if (first && TREE_CODE (decl) == FUNCTION_DECL) { - if (lookup_attribute ("stdcall", - TYPE_ATTRIBUTES (TREE_TYPE (decl)))) - XEXP (DECL_RTL (decl), 0) = - gen_rtx_SYMBOL_REF (Pmode, gen_stdcall_suffix (decl)); - else if (lookup_attribute ("fastcall", - TYPE_ATTRIBUTES (TREE_TYPE (decl)))) - XEXP (DECL_RTL (decl), 0) = - gen_rtx_SYMBOL_REF (Pmode, gen_fastcall_suffix (decl)); + tree type_attributes = TYPE_ATTRIBUTES (TREE_TYPE (decl)); + rtx rtlname = XEXP (rtl, 0); + if (GET_CODE (rtlname) == MEM) + rtlname = XEXP (rtlname, 0); + if (lookup_attribute ("stdcall", type_attributes)) + XSTR (rtlname, 0) = gen_stdcall_suffix (decl); + else if (lookup_attribute ("fastcall", type_attributes)) + XSTR (rtlname, 0) = gen_fastcall_suffix (decl); } /* Mark the decl so we can tell from the rtl whether the object is |