diff options
author | Dean Ferreyra <dferreyra@igc.org> | 2004-03-13 09:43:30 +0300 |
---|---|---|
committer | Denis Chertykov <denisc@gcc.gnu.org> | 2004-03-13 09:43:30 +0300 |
commit | 427ee3601dba2c12c5066af9b7508c5467e8209a (patch) | |
tree | c30f06b88586680a292b9f49c91ba387f39bc8e6 | |
parent | 58354fa8a14d6262918ea65282f36cd07e0c572f (diff) | |
download | gcc-427ee3601dba2c12c5066af9b7508c5467e8209a.zip gcc-427ee3601dba2c12c5066af9b7508c5467e8209a.tar.gz gcc-427ee3601dba2c12c5066af9b7508c5467e8209a.tar.bz2 |
re PR target/14047 (__progmem__ attribute doesn't work)
PR target/14047
* config/avr/avr.c (avr_progmem_p): Add "attributes" parameter.
(avr_insert_attributes): Pass "attributes" to avr_progmem_p.
* config/avr/avr-protos.h (avr_progmem_p): Change prototype.
From-SVN: r79433
-rw-r--r-- | gcc/config/avr/avr-protos.h | 2 | ||||
-rw-r--r-- | gcc/config/avr/avr.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/avr/avr-protos.h b/gcc/config/avr/avr-protos.h index 19ee9e8..d52d5bb 100644 --- a/gcc/config/avr/avr-protos.h +++ b/gcc/config/avr/avr-protos.h @@ -42,7 +42,7 @@ extern void gas_output_ascii (FILE *file, const char *str, size_t length); #ifdef TREE_CODE extern void asm_output_external (FILE *file, tree decl, char *name); -extern int avr_progmem_p (tree decl); +extern int avr_progmem_p (tree decl, tree attributes); #ifdef RTX_CODE /* inside TREE_CODE */ extern rtx avr_function_value (tree type, tree func); diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c index 705e07b..092f1da 100644 --- a/gcc/config/avr/avr.c +++ b/gcc/config/avr/avr.c @@ -4575,7 +4575,7 @@ avr_handle_fndecl_attribute (tree *node, tree name, if found return 1, otherwise 0. */ int -avr_progmem_p (tree decl) +avr_progmem_p (tree decl, tree attributes) { tree a; @@ -4583,7 +4583,7 @@ avr_progmem_p (tree decl) return 0; if (NULL_TREE - != lookup_attribute ("progmem", DECL_ATTRIBUTES (decl))) + != lookup_attribute ("progmem", attributes)) return 1; a=decl; @@ -4607,7 +4607,7 @@ avr_insert_attributes (tree node, tree *attributes) { if (TREE_CODE (node) == VAR_DECL && (TREE_STATIC (node) || DECL_EXTERNAL (node)) - && avr_progmem_p (node)) + && avr_progmem_p (node, *attributes)) { static const char dsec[] = ".progmem.data"; *attributes = tree_cons (get_identifier ("section"), |