Non-optimal stack usage with C++ temporaries

2011-05-11 Thread Matt Fischer
I've noticed some behavior with g++ that seems strange to me. I don't know if there's some technicality in the C++ standard that requires this, or if it's just a limitation to the optimization code, but it seemed strange so I thought I'd see if anybody could shed more light on it. Here's a test p

Internal compiler error in targhooks.c: default_secondary_reload (ARM/Thumb)

2011-04-04 Thread Matt Fischer
I'm getting an internal compiler error on the following test program: void func(int a, int b, int c, int d, int e, int f, int g, short int h) { assert(a < 100); assert(b < 100); assert(c < 100); assert(d < 100); assert(e < 100); assert(f < 100);

Constant initializers

2010-10-18 Thread Matt Fischer
I'm attempting to port some code to gcc, and in a couple of places it's using a construct that it doesn't like. A simplified example is the following (this is in global scope): static const int A = 1; static const int B = A; This compiles fine with g++, but gcc says "error: initializer element i