[Ada] Fix PR ada/77968

Eric Botcazou ebotcazou@adacore.com
Fri Oct 14 10:28:00 GMT 2016


As reported by Richard, the LTO-specific change I made on 07/11 can yield ICEs 
on simple testcases with -flto, so the attached patch simply backs it out and 
adds an appropriate LTO testcase, as well as a couple of other LTO testcases 
which currently fail with a bogus warning.

Tested on x86_64-suse-linux, applied on the mainline.


2016-10-14  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/77968
	* gcc-interface/utils.c (create_var_decl): Do not clear TREE_READONLY
	in LTO mode for an external variable.
	(can_materialize_object_renaming_p): Move up.


2016-10-14  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/lto18.ad[sb]: New test.
	* gnat.dg/lto18_pkg.ads: New helper.
	* gnat.dg/lto19.adb: New test.
	* gnat.dg/lto19_pkg1.ad[sb]: New helper.
	* gnat.dg/lto19_pkg2.ad[sb]: Likewise.
	* gnat.dg/lto20.adb: New test.
	* gnat.dg/lto20_pkg.ad[sb]: New helper.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto18.adb
Type: text/x-adasrc
Size: 365 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto18.ads
Type: text/x-adasrc
Size: 97 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto19_pkg1.ads
Type: text/x-adasrc
Size: 206 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto18_pkg.ads
Type: text/x-adasrc
Size: 656 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto19_pkg2.adb
Type: text/x-adasrc
Size: 98 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto19.adb
Type: text/x-adasrc
Size: 246 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto19_pkg1.adb
Type: text/x-adasrc
Size: 92 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0006.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto19_pkg2.ads
Type: text/x-adasrc
Size: 70 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0007.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto20.adb
Type: text/x-adasrc
Size: 207 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0008.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto20_pkg.adb
Type: text/x-adasrc
Size: 143 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0009.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto20_pkg.ads
Type: text/x-adasrc
Size: 308 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0010.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 4011 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20161014/d99d53ae/attachment-0011.bin>


More information about the Gcc-patches mailing list