[Bug middle-end/109609] [12/13 Regression] tail call for function even when passing a ptr which references a local array still

2023-04-25 Thread gburca-gnu at ebixio dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #17 from Gabriel Burca --- Speaking of the size parameter, my workaround for the original issue was to pre-compute the size argument a different way. This however resulted in a warning that's both right and wrong. Here's the sample

[Bug middle-end/109609] [12/13/14 Regression] tail call for function even when passing a ptr which references a local array still

2023-04-24 Thread gburca-gnu at ebixio dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #7 from Gabriel Burca --- Here's the code that still fails with -O3 -fno-optimize-sibling-calls: ``` #include #include #define N 23 #define MAX_LEN 13 char dst[N + 1]; void stringify(uint64_t id) { char buf[MAX_LEN]; char

[Bug c++/109609] New: Invalid strncpy/strncat optimization in GCC 12

2023-04-24 Thread gburca-gnu at ebixio dot com via Gcc-bugs
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gburca-gnu at ebixio dot com Target Milestone: --- The following code prints uninitialized garbage when compiled with -O2 or -O3 in all versions of GCC 12 (including trunk). It works correctly in GCC 11. Replacing strncpy

[Bug c++/86126] New: Note when linking libraries built with different -std options

2018-06-12 Thread gburca-gnu at ebixio dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: gburca-gnu at ebixio dot com Target Milestone: --- Created attachment 44265 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44265=edit Bug demo Linking together libraries that h

[Bug tree-optimization/85651] Invalid -Warray-bounds warning with -O3

2018-05-08 Thread gburca-gnu at ebixio dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85651 --- Comment #3 from Gabriel Burca --- Does that also fix the issue with the ignored diagnostic pragmas?

[Bug c++/85651] Invalid -Warray-bounds warning with -O3

2018-05-04 Thread gburca-gnu at ebixio dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85651 --- Comment #1 from Gabriel Burca --- I suspect the "for" loop in appendAux() is being optimized and replaced with a memcpy(), which then leads to the warning.

[Bug c++/85651] New: Invalid -Warray-bounds warning with -O3

2018-05-04 Thread gburca-gnu at ebixio dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: gburca-gnu at ebixio dot com Target Milestone: --- Created attachment 44069 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=44069=edit Code demonstrating issue https://godbolt.org/g/LmJDVa When compiled with g++ 8.