This is the mail archive of the
mailing list for the GCC project.
r242024 - in /trunk/gcc/go/gofrontend: MERGE ex...
- From: ian at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Wed, 09 Nov 2016 21:41:59 -0000
- Subject: r242024 - in /trunk/gcc/go/gofrontend: MERGE ex...
Date: Wed Nov 9 21:41:58 2016
New Revision: 242024
compiler: rework static initializer code
Rename is_immutable to is_static_initializer to try to capture what it
really means. Be more precise about when an address expression, or a
binary expression, can be a static initializer. Don't check whether a
type has pointers when deciding whether an initializer must be
read-write, just check whether it is being used to initialize a global
variable. To make that work set the Translate_context function to NULL
for a global variable with a static initializer.
The effect of this is to let more global variables be initialized
directly, rather than being initialized in the generated init function.