[patch,avr] PR81407: Error if progmem variable needs constructing.

Georg-Johann Lay avr@gjlay.de
Wed Jul 12 08:45:00 GMT 2017


Hi, if the C++ front-end decides that something will need constructing,
it will silently put the stuff into .rodata so that according
pgm_read_xxx will read garbage from .progmem.

As proposed by Jason, this patch diagnoses such situations.

Ok to commit?

Johann

	PR target/81407
	* config/avr/avr.c (avr_encode_section_info)
	[progmem && !TREE_READONLY]: Error if progmem object needs
	constructing.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr81407-progmem-construct.diff
Type: text/x-patch
Size: 1254 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20170712/bc6c4139/attachment.bin>


More information about the Gcc-patches mailing list