Message ID | 4F0EFB4D.1070106@gjlay.de |
---|---|
State | New |
Headers | show |
2012/1/12 Georg-Johann Lay <avr@gjlay.de>: > This PR prints a false warning because missing DECL_EXTERNAL test in > avr_encode_section_info that checks if progmem variables come with initializer > or not. > > Ok for trunk? > > PR target/51756 > * config/avr/avr.c (avr_encode_section_info): Test for absence of > DECL_EXTERNAL when checking for initializers of progmem variables. Approved. Denis.
http://gcc.gnu.org/viewcvs?view=revision&revision=183131
Index: gcc/config/avr/avr.c =================================================================== --- gcc/config/avr/avr.c (revision 183058) +++ gcc/config/avr/avr.c (working copy) @@ -7222,6 +7222,7 @@ avr_encode_section_info (tree decl, rtx 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,