------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-17 04:12 ------- This is not fully related to PR 18178 but this case is just a missed optimization dealing with const int * vs int*.
Another testcase for the const* vs * is: void link_error(void); void f(void) { int a[1]; a[0] = 1; const int *b = a; if (*b != 1) link_error(); } If we look at the last tree dump we see there is a link_error in it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19659