public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic
@ 2021-11-11 10:06 dl.soluz at gmx dot net
  2021-11-11 10:13 ` [Bug c++/103186] " dl.soluz at gmx dot net
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: dl.soluz at gmx dot net @ 2021-11-11 10:06 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103186
           Summary: redefinition of template symbol error with strange
                    error diagnostic
           Product: gcc
           Version: 11.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dl.soluz at gmx dot net
  Target Milestone: ---

Created attachment 51764
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51764&action=edit
test source

How to reproduce

use the attached test.cpp - i reduced it as much as possible while keeping the
error(s) intact

good case - problematik parts are disabled:

gcc -Wall -Wextra -std=c++17 test.cpp

test 1: (https://gcc.godbolt.org/z/WvqbWq1e5)

gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=1 
est.cpp:77:12: error: redefinition of ‘const char
_ZTSZN12GetSetHelperIaE3setESt8functionIFvvEEEd_UlDpOT_E_ []’
   77 | int main(){}
      |            ^
test.cpp:77:12: note: ‘const char
_ZTSZN12GetSetHelperIaE3setESt8functionIFvvEEEd_UlDpOT_E_ [54]’ previously
defined here

test 2:
gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=2

/usr/bin/ld:
/tmp/ccCdRNNd.o:(.data.rel.ro._ZTIZN12GetSetHelperIhE3setESt8functionIFvvEEEd_UlDpOT_E_[_ZTIZN12GetSetHelperIhE3setESt8functionIFvvEEEd_UlDpOT_E_]+0x0):
undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld:
/tmp/ccCdRNNd.o:(.data.rel.ro._ZTIZN12GetSetHelperIaE3setESt8functionIFvvEEEd_UlDpOT_E_[_ZTIZN12GetSetHelperIaE3setESt8functionIFvvEEEd_UlDpOT_E_]+0x0):
undefined reference to `vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld:
/tmp/ccCdRNNd.o:(.data.rel.local.DW.ref.__gxx_personality_v0[DW.ref.__gxx_personality_v0]+0x0):
undefined reference to `__gxx_personality_v0'
collect2: error: ld returned 1 exit status

this linker problem does not occure on gcc.godbolt - maybe a Ubuntu ld only
problem

Test with other versions, compilers:

error occures also with gcc.godbolt trunk/11.2/11.1, does not happen with gcc
10.3 or lower

does not happen with Clang versions down to 8.x and further
does not happen with VS2017/2019(up to date versions)

System:

using up-to-date(11.11.2021) Ubuntu 21.10 x64 with default gcc 11.2.0, clang
13.x and default ld 2.37

$ uname -a
Linux linux 5.13.0-20-generic #20-Ubuntu SMP Fri Oct 15 14:21:35 UTC 2021
x86_64 x86_64 x86_64 GNU/Linux

$ gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-7ubuntu2'
--with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-11
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-gcn/usr
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2) 

$ ld -v
GNU ld (GNU Binutils for Ubuntu) 2.37

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
@ 2021-11-11 10:13 ` dl.soluz at gmx dot net
  2021-11-11 10:13 ` dl.soluz at gmx dot net
                   ` (17 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dl.soluz at gmx dot net @ 2021-11-11 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from dennis luehring <dl.soluz at gmx dot net> ---
Created attachment 51765
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51765&action=edit
ii-file

output of "gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=1 -save-temps"

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
  2021-11-11 10:13 ` [Bug c++/103186] " dl.soluz at gmx dot net
@ 2021-11-11 10:13 ` dl.soluz at gmx dot net
  2021-11-11 10:21 ` pinskia at gcc dot gnu.org
                   ` (16 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dl.soluz at gmx dot net @ 2021-11-11 10:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from dennis luehring <dl.soluz at gmx dot net> ---
Created attachment 51766
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51766&action=edit
s-file

output of "gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=1 -save-temps"

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
  2021-11-11 10:13 ` [Bug c++/103186] " dl.soluz at gmx dot net
  2021-11-11 10:13 ` dl.soluz at gmx dot net
@ 2021-11-11 10:21 ` pinskia at gcc dot gnu.org
  2021-11-11 10:25 ` dl.soluz at gmx dot net
                   ` (15 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-11 10:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
>gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=2


This is wrong, you should use g++ to link as you need to link against libstdc++
which gcc does not do which is why you are not seeing it on gcc.godbolt.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (2 preceding siblings ...)
  2021-11-11 10:21 ` pinskia at gcc dot gnu.org
@ 2021-11-11 10:25 ` dl.soluz at gmx dot net
  2021-11-11 10:36 ` dl.soluz at gmx dot net
                   ` (14 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dl.soluz at gmx dot net @ 2021-11-11 10:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from dennis luehring <dl.soluz at gmx dot net> ---
(In reply to Andrew Pinski from comment #3)
> >gcc -Wall -Wextra -std=c++17 test.cpp -DTEST=2
> 
> 
> This is wrong, you should use g++ to link as you need to link against
> libstdc++ which gcc does not do which is why you are not seeing it on
> gcc.godbolt.

stupid me - my cmake scripts uses g++, accidentally switched to gcc - thanks
so the -DTEST=2 is NOT a bug

$ g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.2.0-7ubuntu2'
--with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-11
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32
--enable-multilib --with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-ZPT0kp/gcc-11-11.2.0/debian/tmp-gcn/usr
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (3 preceding siblings ...)
  2021-11-11 10:25 ` dl.soluz at gmx dot net
@ 2021-11-11 10:36 ` dl.soluz at gmx dot net
  2021-11-11 10:38 ` pinskia at gcc dot gnu.org
                   ` (13 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: dl.soluz at gmx dot net @ 2021-11-11 10:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from dennis luehring <dl.soluz at gmx dot net> ---
-DTEST=1 compiles under Ubuntu 21.04 with g++ 10.3.0

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/10/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 10.3.0-1ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-10/README.Bugs
--enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr
--with-gcc-major-version-only --program-suffix=-10
--program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --with-target-system-zlib=auto
--enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib
--with-tune=generic
--enable-offload-targets=nvptx-none=/build/gcc-10-gDeRY6/gcc-10-10.3.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-10-gDeRY6/gcc-10-10.3.0/debian/tmp-gcn/usr,hsa
--without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
--with-build-config=bootstrap-lto-lean --enable-link-mutex
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1)

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (4 preceding siblings ...)
  2021-11-11 10:36 ` dl.soluz at gmx dot net
@ 2021-11-11 10:38 ` pinskia at gcc dot gnu.org
  2021-11-11 10:41 ` [Bug c++/103186] [11/12 Regression] " pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-11 10:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase for the first issue (note it is a different error but the
problem is the same):
using Callback = void();
template <typename ValueType>
struct GetSetHelper
{
    static void set( Callback callback_ = []() {}  ){}
};
template <typename First>
void m()
{
    GetSetHelper<First>::set();
}
template <typename... Types>
void n( )
{
    ( ( m<Types>( ) ), ... );
}
int main()
{
    GetSetHelper<signed>::set();
    n<signed, unsigned>( );
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] redefinition of template symbol error with strange error diagnostic
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (5 preceding siblings ...)
  2021-11-11 10:38 ` pinskia at gcc dot gnu.org
@ 2021-11-11 10:41 ` pinskia at gcc dot gnu.org
  2021-11-11 13:11 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default rguenth at gcc dot gnu.org
                   ` (11 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-11 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Keywords|link-failure                |assemble-failure
   Target Milestone|---                         |11.3
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-11-11

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The ICE with reduced testcase:
<source>:21:1: error: Two symbols with same comdat_group are not linked by the
same_comdat_group list.
   21 | }
      | ^

But this is with checking turned on only.
Without checking we get an assembler failure:
/tmp/ccBw63Kh.s: Assembler messages:
/tmp/ccBw63Kh.s:147: Error: symbol
`_ZZN12GetSetHelperIiE3setEPFvvEEd_NKUlvE_clEv' is already defined
/tmp/ccBw63Kh.s:168: Error: symbol
`_ZZN12GetSetHelperIiE3setEPFvvEEd_NUlvE_4_FUNEv' is already defined
/tmp/ccBw63Kh.s:190: Error: symbol
`_ZZN12GetSetHelperIiE3setEPFvvEEd_NKUlvE_cvS2_Ev' is already defined

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (6 preceding siblings ...)
  2021-11-11 10:41 ` [Bug c++/103186] [11/12 Regression] " pinskia at gcc dot gnu.org
@ 2021-11-11 13:11 ` rguenth at gcc dot gnu.org
  2021-11-12 18:55 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default since r11-7965-g23be03a0f243a084 marxin at gcc dot gnu.org
                   ` (10 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-11 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default since r11-7965-g23be03a0f243a084
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (7 preceding siblings ...)
  2021-11-11 13:11 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default rguenth at gcc dot gnu.org
@ 2021-11-12 18:55 ` marxin at gcc dot gnu.org
  2021-12-07  1:00 ` [Bug c++/103186] [11/12 Regression] ICE with " pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-12 18:55 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org
            Summary|[11/12 Regression] ICE with |[11/12 Regression] ICE with
                   |fold-expression and lambdas |fold-expression and lambdas
                   |as default                  |as default since
                   |                            |r11-7965-g23be03a0f243a084

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-7965-g23be03a0f243a084.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambdas as default since r11-7965-g23be03a0f243a084
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (8 preceding siblings ...)
  2021-11-12 18:55 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default since r11-7965-g23be03a0f243a084 marxin at gcc dot gnu.org
@ 2021-12-07  1:00 ` pinskia at gcc dot gnu.org
  2021-12-07  1:01 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  1:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Just lambdas as default is needed really, reduced testcase:
struct f
{
  template<class T1>
   f(const T1&){}
};


template<typename T> class A {
public:
    void foo(A<T> a, const f& fn = [](){}) { }
    void bar(A<T> a) { foo(a); }
};
int main() {
    A<int> a;
    a.foo(a);
    a.bar(a);
    return 0;
}

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambdas as default since r11-7965-g23be03a0f243a084
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (9 preceding siblings ...)
  2021-12-07  1:00 ` [Bug c++/103186] [11/12 Regression] ICE with " pinskia at gcc dot gnu.org
@ 2021-12-07  1:01 ` pinskia at gcc dot gnu.org
  2021-12-30 13:48 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-07  1:01 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mortenkschou at gmail dot com

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 103595 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambdas as default since r11-7965-g23be03a0f243a084
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (10 preceding siblings ...)
  2021-12-07  1:01 ` pinskia at gcc dot gnu.org
@ 2021-12-30 13:48 ` pinskia at gcc dot gnu.org
  2022-01-07  8:49 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-30 13:48 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rpsalmi at gmail dot com

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 103867 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambdas as default since r11-7965-g23be03a0f243a084
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (11 preceding siblings ...)
  2021-12-30 13:48 ` pinskia at gcc dot gnu.org
@ 2022-01-07  8:49 ` pinskia at gcc dot gnu.org
  2022-01-26 19:37 ` [Bug c++/103186] [11/12 Regression] ICE with lambda as default argument in template jason at gcc dot gnu.org
                   ` (5 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-07  8:49 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mac.zyg2 at protonmail dot com

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 103937 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (12 preceding siblings ...)
  2022-01-07  8:49 ` pinskia at gcc dot gnu.org
@ 2022-01-26 19:37 ` jason at gcc dot gnu.org
  2022-02-01 19:15 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jason at gcc dot gnu.org @ 2022-01-26 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org
             Status|NEW                         |ASSIGNED
            Summary|[11/12 Regression] ICE with |[11/12 Regression] ICE with
                   |lambdas as default since    |lambda as default argument
                   |r11-7965-g23be03a0f243a084  |in template

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11/12 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (13 preceding siblings ...)
  2022-01-26 19:37 ` [Bug c++/103186] [11/12 Regression] ICE with lambda as default argument in template jason at gcc dot gnu.org
@ 2022-02-01 19:15 ` cvs-commit at gcc dot gnu.org
  2022-02-01 19:17 ` [Bug c++/103186] [11 " jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-02-01 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:8a3789786205376e3ba19fdefadd8937e8ac534e

commit r12-6973-g8a3789786205376e3ba19fdefadd8937e8ac534e
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Jan 26 16:42:57 2022 -0500

    c++: lambda in template default argument [PR103186]

    The problem with this testcase was that since my patch for PR97900 we
    weren't preserving DECL_UID identity for parameters of instantiations of
    templated functions, so using those parameters as the keys for the
    defarg_inst map broke.  I think this was always fragile given the
    possibility of redeclarations, so instead of reverting that change let's
    switch to keying off the function.

    Memory use compiling stdc++.h is not noticeably different.

            PR c++/103186

    gcc/cp/ChangeLog:

            * pt.cc (defarg_inst): Use tree_vec_map_cache_hasher.
            (defarg_insts_for): New.
            (tsubst_default_argument): Adjust.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/lambda/lambda-defarg10.C: New test.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (14 preceding siblings ...)
  2022-02-01 19:15 ` cvs-commit at gcc dot gnu.org
@ 2022-02-01 19:17 ` jason at gcc dot gnu.org
  2022-03-22  5:18 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  18 siblings, 0 replies; 20+ messages in thread
From: jason at gcc dot gnu.org @ 2022-02-01 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.0
            Summary|[11/12 Regression] ICE with |[11 Regression] ICE with
                   |lambda as default argument  |lambda as default argument
                   |in template                 |in template

--- Comment #14 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 12 so far.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (15 preceding siblings ...)
  2022-02-01 19:17 ` [Bug c++/103186] [11 " jason at gcc dot gnu.org
@ 2022-03-22  5:18 ` cvs-commit at gcc dot gnu.org
  2022-04-12 17:28 ` jason at gcc dot gnu.org
  2022-07-20 15:11 ` redi at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-22  5:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:97949b796566ad10895e69aadafb2462e45617b6

commit r11-9684-g97949b796566ad10895e69aadafb2462e45617b6
Author: Jason Merrill <jason@redhat.com>
Date:   Wed Jan 26 16:42:57 2022 -0500

    c++: lambda in template default argument [PR103186]

    The problem with this testcase was that since my patch for PR97900 we
    weren't preserving DECL_UID identity for parameters of instantiations of
    templated functions, so using those parameters as the keys for the
    defarg_inst map broke.  I think this was always fragile given the
    possibility of redeclarations, so instead of reverting that change let's
    switch to keying off the function.

    Memory use compiling stdc++.h is not noticeably different.

            PR c++/103186

    gcc/cp/ChangeLog:

            * pt.c (defarg_inst): Use tree_vec_map_cache_hasher.
            (defarg_insts_for): New.
            (tsubst_default_argument): Adjust.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/lambda/lambda-defarg10.C: New test.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (16 preceding siblings ...)
  2022-03-22  5:18 ` cvs-commit at gcc dot gnu.org
@ 2022-04-12 17:28 ` jason at gcc dot gnu.org
  2022-07-20 15:11 ` redi at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: jason at gcc dot gnu.org @ 2022-04-12 17:28 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #16 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11.3.

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [Bug c++/103186] [11 Regression] ICE with lambda as default argument in template
  2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
                   ` (17 preceding siblings ...)
  2022-04-12 17:28 ` jason at gcc dot gnu.org
@ 2022-07-20 15:11 ` redi at gcc dot gnu.org
  18 siblings, 0 replies; 20+ messages in thread
From: redi at gcc dot gnu.org @ 2022-07-20 15:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |striker159 at web dot de

--- Comment #17 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 106372 has been marked as a duplicate of this bug. ***

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2022-07-20 15:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-11 10:06 [Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic dl.soluz at gmx dot net
2021-11-11 10:13 ` [Bug c++/103186] " dl.soluz at gmx dot net
2021-11-11 10:13 ` dl.soluz at gmx dot net
2021-11-11 10:21 ` pinskia at gcc dot gnu.org
2021-11-11 10:25 ` dl.soluz at gmx dot net
2021-11-11 10:36 ` dl.soluz at gmx dot net
2021-11-11 10:38 ` pinskia at gcc dot gnu.org
2021-11-11 10:41 ` [Bug c++/103186] [11/12 Regression] " pinskia at gcc dot gnu.org
2021-11-11 13:11 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default rguenth at gcc dot gnu.org
2021-11-12 18:55 ` [Bug c++/103186] [11/12 Regression] ICE with fold-expression and lambdas as default since r11-7965-g23be03a0f243a084 marxin at gcc dot gnu.org
2021-12-07  1:00 ` [Bug c++/103186] [11/12 Regression] ICE with " pinskia at gcc dot gnu.org
2021-12-07  1:01 ` pinskia at gcc dot gnu.org
2021-12-30 13:48 ` pinskia at gcc dot gnu.org
2022-01-07  8:49 ` pinskia at gcc dot gnu.org
2022-01-26 19:37 ` [Bug c++/103186] [11/12 Regression] ICE with lambda as default argument in template jason at gcc dot gnu.org
2022-02-01 19:15 ` cvs-commit at gcc dot gnu.org
2022-02-01 19:17 ` [Bug c++/103186] [11 " jason at gcc dot gnu.org
2022-03-22  5:18 ` cvs-commit at gcc dot gnu.org
2022-04-12 17:28 ` jason at gcc dot gnu.org
2022-07-20 15:11 ` redi at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).