https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96987
Bug ID: 96987 Summary: [11 regression] warning 'ptr' may be used uninitialized const pointer parameter Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: ibuclaw at gdcproject dot org Target Milestone: --- Possibly related to pr96564. Remove 'const' from the prototype, and there is no warning. --- extern void constparam(const int *ptr); int main() { int* ptr = (int*)__builtin_malloc(sizeof(int) * 8); if (ptr != 0) constparam(ptr); return 0; }