[Bug target/83100] [8 Regression] powerpc: internal compiler error: in get_variable_section, at varasm.c:1150 with -fdata-sections
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 24 20:54:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83100
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I'll test:
--- gcc/varasm.c.jj 2017-11-21 20:23:02.000000000 +0100
+++ gcc/varasm.c 2017-11-24 21:43:55.616951823 +0100
@@ -986,9 +986,9 @@ decode_reg_name (const char *name)
bool
bss_initializer_p (const_tree decl)
{
- /* Do not put constants into the .bss section, they belong in a readonly
- section. */
- return (!TREE_READONLY (decl)
+ /* Do not put non-common constants into the .bss section, they belong in
+ a readonly section. */
+ return ((!TREE_READONLY (decl) || DECL_COMMON (decl))
&& (DECL_INITIAL (decl) == NULL
/* In LTO we have no errors in program; error_mark_node is used
to mark offlined constructors. */
after cooking up a testcase.
More information about the Gcc-bugs
mailing list