15112 – [3.4 Regression] optimizer generates code to write to unchanging memory (original) (raw)

Description p.van-hoof 2004-04-24 10:32:16 UTC

This is another incarnation of the problem where the optimizer generates code that uses unchanging memory as a spill spot. The problem can be reproduced as follows:

dogbert> gcc -c -O3 -funroll-loops a.c i.c dogbert> gcc a.o i.o dogbert> a.out Segmentation fault

In this case the const int q is being written to. This problem occurs only in gcc 3.4.0, not in gcc 3.3.3 or the mainline.

Comment 2 Drea Pinski 2004-04-24 13:45:48 UTC

Confirmed.

Comment 3 Eric Botcazou 2004-04-28 14:27:23 UTC

Investigating.