> But why do we want the loop at all if the rounded size is zero? > It's a compile-time constant after all.
Yes, this never occurs in practice because of the value set for PROBE_INTERVAL and STACK_CHECK_PROTECT. This can only occur in the dynamic case handled in explow.c:probe_stack_range. All the stack checking code, in the middle-end and the various back-ends, use a uniform implementation. This can probably be optimized a bit, but I'm not sure it's really worth the hassle. -- Eric Botcazou