------- Comment #11 from pinskia at gcc dot gnu dot org 2005-11-02 15:53 ------- The following fails with -O1 -fno-tree-sra. typedef struct { struct {unsigned Xl_ui;} Ul_i; struct {unsigned Xl_uf;} Ul_f; } l_fp; void dolfptoa(short ndec) { l_fp work; work.Ul_f.Xl_uf = 0x535f3d8; while (ndec > 0) {
ndec--; work.Ul_i.Xl_ui = 0; work.Ul_i.Xl_ui = 0; if ((work.Ul_f.Xl_uf) & 0x80000000) (work.Ul_i.Xl_ui) |= 0x1; (work.Ul_f.Xl_uf) <<= 1; (work.Ul_i.Xl_ui) <<= 1; if ((work.Ul_f.Xl_uf) & 0x80000000) (work.Ul_i.Xl_ui) |= 0x1; (work.Ul_f.Xl_uf) <<= 1; (work.Ul_i.Xl_ui) <<= 1; if (!(work.Ul_i.Xl_ui < 10)) abort (); } } int main() { dolfptoa(6); return 0; } ---- The -fno-tree-sra is need as otherwise SRA actually does it work and renames the PHIs correctly. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24627