OSDN Git Service

Backport from mainline r183129
authorgjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Jan 2012 17:23:32 +0000 (17:23 +0000)
committergjl <gjl@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 12 Jan 2012 17:23:32 +0000 (17:23 +0000)
PR target/51756
* config/avr/avr.c (avr_encode_section_info): Test for absence of
DECL_EXTERNAL when checking for initializers of progmem variables.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@183131 138bc75d-0d04-0410-961f-82ee72b054a4

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

index f31e675..46fcde4 100644 (file)
@@ -1,4 +1,11 @@
-2012-01-12  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
+2012-01-12  Georg-Johann Lay  <avr@gjlay.de>
+
+       Backport from mainline r183129
+       PR target/51756
+       * config/avr/avr.c (avr_encode_section_info): Test for absence of
+       DECL_EXTERNAL when checking for initializers of progmem variables.
+
+22012-01-12  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
 
        Backport from mainline
        2012-01-11  Matthew Gretton-Dann  <matthew.gretton-dann@arm.com>
index b5a61a3..6c4b517 100644 (file)
@@ -5154,6 +5154,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
   if (new_decl_p
       && decl && DECL_P (decl)
       && NULL_TREE == DECL_INITIAL (decl)
+      && !DECL_EXTERNAL (decl)
       && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
     {
       warning (OPT_Wuninitialized,