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:
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
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
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=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=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