From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F28693838032; Sat, 29 May 2021 11:54:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F28693838032 From: "vopl at bk dot ru" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/100825] New: function signature constraints are not a part of mangled name Date: Sat, 29 May 2021 11:54:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vopl at bk dot ru X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 May 2021 11:54:26 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D100825 Bug ID: 100825 Summary: function signature constraints are not a part of mangled name Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vopl at bk dot ru Target Milestone: --- $ cat b.cpp && echo EOFFFFFF template void foo() // 1 {} template void foo() requires (sizeof(char) =3D=3D sizeof(T)) // 2 { foo();// call 1 - instantiate "void foo()" } template void foo() requires (sizeof(int) =3D=3D sizeof(T)) // 3 {} void use() { foo(); // call 2 foo(); // call 3 - instantiate "void foo() requires (sizeof(i= nt) =3D=3D sizeof(T))" } // so, two different function instantiated with same mangled name EOFFFFFF $ g++ -std=3Dc++20 -v -c b.cpp=20 Using built-in specs. COLLECT_GCC=3Dg++ Target: x86_64-pc-linux-gnu Configured with: /var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-10.2.0/configure --host=3Dx86_64-pc-linux-gnu --build=3Dx86_64-pc-linux-gnu --prefix=3D/usr --bindir=3D/usr/x86_64-pc-linux-gnu/gcc-bin/10.2.0 --includedir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include --datadir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0 --mandir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/man --infodir=3D/usr/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/info --with-gxx-include-dir=3D/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g+= +-v10 --with-python-dir=3D/share/gcc-data/x86_64-pc-linux-gnu/10.2.0/python --enable-languages=3Dc,c++,fortran --enable-obsolete --enable-secureplt --disable-werror --with-system-zlib --disable-nls --enable-checking=3Drelea= se --with-bugurl=3Dhttps://bugs.gentoo.org/ --with-pkgversion=3D'Gentoo 10.2.0= -r5 p6' --disable-esp --enable-libstdcxx-time --with-build-config=3Dbootstrap-lto --enable-shared --enable-threads=3Dposix --enable-__cxa_atexit --enable-clocale=3Dgnu --enable-multilib --with-multilib-list=3Dm32,m64 --disable-fixed-point --enable-targets=3Dall --enable-libgomp --disable-lib= ssp --disable-libada --enable-systemtap --enable-vtable-verify --with-zstd --enable-lto --with-isl --disable-isl-version-check --enable-default-pie --disable-default-ssp Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (Gentoo 10.2.0-r5 p6)=20 COLLECT_GCC_OPTIONS=3D'-std=3Dc++2a' '-v' '-c' '-shared-libgcc' '-mtune=3Dg= eneric' '-march=3Dx86-64' /usr/libexec/gcc/x86_64-pc-linux-gnu/10.2.0/cc1plus -quiet -v -D_GNU_SOURCE b.cpp -quiet -dumpbase b.cpp -mtune=3Dgeneric -march=3Dx86-64 -auxbase b -s= td=3Dc++2a -version -o /tmp/ccdHBZw0.s GNU C++17 (Gentoo 10.2.0-r5 p6) version 10.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/in= clude" #include "..." search starts here: #include <...> search starts here: /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10 /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/x86_64-pc-linux-gnu /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include/g++-v10/backward /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/include-fixed /usr/include End of search list. GNU C++17 (Gentoo 10.2.0-r5 p6) version 10.2.0 (x86_64-pc-linux-gnu) compiled by GNU C version 10.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.23-GMP GGC heuristics: --param ggc-min-expand=3D100 --param ggc-min-heapsize=3D131= 072 Compiler executable checksum: 109a96b688365221cca69113b161e683 COLLECT_GCC_OPTIONS=3D'-std=3Dc++2a' '-v' '-c' '-shared-libgcc' '-mtune=3Dg= eneric' '-march=3Dx86-64' /usr/lib/gcc/x86_64-pc-linux-gnu/10.2.0/../../../../x86_64-pc-linux-gnu/bi= n/as -v --64 -o b.o /tmp/ccdHBZw0.s GNU assembler version 2.35.2 (x86_64-pc-linux-gnu) using BFD version (Gentoo 2.35.2 p1) 2.35.2 /tmp/ccdHBZw0.s: Assembler messages: /tmp/ccdHBZw0.s:61: Error: symbol `_Z3fooIiEvv' is already defined --------------- My expectations: mangled names must be different, because mangled name is b= ased on the signature and a signature includes the requires-clause as a part=