[Bug c++/111159] New: [13 Regression] False positive -Wdangling-reference
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59 Bug ID: 59 Summary: [13 Regression] False positive -Wdangling-reference Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: daniel at constexpr dot org Target Milestone: --- GCC 13.2.0 as well as git from today report a false positive -Wdangling-reference warning for the following C++ code: struct A { int * i; int & b() { return *i; } }; int g = 42; A a() { return A{ &g }; } int main() { const int & i = a().b(); return i; }
[Bug tree-optimization/107129] New: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107129 Bug ID: 107129 Summary: [13 Regression] False positive -Wstringop-overflow warning with -O2 or -O3 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: daniel at constexpr dot org Target Milestone: --- Created attachment 53652 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53652&action=edit Reduced testcase The attached testcase produces the following warning with GCC 13.0.0 20221002 (commit 3290dcf): $ /opt/gcc-dev/bin/c++ -O2 -c test.cpp test.cpp: In member function ‘void C::f()’: test.cpp:39:33: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=] 39 | c[i] = e(1.f - i, i); |~^~~~ test.cpp:9:23: note: at offset 1 into destination object ‘C4::r’ of size 1 9 | unsigned char r; |
[Bug tree-optimization/97953] [9/10 Regression] ICE (segfault) during GIMPLE pass: loopdone compiling libgcc/config/libbid/bid128_fma.c:190:1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97953 --- Comment #29 from Daniel Scharrer --- Hi, shouldn't this be Known to fail 10.3.**1** Known to work 10.3.**2**
[Bug tree-optimization/103986] New: Miscompilation with -O2 -funswitch-loops and __builtin_unreachable in ternary operator
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103986 Bug ID: 103986 Summary: Miscompilation with -O2 -funswitch-loops and __builtin_unreachable in ternary operator Product: gcc Version: 10.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: daniel at constexpr dot org Target Milestone: --- Created attachment 52166 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52166&action=edit Reduced test case The loop in the attached reduced test case does not terminate when compiled with -O3 or -O2 -funswitch-loops with GCC 9.4.0 or GCC 10.3.1 even though it should only iterate 144 times. Curiously, the programs works as expected when using an if() instead of the ternary operator in the assume macro but maybe that's just luck. I could not reproduce the issue with GCC 8.5.0, GCC 11.2.1 or my GCC 12 checkout from 20220102.