[Bug c++/97151] GCC fails to optimize away uselessly allocated arrays (C++)

marat at slonopotamus dot org gcc-bugzilla@gcc.gnu.org
Mon Sep 21 15:14:44 GMT 2020


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97151

--- Comment #1 from Marat Radchenko <marat at slonopotamus dot org> ---
Another program that exhibits the same behavior:

int main()
{
    int *a = new int[10];
    a[0] = 0;
    delete[] a;

    return 0;
}


More information about the Gcc-bugs mailing list