https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116534
Bug ID: 116534 Summary: [14 regression] internal compiler error with comparison of pointers calculated with array offset Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: john at drouhard dot dev Target Milestone: --- The following produces an internal compiler when compiled with -Wall starting with gcc 14: $ cat test.cpp template <class A> class Test { void foo(unsigned x, unsigned y) { bool test = &a[x] == &b[y]; } unsigned *a; unsigned *b; }; $ g++ -Wall ./test.cpp ./test.cpp: In member function 'void Test<A>::foo(unsigned int, unsigned int)': ./test.cpp:4:34: internal compiler error: Segmentation fault 4 | bool test = &a[x] == &b[y]; | ^ Please submit a full bug report, with preprocessed source (by using -freport-bug). See <https://gcc.gnu.org/bugs/> for instructions.