Commit ab8c5093 by Georg-Johann Lay Committed by Georg-Johann Lay

re PR target/51756 (wrong warning: uninitialized variable put into program memory area)

	PR target/51756
	* config/avr/avr.c (avr_encode_section_info): Test for absence of
	DECL_EXTERNAL when checking for initializers of progmem variables.

From-SVN: r183129
parent 82db3d43
2012-01-10 Georg-Johann Lay <avr@gjlay.de>
PR target/51756
* config/avr/avr.c (avr_encode_section_info): Test for absence of
DECL_EXTERNAL when checking for initializers of progmem variables.
2012-01-12 Ira Rosen <irar@il.ibm.com> 2012-01-12 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/51799 PR tree-optimization/51799
......
...@@ -7222,6 +7222,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p) ...@@ -7222,6 +7222,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
if (new_decl_p if (new_decl_p
&& decl && DECL_P (decl) && decl && DECL_P (decl)
&& NULL_TREE == DECL_INITIAL (decl) && NULL_TREE == DECL_INITIAL (decl)
&& !DECL_EXTERNAL (decl)
&& avr_progmem_p (decl, DECL_ATTRIBUTES (decl))) && avr_progmem_p (decl, DECL_ATTRIBUTES (decl)))
{ {
warning (OPT_Wuninitialized, warning (OPT_Wuninitialized,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment