re PR middle-end/25505 (gcc uses way too much stack space for this code)