------- Comment #7 from pinskia at gcc dot gnu dot org 2006-02-15 15:37 ------- Here is a self contained program without using libstdc++: int array[10] = {5, 4, 3, 2, 1, 0}; int array1[10] = {5, 4, 3, 2, 1, 0}; int array2[10] = {5, 4, 3, 2, 1, 0}; #include <cassert>
void g(int *a) { *a = 0; } void test4() { g(array+6); for(int i = 0; i < 6; ++i) assert(array[i] == 5 - i); for(int i = 0; i < 6; ++i) { assert(array[i] == 5 - i); assert(array1[i] == 5 - i); assert(array2[i] == 5 - i); } } int main() { test4(); } -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2006-02-15 15:37:33 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26304