avoid early asm output
authorRichard Biener <rguenther@suse.de>
Thu, 18 Jun 2020 09:02:26 +0000 (11:02 +0200)
committerRichard Biener <rguenther@suse.de>
Thu, 18 Jun 2020 10:11:44 +0000 (12:11 +0200)
commit5553433d7b38379f8dac17502f55fff1c9cf3827
tree291a9404b08b99f9d8c386f1322e9546f2db979f
parentda2b7c7f0a136b4d00520a08d4c443fc2e3a467d
avoid early asm output

This avoids early assembler output via the gimplifier creating
new static CTORs.  The output machinery seems to be prepared to
output constants recursively and it's just a matter of
appropriately defering or not defering output.

This also has the advantage of not outputting .string for
optimized away local aggregate initializers containing string
references.

2020-06-18  Richard Biener  <rguenther@suse.de>

* varasm.c (assemble_variable): Make sure to not
defer output when outputting addressed constants.
(output_constant_def_contents): Likewise.
(add_constant_to_table): Take and pass on whether to
defer output.
(output_addressed_constants): Likewise.
(output_constant_def): Pass on whether to defer output
to add_constant_to_table.
(tree_output_constant_def): Defer output of constants.
gcc/varasm.c