[Bug tree-optimization/86259] min(4, strlen(s)) optimized to strlen(s) with -flto

2018-06-21 Thread gcc at thecybershadow dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86259 --- Comment #5 from Vladimir Panteleev --- (In reply to Andrew Pinski from comment #2) > Note gcc thinks strlen(s) is less than or equal to 3 as s is really T.s > which is an array of 4 in size and there for the last element has to be a > null ch

[Bug tree-optimization/86259] min(4, strlen(s)) optimized to strlen(s) with -flto

2018-06-20 Thread gcc at thecybershadow dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86259 --- Comment #4 from Vladimir Panteleev --- (In reply to Andrew Pinski from comment #2) > Note gcc thinks strlen(s) is less than or equal to 3 as s is really T.s > which is an array of 4 in size and there for the last element has to be a > null ch

[Bug tree-optimization/86259] min(4, strlen(s)) optimized to strlen(s) with -flto

2018-06-20 Thread gcc at thecybershadow dot net
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86259 --- Comment #3 from Vladimir Panteleev --- (In reply to Andrew Pinski from comment #1) > This code is undefined. What's the problem? Might be just a bad reduction. Original code is Xorg: https://cgit.freedesktop.org/xorg/xserver/tree/xkb/XKBGAl

[Bug tree-optimization/86259] New: min(4, strlen(s)) optimized to strlen(s) with -flto

2018-06-20 Thread gcc at thecybershadow dot net
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gcc at thecybershadow dot net Target Milestone: --- Host: x86_64-pc-linux-gnu Target: x86_64-pc-linux-gnu Build: x86_64-pc-linux

[Bug tree-optimization/73434] New: [6 Regression] Wrong code with casting, branches and aliasing

2016-08-10 Thread gcc at thecybershadow dot net
Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: gcc at thecybershadow dot net Target Milestone: --- /// test.c // #include typedef struct { unsigned char x