------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-20 02:30 ------- Testcase which was attached on PR 20427:
#include <iostream> void f(int n) { int * a = new int [n] () ; for (int i = 0; i < n; ++i) { std::cout << a[i]++ << ' '; } std::cout << '\n'; delete[] a; } int main() { f(5); f(5); f(5); f(5); } Which shows the issue more clearer. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23480