[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-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #15 from CVS Commits --- The master branch has been updated by Richard Biener : https://gcc.gnu.org/g:e8d00353017f895d03a9eabae3506fd126ce1a2d commit r14-225-ge8d00353017f895d03a9eabae3506fd126ce1a2d Author: Richard Biener Date:

[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-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #14 from Richard Biener --- Btw, looking at the user modref_access_analysis::get_access_for_fnspec it interprets the size as upper bound (also for 't'). Likewise for get_access_for_fnspec. Just the check_fnspec use in

[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-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #13 from Jakub Jelinek --- strncpy second argument is an array rather than necessarily a string and characters after '\0' are not copied, so if n is non-zero, it reads between 1 and n characters from the source array (not sure if a

[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-25 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 Jakub Jelinek changed: What|Removed |Added CC||jsm28 at gcc dot gnu.org --- Comment

[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-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #11 from Richard Biener --- (In reply to Richard Biener from comment #10) > On the first testcase reverting the offending rev. shows that it causes > > [local count: 137085152]: > - MEM[(char *) + 12B] = 0; > - _19 =

[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-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 Richard Biener changed: What|Removed |Added CC||hubicka at gcc dot gnu.org ---

[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-25 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 Richard Biener changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org

[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 jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #8 from Jakub Jelinek --- In that case it started with r12-382-ged3c43224cc4e378d But maybe it would be better to track it separately.

[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 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 pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #6 from Andrew Pinski --- Note, changing `ptr < buf` to `ptr != buf` still invokes the wrong code being generated.

[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 jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109609 --- Comment #5 from Jakub Jelinek --- Yeah, exactly, the difference between the two revisions is first in tailc pass: --- pr109609.C.202t.tailc_ 2023-04-24 15:48:33.0 -0400 +++ pr109609.C.202t.tailc 2023-04-24