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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/avr/avr.c b/gcc/config/avr/avr.c
index e317527..642fccb 100644
--- a/gcc/config/avr/avr.c
+++ b/gcc/config/avr/avr.c
@@ -4318,7 +4318,7 @@ valid_machine_decl_attribute (decl, attributes, attr, args)
if (is_attribute_p ("progmem", attr)
&& (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
{
- if (DECL_INITIAL (decl) == NULL_TREE)
+ if (DECL_INITIAL (decl) == NULL_TREE && !DECL_EXTERNAL (decl))
{
warning ("Only initialized variables can be placed into "
"program memory area.");