[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-03-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-03-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #17 from Martin Sebor --- Author: msebor Date: Wed Mar 7 19:30:31 2018 New Revision: 258339 URL: https://gcc.gnu.org/viewcvs?rev=258339=gcc=rev Log: PR tree-optimization/84468 - bogus -Wstringop-truncation despite assignment after

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-03-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 Richard Biener changed: What|Removed |Added Priority|P3 |P1 --- Comment #16 from Richard Biener

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 Richard Biener changed: What|Removed |Added Target Milestone|--- |8.0

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-27 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #15 from Romain Geissler --- Hi, This latest patch seems to fix the occurences I have in my own code. Thanks ;) Cheers, Romain

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-26 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #14 from Martin Sebor --- (In reply to Romain Geissler from comment #13) Ah, right. It's not skipping over debug statements. That's easier to fix than pr84561. This should do it: Index: gcc/tree-ssa-strlen.c

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-25 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #13 from Romain Geissler --- Hi, It looks like that the code in #comment 11 works when you build just with -O2, but not when you add debug symbols: -O2 -g. Do we have a way to ignore debug statements when looking for the next

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #12 from Martin Sebor --- Yes, all the relevant tests pass with the patch. There is no warning for either the test case in comment #0 or the one in comment #11. The change from v1 of the patch is just the addition of test for null

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-25 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #11 from Romain Geissler --- Hi, Indeed this version of the patch doesn't have any segv. However it seems that it doesn't fix anymore the initial bug report. Does it actually passes the new tests you introduced in your patch ?

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #10 from Martin Sebor --- Thanks, I can reproduce it with that test case. Checking for the basic block being null fixes the SEGV for me. Let me retest this and post an update for review. Index: gcc/tree-ssa-strlen.c

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-24 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #9 from Romain Geissler --- Ok I was able to strip down the ICE to this very simple reproducer: < static char keyword[4]; static void f (void) { strncpy(keyword, "if ", 4); } EOF

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-24 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #8 from Romain Geissler --- I am currently testing a little variant of your patch (check that "nextbb" if not NULL before trying to use it): Index: gcc/tree-ssa-strlen.c

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #7 from Martin Sebor --- Thanks for the early heads up! Can you please attach the translation unit for the kernel file that GCC faults on?

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-24 Thread romain.geissler at amadeus dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 --- Comment #6 from Romain Geissler --- Hi, Tried to apply this patch on top of current trunk. During my build process, I bootstrap a complete Linux/binutils/glibc/gcc toolchain following the Linux From Scratch guidelines. Without the patch,

[Bug tree-optimization/84468] [8 Regression] bogus -Wstringop-truncation despite assignment after conditional strncpy

2018-02-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84468 Martin Sebor changed: What|Removed |Added Keywords||patch Summary|[gcc 8]