OSDN Git Service

* config/avr/avr.c (valid_machine_decl_attribute): Allow `extern'
authordenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Oct 2000 19:29:10 +0000 (19:29 +0000)
committerdenisc <denisc@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 10 Oct 2000 19:29:10 +0000 (19:29 +0000)
declaration for data with "progmem" attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36829 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/avr/avr.c

index 9d48444..b55b4c2 100644 (file)
@@ -1,3 +1,8 @@
+Tue Oct 10 23:14:33 2000  Denis Chertykov  <denisc@overta.ru>
+
+       * config/avr/avr.c (valid_machine_decl_attribute): Allow `extern'
+       declaration for data with "progmem" attribute.
+
 2000-10-09  Marek Michalkiewicz  <marekm@linux.org.pl>
 
        * config/avr/avr.c (out_shift_with_cnt): Use AS2 macro.
index e317527..642fccb 100644 (file)
@@ -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.");