[Bug tree-optimization/27090] FRE does loop past previous type casts

2006-04-10 Thread pinskia at gcc dot gnu dot org
--- Comment #4 from pinskia at gcc dot gnu dot org 2006-04-10 18:12 --- Well really more like: int f(int *a) { int t = *a; unsigned *b = (unsigned *)a; int *c = (int*)b; return *c + t; } Which should be the same as: int f(int *a) { return *a * 2; } --

[Bug tree-optimization/27090] FRE does loop past previous type casts

2006-04-09 Thread pinskia at gcc dot gnu dot org
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-04-09 17:40 --- Actually this testcase comes down to: int f(int *a) { *a = 1; unsigned *b = (unsigned *)a; int *c = (int*)b; return *c; } And this is caught correctly at the RTL level. -- pinskia at gcc dot gnu