https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483
--- Comment #25 from dennis luehring ---
(In reply to dennis luehring from comment #24)
> > However if I do not rename main to main2 I get in #0 testcase:
>
> also with main2 it gets optimized with gcc trunk on gcc.godbolt
correction: it works
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483
--- Comment #24 from dennis luehring ---
> However if I do not rename main to main2 I get in #0 testcase:
also with main2 it gets optimized with gcc trunk on gcc.godbolt
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483
--- Comment #20 from dennis luehring ---
thanks!
works with latest gcc.godbolt gcc trunk - on par with clang behavior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96945
dennis luehring changed:
What|Removed |Added
CC||dl.soluz at gmx dot net
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483
--- Comment #18 from dennis luehring ---
rechecked it with godbolt gcc-trunk and 14.2
gcc still does not optimize the std::vector case
clang is doing the optimization for at least 11 years
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483
--- Comment #16 from dennis luehring ---
the sample still gets reduced by clang to 160 with -O2 or -O3
clang:
main: # @main
mov eax, 160
ret
and gcc 11.2/trunk producing
-O2
main:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232
--- Comment #1 from dennis luehring ---
gcc 11.2
https://gcc.godbolt.org/z/jG8f6Phjc
clang 7
https://gcc.godbolt.org/z/c4Md5Yh1x
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103232
Bug ID: 103232
Summary: scoped template specalization is not supported (not
with C+17 nor C++20)
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: nor
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103186
--- Comment #5 from dennis luehring ---
-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:hs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103186
--- Comment #4 from dennis luehring ---
(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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103186
--- Comment #2 from dennis luehring ---
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"
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103186
--- Comment #1 from dennis luehring ---
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"
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
13 matches
Mail list logo