This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch,avr] PR81407: Error if progmem variable needs constructing.
- From: Denis Chertykov <chertykov at gmail dot com>
- To: Georg-Johann Lay <avr at gjlay dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 12 Jul 2017 15:01:43 +0400
- Subject: Re: [patch,avr] PR81407: Error if progmem variable needs constructing.
- Authentication-results: sourceware.org; auth=none
- References: <eeed8253-3aa7-c950-290c-129003cd65f1@gjlay.de>
2017-07-12 12:45 GMT+04:00 Georg-Johann Lay <avr@gjlay.de>:
> 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.
Approved.