aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/avr/avr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/avr/avr.c')
-rw-r--r--gcc/config/avr/avr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index 8e64bcb..30ea833 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -4741,12 +4741,14 @@ avr_progmem_p (decl)
/* Encode section information about tree DECL */
void
-encode_section_info (decl)
+encode_section_info (decl, first)
tree decl;
+ int first;
{
if (TREE_CODE (decl) == FUNCTION_DECL)
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
- else if ((TREE_STATIC (decl) || DECL_EXTERNAL (decl))
+ else if (first
+ && (TREE_STATIC (decl) || DECL_EXTERNAL (decl))
&& TREE_CODE (decl) == VAR_DECL
&& avr_progmem_p (decl))
{