[Bug tree-optimization/85741] [meta-bug] bogus/missing -Wformat-overflow

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85741 Bug 85741 depends on bug 104012, which changed state. Bug 104012 Summary: [12 regression] -Wformat-truncation warnings not taking previous length check into account https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104012 What|Removed

[Bug tree-optimization/104012] [12 regression] -Wformat-truncation warnings not taking previous length check into account

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104012 --- Comment #6 from Martin Sebor --- To expand a bit on the fuzziness at level 1. The logic is documented under the -Wformat-overflow warning like so: Numeric arguments that are known to be bounded to a subrange of their type, or string argu

[Bug middle-end/101475] missing -Wstringop-overflow storing a compound literal

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101475 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/88443] [meta-bug] bogus/missing -Wstringop-overflow warnings

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 Bug 88443 depends on bug 101475, which changed state. Bug 101475 Summary: missing -Wstringop-overflow storing a compound literal https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101475 What|Removed |Added --

[Bug tree-optimization/104038] New: ranger infinite loop on a PHI statement

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 Bug ID: 104038 Summary: ranger infinite loop on a PHI statement Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-opt

[Bug tree-optimization/104038] ranger infinite loop on a PHI statement

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 --- Comment #1 from Martin Sebor --- Created attachment 52197 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52197&action=edit Patch needed to trigger the infinite loop. When the attached patch is applied the infinite loop can be triggere

[Bug tree-optimization/104038] ranger infinite loop on a PHI statement

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 --- Comment #2 from Martin Sebor --- Created attachment 52198 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52198&action=edit Unreduced test case. The attached translation unit reproduces the infinite loop.

[Bug tree-optimization/104038] ranger infinite loop on a PHI statement

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 --- Comment #3 from Martin Sebor --- The basic block being analyzed is bb 2 in clang::clangd::stdlib::initialize(). What's unusual about it is that it's a sequence of 2464 assignments like so: : SymCount_21 = 0; SymCount_22 = SymCount_21 + 1;

[Bug tree-optimization/104038] ranger infinite loop on a PHI statement

2022-01-14 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 --- Comment #4 from Martin Sebor --- The problem is reproducible with -O1 and above. To confirm it's not infinite recursion I let the process run for about an hour before killing it. Memory consumption seems to slowly but steadily increase as

[Bug tree-optimization/104038] ranger infinite loop on a PHI statement while building Clang

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104038 Martin Sebor changed: What|Removed |Added Summary|ranger infinite loop on a |ranger infinite loop on a

[Bug middle-end/63272] GCC should warn when using pointer to dead scoped variable within the same function

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63272 Martin Sebor changed: What|Removed |Added Target Milestone|--- |12.0 Status|ASSIGNED

[Bug tree-optimization/80532] warning on pointer access after free

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80532 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|---

[Bug tree-optimization/90906] diagnose returning pointers to freed memory

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90906 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug tree-optimization/90905] missing -Wreturn-local-addr returning a local std::string::c_str()

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90905 --- Comment #9 from Martin Sebor --- This still isn't diagnosed by GCC 12 even with its -Wuse-after-free and -Wdangling-pointer.

[Bug c++/49974] missing -Wreturn-local-addr for indirectly returning reference to local/temporary

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49974 --- Comment #18 from Martin Sebor --- This detection is partially implemented in GCC 12 by the -Wdnagling-pointer: $ cat pr49974.C && gcc -O -S -Wall pr49974.C struct X { }; inline const X& f(const X& r) { return r; } const X& g() { X x;

[Bug c++/84544] Missing warning when returning a reference to internal variable inside a lambda

2022-01-15 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84544 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #3

[Bug tree-optimization/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org Assi

[Bug tree-optimization/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #4 from Martin Sebor --- Actually, this is already supposed to be handled but the code is not effective due to a typo. This fixes it: diff --git a/gcc/gimple-ssa-warn-access.cc b/gcc/gimple-ssa-warn-access.cc index f639807a78a..f95

[Bug middle-end/104075] New: bogus/missing -Wuse-after-free

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104075 Bug ID: 104075 Summary: bogus/missing -Wuse-after-free Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end

[Bug middle-end/104075] bogus/missing -Wuse-after-free

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104075 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug middle-end/104076] New: bogus -Wdangling-pointer on a conditional

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104076 Bug ID: 104076 Summary: bogus -Wdangling-pointer on a conditional Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle

[Bug middle-end/104076] bogus -Wdangling-pointer on a conditional

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104076 Martin Sebor changed: What|Removed |Added Ever confirmed|0 |1 Status|UNCONFIRMED

[Bug middle-end/104077] New: bogus/missing -Wdangling-pointer

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104077 Bug ID: 104077 Summary: bogus/missing -Wdangling-pointer Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end

[Bug middle-end/104077] bogus/missing -Wdangling-pointer

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104077 Martin Sebor changed: What|Removed |Added Last reconfirmed||2022-01-17 Alias|

[Bug middle-end/103483] [12 regression] context-sensitive ranges change triggers stringop-overread

2022-01-17 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103483 --- Comment #17 from Martin Sebor --- Jaosn: this is how all middle-end warnings have always behaved. They trigger on invalid statements present in the IL. A statement is considered invalid when any of its operands is out of bounds or in some

[Bug tree-optimization/104082] Wdangling-pointer: 2 * false positive ?

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 Martin Sebor changed: What|Removed |Added Resolution|--- |INVALID Blocks|

[Bug middle-end/104077] bogus/missing -Wdangling-pointer

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104077 Bug 104077 depends on bug 104082, which changed state. Bug 104082 Summary: Wdangling-pointer: 2 * false positive ? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104082 What|Removed |Added ---

[Bug tree-optimization/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 Martin Sebor changed: What|Removed |Added CC||amacleod at redhat dot com --- Comment #

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 Martin Sebor changed: What|Removed |Added Component|tree-optimization |middle-end --- Comment #7 from Martin Se

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #9 from Martin Sebor --- My mistake, a PHI is an OR of its operands, not an AND. With that, the IL doesn't rule out that the subsequent realloc() call isn't made with the argument to a prior successful realloc(). So for the more in

[Bug middle-end/104076] bogus -Wdangling-pointer on a conditional

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104076 --- Comment #1 from Martin Sebor --- This instance of the warning has disappeared with r12-6694.

[Bug middle-end/104103] [12 regression] many excess errors from g++.dg/asan/asan_test.C after r12-6606

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104103 --- Comment #3 from Martin Sebor --- (In reply to seurer from comment #2) The warning for gcc/testsuite/gcc.dg/torture/pr57147-2.c looks correct. The g_return_jmp_buf variable has zero size but it's being passed to a function declared to take

[Bug middle-end/104076] bogus -Wdangling-pointer on a conditional

2022-01-18 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104076 --- Comment #3 from Martin Sebor --- Looking at the IL before r12-6694 I'm not sure I see what could be done to keep the warning from triggering but maybe someone has an idea for a solution I'm not seeing, in case this comes back with a differen

[Bug c/89161] Bogus -Wformat-overflow warning with value range known

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89161 Martin Sebor changed: What|Removed |Added Known to fail|10.0|10.3.0, 11.2.0, 12.0 Last reconfirmed|2

[Bug tree-optimization/93518] missing warning on a possible overflow by sprintf %s with an allocated argument

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93518 Martin Sebor changed: What|Removed |Added Last reconfirmed|2021-12-23 00:00:00 |2022-1-19 Known to fail|

[Bug tree-optimization/96367] bogus -Wformat-truncation in ILP32

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96367 Martin Sebor changed: What|Removed |Added Known to fail|11.0|11.2.0, 12.0 --- Comment #2 from Martin S

[Bug tree-optimization/104119] unexpected -Wformat-overflow after strlen in ILP32 since Ranger integration

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104119 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Summary|Wrong

[Bug tree-optimization/104119] [12 Regression] unexpected -Wformat-overflow after strlen in ILP32 since Ranger integration

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104119 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Summary|unexpected

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #13 from Martin Sebor --- I confused things (including myself) yesterday, sorry. Let me try again, with just the -O2 behavior for the test case in comment #2: void *xrealloc (void *ptr, int size) { void *ret = __builtin_realloc (

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #14 from Martin Sebor --- Removing the test for !size from the first conditional avoids the warning. I don't fully understand what the code tries to do but the following avoids it at -O2 (only): void *xrealloc (void *ptr, int size)

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #17 from Martin Sebor --- Having spent some time trying to understand the function I think the following simplification should capture its intent. It compiles without warnings at all levels: void *xrealloc (void *ptr, size_t size)

[Bug middle-end/104069] -Werror=use-after-free false positive on elfutils-0.186

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104069 --- Comment #20 from Martin Sebor --- This warning, like all others, is meant to help find common bugs in ordinary code. It shouldn't be expected to reflect implementation-defined behavior or to be free of false positives. Tricky code that tri

[Bug c++/104134] Bootstrap on FreeBSD files compiling gcc/cp/error.cc

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104134 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #2

[Bug bootstrap/104135] [12 Regression] -Werror=format-diag breaks rtl checking bootstrap

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104135 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #3

[Bug c++/104134] Bootstrap on FreeBSD files compiling gcc/cp/error.cc

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104134 --- Comment #9 from Martin Sebor --- The code uses the M_ macro: pp_printf (pp, M_(""), variety); on my machine it expands into: pp_printf (pp, ((cxx_pp)->translate_identifiers ? gettext ("") : ("")), variety); and GCC doesn't warn most

[Bug tree-optimization/104119] [12 Regression] unexpected -Wformat-overflow after strlen in ILP32 since Ranger integration

2022-01-19 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104119 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #4 from Martin Sebor

[Bug libstdc++/100516] [11/12 Regression] Unexpected -Wstringop-overread in deque initialization from empty initializer_list

2022-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100516 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug tree-optimization/103121] [12 Regression] Warnings in cp/optimize.c causing build failure

2022-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121 --- Comment #26 from Martin Sebor --- (In reply to Andrew Macleod from comment #25) ... > I also don't get the warning anymore on trunk. > > Is there still an issue here? The strlen pass was converted to Ranger in g:6b8b959675a3e14cfdd2145bd62

[Bug c++/104148] [11/12 Regression] -Wformat warning no longer warns about () wrapped args since r11-2457

2022-01-20 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104148 --- Comment #3 from Martin Sebor --- I suspect the unwanted suppression is because check_function_argument_recurse() calls warning_suppressed_p (param) instead of warning_suppressed_p (param, ) (for each of the warnings it checks). So any other

[Bug tree-optimization/103121] [12 Regression] Warnings in cp/optimize.c causing build failure

2022-01-21 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121 --- Comment #29 from Martin Sebor --- >From memory: At use1 the cache is empty so go and find its definition and record the offset at that point, with the pointer addition as the context. And at use2 we look up the same offset. So use1 won't r

[Bug tree-optimization/104165] [12 Regression] -Warray-bounds for unreachable code inlined from std::sort()

2022-01-21 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104165 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW CC|

[Bug tree-optimization/103121] [12 Regression] Warnings in cp/optimize.c causing build failure

2022-01-21 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103121 --- Comment #31 from Martin Sebor --- I believe I understand what both of you are saying and (also) that the cache behaves correctly. It stores offsets based on the pointer definition statements. Here's a test that I think reproduces the condi

[Bug tree-optimization/104203] [12 Regressions] huge compile-time regression since r12-6606-g9d6a0f388eb048f8

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104203 Martin Sebor changed: What|Removed |Added Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org

[Bug tree-optimization/104203] [12 Regressions] huge compile-time regression since r12-6606-g9d6a0f388eb048f8

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104203 --- Comment #7 from Martin Sebor --- (In reply to Richard Biener from comment #5) ... > Martin, can you add a new timevar to timevar.def and use that in > pass_data_waccess please? Will do. The bottleneck is the PHI handling in the access warn

[Bug tree-optimization/104203] [12 Regressions] huge compile-time regression since r12-6606-g9d6a0f388eb048f8

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104203 --- Comment #9 from Martin Sebor --- The underlying problem is that when the pointer_query class fails to determine the pointer provenance for an SSA variable it doesn't update the cache, matter how laborious the computation was. The next time

[Bug target/104213] [12 Regression] bogus use-after-free in virtual dtor with -ffat-lto-objects on ARM

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104213 Martin Sebor changed: What|Removed |Added Blocks||104075 CC|

[Bug tree-optimization/101831] [11/12 Regression] Spurious maybe-uninitialized warning on std::array::size

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101831 Martin Sebor changed: What|Removed |Added Known to fail||11.2.0, 12.0 Summary|Spurious

[Bug tree-optimization/104215] New: bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 Bug ID: 104215 Summary: bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: n

[Bug tree-optimization/104203] [12 Regressions] huge compile-time regression in pointer_query since r12-6606-g9d6a0f388eb048f8

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104203 Martin Sebor changed: What|Removed |Added Summary|[12 Regressions] huge |[12 Regressions] huge

[Bug driver/104216] New: -w overrides #pragma GCC diagnostic which overrides -Werror

2022-01-24 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104216 Bug ID: 104216 Summary: -w overrides #pragma GCC diagnostic which overrides -Werror Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal P

[Bug tree-optimization/104215] bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 --- Comment #2 from Martin Sebor --- The use in your example is undefined in C (as is any other use of an indeterminate pointer value). C++ made using pointers made it implementation-defined a few years ago while still allowing for it to crash,

[Bug tree-optimization/104215] bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 --- Comment #3 from Martin Sebor --- I meant to say "C++ made it implementation-defined to use a pointer made indeterminate by the pointee's lifetime having ended."

[Bug middle-end/104232] New: spurious -Wuse-after-free after conditional free

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232 Bug ID: 104232 Summary: spurious -Wuse-after-free after conditional free Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component:

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232 Martin Sebor changed: What|Removed |Added Blocks||104075 Assignee|unassigned at

[Bug middle-end/104232] [12 Regression] spurious -Wuse-after-free after conditional free

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104232 Martin Sebor changed: What|Removed |Added URL|https://bugzilla.redhat.com |https://bugzilla.redhat.com

[Bug tree-optimization/104203] [12 Regressions] huge compile-time regression in pointer_query since r12-6606-g9d6a0f388eb048f8

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104203 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/104215] bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc

2022-01-25 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 --- Comment #5 from Martin Sebor --- To "use" means to evaluate. The strict C semantics are that the realloc() argument becomes indeterminate after the function has returned non-null, whether or not the returned pointer is the same as the argum

[Bug tree-optimization/104215] bogus -Wuse-after-free=3 due to forwprop moving a pointer test after realloc

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104215 --- Comment #7 from Martin Sebor --- The kernel false positive is discussed in bug 104069 comment 13. I don't think it's related to this issue but you're of course right that this warning isn't immune to false positives. That's true for all wa

[Bug tree-optimization/18487] Warnings for pure and const functions that are not actually pure or const

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug c++/36159] C++ compiler should issue a warning with missing new operator

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36159 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c++/68047] diagnose placement new with misaligned buffer

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68047 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug c++/70019] VLA size overflow not detected

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70019 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org ---

[Bug c++/70816] bogus error __builtin_strcmp is not a constant expression in a constexpr function

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c/72783] Fortify scanf %s, %[ conversion specifiers

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72783 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c/80806] gcc does not warn if local array is memset only

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80806 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug tree-optimization/86199] warn on calls to strlen with same argument as in strnlen

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86199 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c++/86568] -Wnonnull warnings should highlight the relevant argument not the closing parenthesis

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86568 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug tree-optimization/86571] AIX NaNQ and NaNS output format conflicts with __builtin_sprintf

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86571 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/87593] conflicting format_arg attributes on a declaration accepted

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87593 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug middle-end/88397] attribute malloc ignored on function pointers when alloc_size is accepted

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88397 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c/88718] Strange inconsistency between old style and new style definitions of inline functions.

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88718 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c++/88565] enhance -Warray-bounds for C++ trailing class member arrays

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88565 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org ---

[Bug c++/89309] bogus -Wattributes ‘copy’ attribute ignored on a declaration of a different kind than referenced symbol

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89309 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c/98217] Prefer a warning for when VLAs declared on stack

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98217 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug middle-end/102934] missing warning passing address of first member to free()

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102934 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug middle-end/98405] missing -Wmaybe-uninitialized passing a member by reference in a ctor initializer list

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98405 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug middle-end/94004] [9 Regression] missing -Walloca on calls to alloca due to -Wno-system-headers

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94004 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug preprocessor/93419] __has_attribute(ifunc) false positive on hurd and kfreebsd

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93419 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug middle-end/78391] g++ (any version) at O0 (for O1, O2, O3 is ok) doesn't warn when class members are used uninitialized.

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78391 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug c/82914] 'struct __attribute__ ((aligned (N))) s' ignores 'aligned' attribute

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82914 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug c++/33925] [10/11 Regression] gcc -Waddress lost some useful warnings

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33925 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c/103360] [meta-bug] bogus/missing -Waddress

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103360 Bug 103360 depends on bug 33925, which changed state. Bug 33925 Summary: [10/11 Regression] gcc -Waddress lost some useful warnings https://gcc.gnu.org/bugzilla/show_bug.cgi?id=33925 What|Removed |Added ---

[Bug c/85931] -Wsizeof-pointer-memaccess for strncpy with size of source

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85931 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/90043] Turn on -Winit-self by default for -Wuninitialized

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90043 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

[Bug middle-end/90404] No warning on attempts to modify a const object

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90404 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug middle-end/91462] [9 Regression] missing -Warray-bounds writing to an empty flexible array member in a ctor

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91462 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug tree-optimization/56456] [meta-bug] bogus/missing -Warray-bounds

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 91462, which changed state. Bug 91462 Summary: [9 Regression] missing -Warray-bounds writing to an empty flexible array member in a ctor https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91462 What|Removed

[Bug c++/69698] [meta-bug] flexible array members

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69698 Bug 69698 depends on bug 91462, which changed state. Bug 91462 Summary: [9 Regression] missing -Warray-bounds writing to an empty flexible array member in a ctor https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91462 What|Removed

[Bug middle-end/93848] missing -Warray-bounds warning for array subscript 1 is outside array bounds

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93848 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|NEW Assignee|msebor at gcc dot

[Bug middle-end/95485] missing warning writing into function text

2022-01-26 Thread msebor at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95485 Martin Sebor changed: What|Removed |Added Assignee|msebor at gcc dot gnu.org |unassigned at gcc dot gnu.org

<    7   8   9   10   11   12   13   14   15   16   >