avr.c (valid_machine_decl_attribute): Allow `extern' declaration for data with "progm...
authorDenis Chertykov <denisc@overta.ru>
Tue, 10 Oct 2000 19:29:10 +0000 (19:29 +0000)
committerDenis Chertykov <denisc@gcc.gnu.org>
Tue, 10 Oct 2000 19:29:10 +0000 (23:29 +0400)
* config/avr/avr.c (valid_machine_decl_attribute): Allow `extern'
declaration for data with "progmem" attribute.

From-SVN: r36829

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

index 9d484442f7f5476e0ea728fd61aeb0f23168586f..b55b4c23d834d2e3ea620d2d9e75795b0b8c5d50 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 e3175275c5e4782e2fa373c046ee106babb2be0c..642fccb81a34dbb8ddc802ea5550ff29274f90ff 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.");