[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2025-01-15 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2024-11-25 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2024-11-12 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug tree-optimization/96945] unused std::vector is not always optimized away

2024-10-08 Thread dl.soluz at gmx dot net via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96945 dennis luehring changed: What|Removed |Added CC||dl.soluz at gmx dot net --- Comment

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2024-10-08 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
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:

[Bug c++/103232] scoped template specalization is not supported (not with C+17 nor C++20)

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug c++/103232] New: scoped template specalization is not supported (not with C+17 nor C++20)

2021-11-14 Thread dl.soluz at gmx dot net via Gcc-bugs
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dl.soluz at gmx dot net Target Milestone: --- C++17 allows scoped template specalization - clang 7+ and VStudio 2017/2019 allow it - gcc 11.2 and trunk are not able to compile

[Bug c++/103186] redefinition of template symbol error with strange error diagnostic

2021-11-11 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug c++/103186] redefinition of template symbol error with strange error diagnostic

2021-11-11 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug c++/103186] redefinition of template symbol error with strange error diagnostic

2021-11-11 Thread dl.soluz at gmx dot net via Gcc-bugs
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"

[Bug c++/103186] redefinition of template symbol error with strange error diagnostic

2021-11-11 Thread dl.soluz at gmx dot net via Gcc-bugs
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"

[Bug c++/103186] New: redefinition of template symbol error with strange error diagnostic

2021-11-11 Thread dl.soluz at gmx dot net via Gcc-bugs
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

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2014-06-03 Thread dl.soluz at gmx dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #7 from dennis luehring --- clang got now support for (see: http://clang-developers.42468.n3.nabble.com/missing-optimization-opportunity-for-const-std-vector-compared-to-std-array-td4034587.html#none) void *__builtin_operator_new(s

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2013-09-29 Thread dl.soluz at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #5 from dennis luehring --- but clang 3.3 produces only the optimized output when using -O2 (-O3 still invokes the loop optimizer too early - but this is a known bug) so it seems that the llvm/clang developers think that new/delete ca

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2013-09-28 Thread dl.soluz at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #4 from dennis luehring --- rechecked with latest clang 3.3(3.4) on http://gcc.godbolt.org/ reduces both cases std::array and std::vector down to return 160

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2013-09-20 Thread dl.soluz at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #3 from dennis luehring --- according to the feedback from the clang mailing list by Benjamin Kramer http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-September/032111.html llvm seems to not have any problem in removing new/delete in t

[Bug tree-optimization/58483] missing optimization opportunity for const std::vector compared to std::array

2013-09-20 Thread dl.soluz at gmx dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58483 --- Comment #2 from dennis luehring --- i missed the commandline g++-4.8 -O3 -march=native -std=c++11 -fdump-tree-optimized test.cpp

[Bug tree-optimization/58483] New: missing optimization opportunity for const std::vector compared to std::array

2013-09-20 Thread dl.soluz at gmx dot net
: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: dl.soluz at gmx dot net this small testprogram shows a missing optimization opportunity for const std::vector when using initialization_list - in compared to