check initializer to be zero in .bss-like sections
authorJan Beulich <jbeulich@suse.com>
Fri, 1 Jul 2016 14:23:24 +0000 (14:23 +0000)
committerJan Beulich <jbeulich@gcc.gnu.org>
Fri, 1 Jul 2016 14:23:24 +0000 (14:23 +0000)
commit059541fd113a360000b08753e355898cdeeaa431
treed6335a7ae0fa08c73f02972395d93d140ba010c9
parent51433308bb18319f173f75339e1ac1eb2fe24e80
check initializer to be zero in .bss-like sections

Just like gas, which has recently learned to reject such initializers,
gcc shouldn't accept such either.

gcc/
2016-07-01  Jan Beulich  <jbeulich@suse.com>

* varasm.c (get_variable_section): Validate initializer in
named .bss-like sections.

gcc/testsuite/
2016-07-01  Jan Beulich  <jbeulich@suse.com>

* gcc.dg/bss.c: New.

From-SVN: r237913
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/bss.c [new file with mode: 0644]
gcc/varasm.c