diff options
author | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-18 10:38:57 +0000 |
---|---|---|
committer | brendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-18 10:38:57 +0000 |
commit | 0bf60c2b44d41a843f0672bf8f7c8d725db781b9 (patch) | |
tree | 0c6d9928460c8ea947b19cb363645ecf536b2a56 /gcc/varasm.c | |
parent | f9d6a7e2b3c3af006972e2006c96822d97032cc0 (diff) | |
download | gcc-0bf60c2b44d41a843f0672bf8f7c8d725db781b9.tar.gz |
./ChangeLog:
* tree.h (merge_machine_{type,decl}_attributes): Declare.
(split_specs_attrs, strip_attrs): Add prototypes.
* tree.c (merge_machine_{type,decl}_attributes): New functions.
* c-decl.c (duplicate_decls): Call merge_machine_decl_attributes.
Update olddecl's attributes too.
* c-common.c (strip_attrs): New function.
* c-typeck.c (common_type): Call merge_machine_type_attributes.
* varasm.c (make_function_rtl): New target macro REDO_SECTION_INFO_P.
(make_decl_rtl): Likewise.
* c-decl.c (shadow_tag_warned): Call split_specs_attrs.
./cp/ChangeLog:
* decl.c (duplicate_decls): Call merge_machine_decl_attributes.
Update olddecl's attributes too.
(strip_attrs): Remove function.
* typeck.c (common_type): Call merge_machine_type_attributes.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index 011b2341d88..1129007a049 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -523,6 +523,20 @@ make_function_rtl (decl) ENCODE_SECTION_INFO (decl); #endif } + else + { + /* ??? Another way to do this would be to do what halfpic.c does + and maintain a hashed table of such critters. */ + /* ??? Another way to do this would be to pass a flag bit to + ENCODE_SECTION_INFO saying whether this is a new decl or not. */ + /* Let the target reassign the RTL if it wants. + This is necessary, for example, when one machine specific + decl attribute overrides another. */ +#ifdef REDO_SECTION_INFO_P + if (REDO_SECTION_INFO_P (decl)) + ENCODE_SECTION_INFO (decl); +#endif + } /* Record at least one function has been defined. */ function_defined = 1; @@ -768,11 +782,26 @@ make_decl_rtl (decl, asmspec, top_level) #endif } } - /* If the old RTL had the wrong mode, fix the mode. */ - else if (GET_MODE (DECL_RTL (decl)) != DECL_MODE (decl)) + else { - rtx rtl = DECL_RTL (decl); - PUT_MODE (rtl, DECL_MODE (decl)); + /* If the old RTL had the wrong mode, fix the mode. */ + if (GET_MODE (DECL_RTL (decl)) != DECL_MODE (decl)) + { + rtx rtl = DECL_RTL (decl); + PUT_MODE (rtl, DECL_MODE (decl)); + } + + /* ??? Another way to do this would be to do what halfpic.c does + and maintain a hashed table of such critters. */ + /* ??? Another way to do this would be to pass a flag bit to + ENCODE_SECTION_INFO saying whether this is a new decl or not. */ + /* Let the target reassign the RTL if it wants. + This is necessary, for example, when one machine specific + decl attribute overrides another. */ +#ifdef REDO_SECTION_INFO_P + if (REDO_SECTION_INFO_P (decl)) + ENCODE_SECTION_INFO (decl); +#endif } } |