On Fri, Dec 04, 2020 at 10:52:17AM +0100, Andrea Corallo via Gcc-help wrote: > stefan@xxxxxxxxx writes: > I might open a bug but my understanding is that const is generally > not used for optimizations. Am I wrong? extern const int x = 42; int f(void) { return x; } The code generated for f does not load the value for x from memory: it returns 42 always. Segher