https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116288
Bug ID: 116288 Summary: C++ overloading Product: gcc Version: 14.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: hans.buchmann.wantuch at gmail dot com Target Milestone: --- Created attachment 58869 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58869&action=edit generated with -freport-bug Compiling the code: ---------8<---------8<---------8<---------8<---------8< void hex(long unsigned val,unsigned w=0); void hex(long long unsigned val,unsigned w=0); void hex(const char key[],unsigned char val); void hex(const char key[],unsigned short val); void hex(const char key[],unsigned val); void hex(const char key[],long unsigned val); void hex(const char key[],long long unsigned val); void hex(const char key[],int val); using Trap=void(*)(); struct Entry { static const unsigned CODE=1; const unsigned code[CODE]; Trap trap; constexpr Entry(Trap trap) :code { 0xd5033fbf,// 0x000 dmb sy } ,trap(trap){} void debug()const { hex("disht=", (const unsigned char*)(&(trap)) - (const unsigned char*)(code)); } }; ---------8<---------8<---------8<---------8<---------8< with: aarch64-linux-gnu-g++ -freport-bug -c -o bug.o bug.cc results in: bug.cc: In member function 'void Entry::debug() const': bug.cc:35:6: internal compiler error: Segmentation fault 35 | hex("disht=", (const unsigned char*)(&(trap)) - | ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 36 | (const unsigned char*)(code)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0x1fa7957 internal_error(char const*, ...) ???:0 0x78ad27 build_new_function_call(tree_node*, vec<tree_node*, va_gc, vl_embed>**, int) ???:0 0x96285d finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool, bool, int) ???:0 0x90d9cc c_parse_file() ???:0 0xa17011 c_common_parse_file() ???:0 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. Sincerely Hans Buchmann