[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #13 from Richard Biener --- Author: rguenth Date: Wed Jan 10 14:51:07 2018 New Revision: 256430 URL: https://gcc.gnu.org/viewcvs?rev=256430&root=gcc&view=rev Log: 2018-01-10 Richard Biener PR testsuite/78768 * gcc.dg/pr78768.c: Un-XFAIL. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr78768.c
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #12 from Martin Sebor --- Yes, r244537 is the revision I meant, thank you. The test still isn't quite correct, though, because, as pr79062 and pr82770 point out, it fails to detect the missing sprintf warning in separate compilation.
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #11 from Thomas Preud'homme --- (In reply to Martin Sebor from comment #10) > The test was changed to link-only (to exercise LTO) in r244385. I think you meant r244537 (https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/testsuite/gcc.dg/pr78768.c?r1=244537&r2=244536&pathrev=244537) Best regards, Thomas
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #10 from Martin Sebor --- The test was changed to link-only (to exercise LTO) in r244385.
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 Thomas Preud'homme changed: What|Removed |Added CC||thopre01 at gcc dot gnu.org --- Comment #9 from Thomas Preud'homme --- It fails on arm-none-eabi too. But given it allocates 12 bytes on the stack and goes on to write 32 bytes that seems pretty normal, no? Shouldn't this test just be a compile test?
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #8 from Andrew Pinski --- This testcase fails on aarch64-linux-gnu.
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 Rainer Orth changed: What|Removed |Added CC||ro at gcc dot gnu.org --- Comment #7 from Rainer Orth --- The new gcc.dg/pr78768.c testcases XPASSes on Solaris, both sparc and x86, 32 and 64-bit: XPASS: gcc.dg/pr78768.c -Wformat-length (test for warnings, line 10)
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Martin Sebor --- r244326 adds LTO to -Walloca-larger-than, -Wformat-length, and -Wformat-truncation, making the -Walloca-larger-than warning work with LTO. Even though the gimple-ssa-sprintf pass seems to run with -flto the other two warnings still don't work for some reason. I've raised bug 79062 to track that.
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #5 from Martin Sebor --- Author: msebor Date: Wed Jan 11 17:28:52 2017 New Revision: 244326 URL: https://gcc.gnu.org/viewcvs?rev=244326&root=gcc&view=rev Log: PR c/78768 - -Walloca-larger-than and -Wformat-length warnings disabled by -flto gcc/ChangeLog: * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation): Also enable for LTO. gcc/testsuite/ChangeLog: PR c/78768 * gcc.dg/pr78768.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr78768.c Modified: trunk/gcc/c-family/ChangeLog trunk/gcc/c-family/c.opt trunk/gcc/testsuite/ChangeLog
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 --- Comment #4 from Martin Sebor --- Patch to add LTO to the set of languages these options are enabled for posted for review: https://gcc.gnu.org/ml/gcc-patches/2017-01/msg00658.html
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #3 from Martin Sebor --- Thanks. That works for -Walloca-larger-than but not for -Wformat-length for some reason. The pass doesn't run with -O2 and -flto.
[Bug c/78768] -Walloca-larger-than and -Wformat-length warnings disabled by -flto
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78768 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-12-13 Component|lto |c Ever confirmed|0 |1 --- Comment #2 from Richard Biener --- You need to add LTO to the list of languages allowed for the warning options in c-family/c.opt