[Bug c++/120842] New: optimization for check many equal by bits or

2025-06-27 Thread rockeet at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- bool many_eq_max_13(unsigned int val) { [[assume(val < 32)]]; return val == 1 || val == 4 || val == 7 || val == 9 || val == 10 || val == 13; } b

[Bug target/120841] gcc prefer non-volatile register produces sub optimal code

2025-06-27 Thread rockeet at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120841 --- Comment #2 from rockeet --- (In reply to Andrew Pinski from comment #1) > Gcc is already better than llvm by figuring out the return of memcpy is the > first argument. > > I am not sure if the one extra move is going hurt here either. Yes,

[Bug c/120841] New: gcc prefer non-volatile register produces sub optimal code

2025-06-26 Thread rockeet at gmail dot com via Gcc-bugs
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- void foo(char* buf, const char* src, size_t n) { memcpy(buf, src, n); memcpy(buf + n, &n, sizeof(n)); } Both gcc and g++ produces(h

[Bug c/120833] gcc does not recognize tail calls

2025-06-26 Thread rockeet at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120833 --- Comment #1 from rockeet --- FYI: https://godbolt.org/z/svE61Ghzv

[Bug c/120833] New: gcc does not recognize tail calls

2025-06-26 Thread rockeet at gmail dot com via Gcc-bugs
Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- struct S1 { const char* data; long size; }; struct S2 { const char* data; long size; }; __attribute__((noinline)) struct S1 get_s1(const char* s, long n) { struct S1 x

[Bug c++/120822] New: bad warn -Wredundant-move on return std::move

2025-06-25 Thread rockeet at gmail dot com via Gcc-bugs
++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- #include struct A { int a = 0; }; struct B : A {}; A fa() { B b; return std::move(b); // 1. should not warn } B fb() { B b; return std::move(b

[Bug c++/120255] C++ template member class parameter name should shadow member name

2025-05-13 Thread rockeet at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120255 --- Comment #1 from rockeet --- clang compiled the code successfully.

[Bug c++/120255] New: C++ template member class parameter name should shadow member name

2025-05-13 Thread rockeet at gmail dot com via Gcc-bugs
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- template parameter name should hide member name. ``` struct A { struct B {}; struct C { template void foo1(B

[Bug libstdc++/106871] New: std::function should not check func ptr on each call

2022-09-07 Thread rockeet at gmail dot com via Gcc-bugs
Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- std::function should not check func ptr on each call, an optimization should be: define a 'default throw' function which just throws a std::bad_function

[Bug target/80878] -mcx16 (enable 128 bit CAS) on x86_64 seems not to work on 7.1.0

2020-01-28 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80878 rockeet changed: What|Removed |Added CC||rockeet at gmail dot com --- Comment #19 from

[Bug c++/86876] New: friend typedef'ed class in template class can not compile

2018-08-06 Thread rockeet at gmail dot com
ormal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- // code: #include template struct A { template struct X { void foo(U* p) { printf("p->a = %d\n", p->a);

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-08-15 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 rockeet changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-08-14 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 rockeet changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-08-10 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 rockeet changed: What|Removed |Added CC||rockeet at gmail dot com --- Comment #9 from

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-08-08 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 rockeet changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|INVALID

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-07-18 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 --- Comment #3 from rockeet --- @Martin Liška Yes, my use case is: __m128i key128 = { key }; // key is an unsigned char int idx = _mm_cmpestri(key128, 1, *(const __m128i*)(data), // don't require memory align len, _SIDD_UBYTE_OPS|_SI

[Bug target/81389] _mm_cmpestri segfault on -O0

2017-07-18 Thread rockeet at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81389 --- Comment #2 from rockeet --- I had also tested intel compiler with -O0 serveral years ago, it was OK.

[Bug c++/81389] New: _mm_cmpestri segfault on -O0

2017-07-10 Thread rockeet at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: rockeet at gmail dot com Target Milestone: --- With option -O0, intrinsic _mm_cmpestri generate a mmload and a _mm_cmpestri, in which mmload raise a CPU hardware exception. The reason is: mmload require memory align to 16, but _mm_cmpestri

[Bug c++/57155] casting to const reference error

2013-05-03 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57155 --- Comment #2 from rockeet 2013-05-03 10:35:53 UTC --- In this case, C++ shouldn't create a temporal object and bound the const ref to it. The C++ standard (C++11) says: 5.2.1 Subscripting [expr.sub] 1 A postfix expression followed by an expre

[Bug c++/57155] New: casting to const reference error

2013-05-03 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57155 Bug #: 57155 Summary: casting to const reference error Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: major Priorit

[Bug c++/53505] New: bitfield with bool type generated broken object code

2012-05-28 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53505 Bug #: 53505 Summary: bitfield with bool type generated broken object code Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: critical

[Bug c++/23885] incorrect template two-stage name-lookup

2011-12-13 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23885 --- Comment #10 from rockeet 2011-12-13 09:38:45 UTC --- Sorry, missed output of g++ 4.6.0: Begin Output void f(A) void f(B) void f(B) void f(T) [with T = int] void f(T) [with T = int*] End Output

[Bug c++/23885] incorrect template two-stage name-lookup

2011-12-13 Thread rockeet at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23885 rockeet changed: What|Removed |Added CC||rockeet at gmail dot com --- Comment #9 from