[Bug tree-optimization/96754] Failure to optimize strcpy+strlen to memcpy when strlen is done after strcpy

2020-08-24 Thread msebor at gcc dot gnu.org
||a/show_bug.cgi?id=88814 Last reconfirmed||2020-08-24 CC||msebor at gcc dot gnu.org Ever confirmed|0 |1 Blocks||83819

[Bug tree-optimization/88814] transform snprintf into memccpy

2020-08-24 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88814 --- Comment #3 from Martin Sebor --- (In reply to Dávid Bolvanský from comment #2) The n in the assignment in 'd[n - 1] = 0;' should be the result of snprintf for constant arguments. In GCC, it's computed by the sprintf pass which then performs

[Bug c/96596] [11 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in match_builtin_function_types

2020-08-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96596 Martin Sebor changed: What|Removed |Added Last reconfirmed||2020-08-25 Status|UNCONFIRMED

[Bug c/96596] [11 Regression] ICE: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in match_builtin_function_types

2020-08-25 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96596 --- Comment #2 from Martin Sebor --- The following change avoids the ICE: diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index b31d99fcfaf..0d2a95f63d5 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -1712,7 +1712,10 @@ match_builtin_function_

[Bug c/96596] ICE in match_builtin_function_types on a declaration of a built-in with invalid array argument

2020-08-27 Thread msebor at gcc dot gnu.org
gcc dot gnu.org |msebor at gcc dot gnu.org Summary|[11 Regression] ICE: tree |ICE in |check: expected class |match_builtin_function_type |‘type’, have ‘exceptional’ |s on a declaration of a |(error_mark) in

[Bug middle-end/92942] missing -Wstringop-overflow for allocations with a negative lower bound size

2020-08-27 Thread msebor at gcc dot gnu.org
||2020-08-27 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #1 from Martin Sebor --- Testing a fix.

[Bug tree-optimization/96826] New: missing warning appending to the result of strdup

2020-08-27 Thread msebor at gcc dot gnu.org
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Appending to a string created by strdup is not diagnosed by could be by looking up the origin of the destination pointer and, if it's used in a call

[Bug tree-optimization/96826] missing warning appending to the result of strdup

2020-08-27 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96826 Martin Sebor changed: What|Removed |Added Blocks||83819 Keywords|

[Bug c/96832] Wrong assumption for -Werror=nonnull check

2020-08-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96832 --- Comment #3 from Martin Sebor --- I agree with recommending to use getcwd(0, 0). At the same time, in https://sourceware.org/bugzilla/show_bug.cgi?id=25219#c6 I suggested that "...perhaps the attribute should allow the pointer to be null rega

[Bug c/96596] ICE in match_builtin_function_types on a declaration of a built-in with invalid array argument

2020-08-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96596 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/96838] New: missing warning on integer overflow in calls to allocation functions

2020-08-28 Thread msebor at gcc dot gnu.org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Passing large integer in excess of the range of the argument to an allocation function results in integer overflow or wraparound

[Bug middle-end/96838] missing warning on integer overflow in calls to allocation functions

2020-08-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96838 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Severity|normal

[Bug middle-end/96900] New: bogus -Warray-bounds on strlen with valid pointer obtained from just-past-the-end

2020-09-02 Thread msebor at gcc dot gnu.org
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- When a valid pointer into an array that has been derived from a past-the-end pointer to a member array of an

[Bug middle-end/96900] [9/10/11 Regression] bogus -Warray-bounds on strlen with valid pointer obtained from just-past-the-end

2020-09-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96900 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Known to fail|

[Bug middle-end/96900] [9/10/11 Regression] bogus -Warray-bounds on strlen with valid pointer obtained from just-past-the-end

2020-09-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96900 --- Comment #2 from Martin Sebor --- The underlying cause is fold_nonarray_ctor_reference() returning a scalar zero for apparently out-of-bounds references when determining the initializer for s.a from &s.a[sizeof s.a]. Its caller, constant_byte

[Bug middle-end/96903] [11 regression] excess errors from gcc.dg/pr89350.c after r11-2973

2020-09-02 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903 Martin Sebor changed: What|Removed |Added Blocks||88443 Ever confirmed|0

[Bug c/96916] warning: ‘strndup’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]

2020-09-03 Thread msebor at gcc dot gnu.org
|--- |INVALID CC||msebor at gcc dot gnu.org --- Comment #2 from Martin Sebor --- Yes, the warning is by design and is issued for any built-in function that takes an argument specifying the size of an object (malloc, memcpy, etc.). It's

[Bug c/96916] warning: ‘strndup’ specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]

2020-09-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96916 --- Comment #3 from Martin Sebor --- For strndup POSIX mentions the following application usage: Implementations are free to malloc() a buffer containing either (size + 1) bytes or (strnlen(s, size) + 1) bytes. Applications should not assume tha

[Bug middle-end/96925] New: missing warning on sprintf into destination at negative offset

2020-09-03 Thread msebor at gcc dot gnu.org
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Only the first of the two invalid calls below is diagnosed. Both should be. $ cat z.c && gcc -O2 -S -Wall -xc -fdump-tree-o

[Bug middle-end/96925] missing warning on sprintf into destination at negative offset

2020-09-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96925 Martin Sebor changed: What|Removed |Added Blocks||56456 Keywords|

[Bug middle-end/96900] [9/10/11 Regression] bogus -Warray-bounds on strlen with valid pointer obtained from just-past-the-end

2020-09-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96900 Martin Sebor changed: What|Removed |Added Keywords||missed-optimization --- Comment #3 from M

[Bug middle-end/95189] [9/10 Regression] memcmp being wrongly stripped like strcmp

2020-09-06 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189 --- Comment #16 from Martin Sebor --- I think it should be. Let me do it.

[Bug tree-optimization/96951] strncpy truncation warning does not recognize truncation check

2020-09-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96951 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Severity|normal

[Bug tree-optimization/96963] -Wstringop-overflow false positive on -O3 or -O2 -ftree-vectorize when assigning consecutive char struct members

2020-09-07 Thread msebor at gcc dot gnu.org
||a/show_bug.cgi?id=93200 CC||msebor at gcc dot gnu.org --- Comment #1 from Martin Sebor --- Confirmed. The vectorizer replaces the two character assignments with a store into f->a. The fix for pr93200 added a hack to handle some th

[Bug tree-optimization/96966] New: redundant memcpy not eliminated after pointer subtraction

2020-09-07 Thread msebor at gcc dot gnu.org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The second call to memcpy and mempcpy, respectively, is redundant in each of the functions below and can be eliminated. GCC doesn&#

[Bug tree-optimization/96966] [8/9/10/11 Regression] redundant memcpy not eliminated after pointer subtraction

2020-09-07 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96966 Martin Sebor changed: What|Removed |Added Summary|redundant memcpy not|[8/9/10/11 Regression]

[Bug middle-end/96984] New: bogus -Warray-bounds with -fsanitize due to FRE substituting subobjects at the same address

2020-09-08 Thread msebor at gcc dot gnu.org
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The following test case (originally reported in https://bugzilla.redhat.com/show_bug.cgi?id=1876801

[Bug middle-end/96984] bogus -Warray-bounds with -fsanitize due to FRE substituting subobjects at the same address

2020-09-08 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96984 Martin Sebor changed: What|Removed |Added Last reconfirmed||2020-09-08 Status|UNCONFIRMED

[Bug d/96989] SSA_NAMEs in Wuninitialized warning messages after r11-959

2020-09-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96989 --- Comment #3 from Martin Sebor --- The MEM_REF formatting done by the C and C++ pretty-printers is very basic and doesn't always result in useful output (usually in the most interesting cases). I posted a patch some time ago to improve it for

[Bug middle-end/92942] missing -Wstringop-overflow for allocations with a negative lower bound size

2020-09-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92942 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #2 from Martin Sebor -

[Bug middle-end/96903] [11 regression] excess errors from gcc.dg/pr89350.c after r11-2973

2020-09-09 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #2 from Martin Sebor -

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

2020-09-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88443 Bug 88443 depends on bug 96903, which changed state. Bug 96903 Summary: [11 regression] excess errors from gcc.dg/pr89350.c after r11-2973 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903 What|Removed |Added

[Bug middle-end/96903] [11 regression] excess errors from gcc.dg/pr89350.c after r11-2973

2020-09-11 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug middle-end/97023] missing warning on buffer overflow in chained mempcpy

2020-09-11 Thread msebor at gcc dot gnu.org
||diagnostic Status|UNCONFIRMED |ASSIGNED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Blocks||88443 Last reconfirmed||2020-09-11 --- Comment #1 from

[Bug middle-end/97023] New: missing warning on buffer overflow in chained mempcpy

2020-09-11 Thread msebor at gcc dot gnu.org
Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- -Wstringop-overflow successfully diagnoses a buffer overflow by the second in a chain of calls to stpcpy but fails to detect the same bug in calls to mempcpy

[Bug middle-end/97027] New: missing warning on buffer overflow storing a larger scalar into a smaller array

2020-09-11 Thread msebor at gcc dot gnu.org
: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- None of the obviously out-of-bounds stores in the functions below is diagnosed. They all should and easily could be

[Bug c/96907] [docs] document builtins for fputc and putc

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96907 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #6

[Bug tree-optimization/96996] Missed optimzation for constant members of non-constant objects

2020-09-14 Thread msebor at gcc dot gnu.org
|--- |DUPLICATE CC||msebor at gcc dot gnu.org Component|c++ |tree-optimization See Also||https://gcc.gnu.org/bugzill ||a

[Bug tree-optimization/80794] constant objects can be assumed to be immutable

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80794 Martin Sebor changed: What|Removed |Added CC||matthijs at stdin dot nl --- Comment #8 f

[Bug tree-optimization/86318] const local aggregates can be assumed not to be modified even when escaped

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86318 Martin Sebor changed: What|Removed |Added Host||90404 --- Comment #2 from Martin Sebor -

[Bug tree-optimization/80794] constant objects can be assumed to be immutable

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80794 Martin Sebor changed: What|Removed |Added See Also||https://gcc.gnu.org/bugzill

[Bug middle-end/97047] New: missing warning reading past the end of a constant string returned from a function

2020-09-14 Thread msebor at gcc dot gnu.org
Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The first call to memcpy below triggers a warning for reading past the end of the string returned from f(), but

[Bug middle-end/97048] New: bogus/missing -Wstringop-overread warnings

2020-09-14 Thread msebor at gcc dot gnu.org
-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- This is a meta-bug to track false positives and negatives in the -Wstringop-overread warning, new in GCC 11 (formerly included in -Wstringop-overflow).

[Bug middle-end/97048] [meta-bug] bogus/missing -Wstringop-overread warnings

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97048 Martin Sebor changed: What|Removed |Added Summary|bogus/missing |[meta-bug] bogus/missing

[Bug middle-end/97047] missing warning reading past the end of a constant string returned from a function

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97047 Martin Sebor changed: What|Removed |Added Keywords||diagnostic Blocks|

[Bug tree-optimization/82456] missing -Wstringop-overread on strcpy reading past the end of an array

2020-09-14 Thread msebor at gcc dot gnu.org
gcc dot gnu.org |msebor at gcc dot gnu.org Status|NEW |RESOLVED Target Milestone|--- |11.0 Known to work||11.0 Resolution|--- |FIXED Blocks|88443

[Bug middle-end/97048] [meta-bug] bogus/missing -Wstringop-overread warnings

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97048 Bug 97048 depends on bug 82456, which changed state. Bug 82456 Summary: missing -Wstringop-overread on strcpy reading past the end of an array https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82456 What|Removed |Ad

[Bug middle-end/97048] [meta-bug] bogus/missing -Wstringop-overread warnings

2020-09-14 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97048 Bug 97048 depends on bug 81437, which changed state. Bug 81437 Summary: missing -Wstringop-overread reading past the end of a string https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81437 What|Removed |Added ---

[Bug tree-optimization/81437] missing -Wstringop-overread reading past the end of a string

2020-09-14 Thread msebor at gcc dot gnu.org
|msebor at gcc dot gnu.org Summary|missing -Wstringop-overflow |missing -Wstringop-overread |reading past the end of a |reading past the end of a |string |string --- Comment #5 from Martin Sebor --- GCC 11 diagnoses all

[Bug c++/97049] Cryptic warning "__builtin_memmove pointer overflow between offset ... and size ..." with -m32

2020-09-14 Thread msebor at gcc dot gnu.org
|1 CC||msebor at gcc dot gnu.org Last reconfirmed||2020-09-14 Known to fail||10.2.0 Status|UNCONFIRMED |NEW --- Comment #1 from Martin Sebor

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2020-09-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 96987, which changed state. Bug 96987 Summary: [11 regression] warning 'ptr' may be used uninitialized const pointer parameter https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96987 What|Removed

[Bug middle-end/96987] [11 regression] warning 'ptr' may be used uninitialized const pointer parameter

2020-09-15 Thread msebor at gcc dot gnu.org
||msebor at gcc dot gnu.org Resolution|--- |INVALID --- Comment #2 from Martin Sebor --- The warning is by design and based on the assumption that a function declared to take a const pointer (or in C++, a const reference) as an argument reads the

[Bug tree-optimization/96295] [11 Regression] -Wmaybe-uninitialized warning for range operator with reference to an empty struct

2020-09-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295 Martin Sebor changed: What|Removed |Added Known to fail||11.0 Keywords|

[Bug middle-end/97023] missing warning on buffer overflow in chained mempcpy

2020-09-15 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97023 Martin Sebor changed: What|Removed |Added Keywords||patch Target Milestone|---

[Bug middle-end/96987] [11 regression] warning 'ptr' may be used uninitialized const pointer parameter

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96987 --- Comment #5 from Martin Sebor --- A void pointer is usually cast to one to a complete type that's then used to access the object (e.g., bsearch). But not every instance of every warning should be expected to indicate a bug. Most only suggest

[Bug tree-optimization/96295] [11 Regression] -Wmaybe-uninitialized warning for range operator with reference to an empty struct

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 96295, which changed state. Bug 96295 Summary: [11 Regression] -Wmaybe-uninitialized warning for range operator with reference to an empty struct https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295 What|Rem

[Bug c/78666] conflicting attribute alloc_size accepted

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78666 Martin Sebor changed: What|Removed |Added Known to fail||10.2.0, 7.3.0, 8.2.0, 9.1.0 Target Mile

[Bug c/96126] conflicting attribute section accepted on redeclaration

2020-09-16 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126 Martin Sebor changed: What|Removed |Added Target Milestone|--- |11.0 Resolution|---

[Bug tree-optimization/96295] [11 Regression] -Wmaybe-uninitialized warning for range operator with reference to an empty struct

2020-09-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295 Martin Sebor changed: What|Removed |Added CC||vincent.lebourlot@starqube.

[Bug sanitizer/97067] UBSAN: False positive maybe-uninitialized

2020-09-17 Thread msebor at gcc dot gnu.org
||msebor at gcc dot gnu.org Status|UNCONFIRMED |RESOLVED --- Comment #1 from Martin Sebor --- I'm not able to reproduce the warning on trunk. I'm assuming it's been fixed by r11-3237 (pr96295). If the warning persists, please reo

[Bug middle-end/24639] [meta-bug] bug to track all Wuninitialized issues

2020-09-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=24639 Bug 24639 depends on bug 97067, which changed state. Bug 97067 Summary: UBSAN: False positive maybe-uninitialized https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97067 What|Removed |Added --

[Bug c/50584] No warning for passing small array to C99 static array declarator

2020-09-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 Martin Sebor changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c/67793] Missing warning for C99 static array dimension mismatch

2020-09-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67793 Bug 67793 depends on bug 50584, which changed state. Bug 50584 Summary: No warning for passing small array to C99 static array declarator https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584 What|Removed |Added -

[Bug c/67793] Missing warning for C99 static array dimension mismatch

2020-09-19 Thread msebor at gcc dot gnu.org
|--- |11.0 Resolution|--- |FIXED Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org --- Comment #4 from Martin Sebor --- GCC 11 reports the following warning (with or without static): $ gcc -S pr67793.c pr67793.c: In

[Bug middle-end/84051] [7/8/9 Regression] missing -Warray-bounds on an out-of-bounds access via an array pointer

2020-09-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Target Milestone|9.0

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

2020-09-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456 Bug 56456 depends on bug 84051, which changed state. Bug 84051 Summary: [7/8/9 Regression] missing -Warray-bounds on an out-of-bounds access via an array pointer https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051 What|Removed

[Bug tree-optimization/82608] missing -Warray-bounds on an out-of-bounds VLA index

2020-09-19 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82608 --- Comment #7 from Martin Sebor --- Despite the enhancement the test case in comment #0 is still not diagnosed (the n argument has no range).

[Bug c/97131] [11 Regression] ICE: Segmentation fault (in warn_parm_ptrarray_mismatch)

2020-09-21 Thread msebor at gcc dot gnu.org
||2020-09-21 Ever confirmed|0 |1 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org CC||msebor at gcc dot gnu.org --- Comment #1 from Martin Sebor --- Confirmed. The function

[Bug c/97154] gcc/c/c-decl.c:5729:38: error: Dereference of an invalid iterator

2020-09-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97154 Martin Sebor changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED

[Bug testsuite/97146] [11 regression] ipa/ipa-sra-*.c fail since r11-3303 (g:6450f07388f9fe575a489c9309c36012b17b88b0)

2020-09-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97146 Martin Sebor changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug plugins/97168] New: [11 Regression] FAIL: gcc.dg/plugin/diagnostic-test-expressions-1.c, diagnostic-test-paths-2.c, location-overflow-test-1.c

2020-09-22 Thread msebor at gcc dot gnu.org
Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: plugins Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Recent builds with GCC 11 show a number of plugin test

[Bug jit/97169] New: [11 Regression] FAIL: jit.dg/test-compile-to-assembler.c

2020-09-22 Thread msebor at gcc dot gnu.org
Priority: P3 Component: jit Assignee: dmalcolm at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Recent builds with GCC 11 show a number of jit test failures including the following: FAIL: did not find a generated reproducer: test-nested

[Bug tree-optimization/97180] warning: ‘__builtin___strncat_chk’ on strncat when it is not necessary

2020-09-23 Thread msebor at gcc dot gnu.org
||msebor at gcc dot gnu.org Keywords||diagnostic, ||missed-optimization Ever confirmed|0 |1 Component|c |tree-optimization

[Bug middle-end/97175] [11 Regression] ICE in maybe_warn_for_bound, at builtins.c:3483 since r11-2928-gd14c547abd484d35

2020-09-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97175 Martin Sebor changed: What|Removed |Added Status|NEW |ASSIGNED Component|tree-optimiza

[Bug tree-optimization/97185] New: inconsistent builtin elimination for impossible range

2020-09-23 Thread msebor at gcc dot gnu.org
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- In the test case below GCC eliminates the memcpy and memmove calls because the only valid bound they are called with is zero. But the same optimization

[Bug tree-optimization/92141] Bogus -Wstringop-truncation warning for strncpy in a loop

2019-10-17 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92141 Martin Sebor changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/92155] New: strlen(a) not folded after memset(a, 0, sizeof a)

2019-10-18 Thread msebor at gcc dot gnu.org
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Now that GCC unrolls memset-like loops with small numbers of iterations (pr91975) and transforms some of them into MEM_REF, the strlen pass can also determine

[Bug tree-optimization/92157] New: incorrect strcmp() == 0 result for unknown strings

2019-10-18 Thread msebor at gcc dot gnu.org
: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The strcmp optimization checked in r276773 doesn't handle the following case correctly, causing regressions in the arj package. $ cat a.c && gcc

[Bug tree-optimization/92157] [10 Regression] incorrect strcmp() == 0 result for unknown strings

2019-10-18 Thread msebor at gcc dot gnu.org
||wrong-code Last reconfirmed||2019-10-18 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Blocks||83819 See Also||https://gcc.gnu.org

[Bug tree-optimization/92155] strlen(a) not folded after memset(a, 0, sizeof a)

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92155 --- Comment #2 from Martin Sebor --- The inequality (__builtin_strlen (a4) != 0) is folded into (a4[0] != 0) very early on during Gimplification so the strlen pass never sees it. What the strlen pass should be able to do is fold strlen(a4) below

[Bug tree-optimization/92155] strlen(a) not folded after memset(a, 0, sizeof a)

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92155 --- Comment #3 from Martin Sebor --- Actually, the memcpy is transformed to MEM_REF and the strlen pass knows how to deal with a subset of those (small powers of 2). What it doesn't know how to do yet is deal with other sizes like in the test ca

[Bug tree-optimization/92157] [10 Regression] incorrect strcmp() == 0 result for unknown strings

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92157 --- Comment #2 from Martin Sebor --- Author: msebor Date: Fri Oct 18 22:26:39 2019 New Revision: 277194 URL: https://gcc.gnu.org/viewcvs?rev=277194&root=gcc&view=rev Log: PR tree-optimization/92157 - incorrect strcmp() == 0 result for unknown st

[Bug tree-optimization/92155] strlen(a) not folded after memset(a, 0, sizeof a)

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92155 --- Comment #4 from Martin Sebor --- Author: msebor Date: Fri Oct 18 22:26:39 2019 New Revision: 277194 URL: https://gcc.gnu.org/viewcvs?rev=277194&root=gcc&view=rev Log: PR tree-optimization/92157 - incorrect strcmp() == 0 result for unknown st

[Bug tree-optimization/83819] [meta-bug] missing strlen optimizations

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83819 Bug 83819 depends on bug 92157, which changed state. Bug 92157 Summary: [10 Regression] incorrect strcmp() == 0 result for unknown strings https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92157 What|Removed |Added

[Bug tree-optimization/92157] [10 Regression] incorrect strcmp() == 0 result for unknown strings

2019-10-18 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92157 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug tree-optimization/92128] fold more non-constant strlen relational expressions

2019-10-21 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92128 --- Comment #2 from Martin Sebor --- Yes. I constrained strlenopt-80.c to only a subset of the targets where the optimization has been implemented but forgot to do the same for strlenopt-81.c. I'm traveling this week but I'll try to remember to

[Bug c++/90938] [9/10 Regression] Initializing array with {1} works, but not {0}

2019-10-22 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90938 --- Comment #9 from Martin Sebor --- I plan to submit a patch for GCC 10 and (hopefully) also GCC 9.x. What's the cutoff for 9?

[Bug preprocessor/90476] prepossessor should error if #line 0

2019-10-22 Thread msebor at gcc dot gnu.org
||msebor at gcc dot gnu.org Resolution|--- |WORKSFORME --- Comment #8 from Martin Sebor --- C makes it a constraint that in the #line directive: The digit sequence shall not specify zero, nor a number greater than 2147483647. Both GCC and G

[Bug c++/92194] maybe-uninitialized false positive with c++2a

2019-10-23 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92194 Martin Sebor changed: What|Removed |Added CC||msebor at gcc dot gnu.org --- Comment #1

[Bug c/92212] New: incompatible calls to K&R functions not diagnosed

2019-10-24 Thread msebor at gcc dot gnu.org
: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Unlike some other compilers GCC doesn't diagnose incompatible calls to K&R style functions in the same translation unit. $ cat b.c && gcc -O2 -S -Wa

[Bug tree-optimization/92226] New: [10 Regression] live nul char store to array eliminated

2019-10-25 Thread msebor at gcc dot gnu.org
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- One of the recent strlen changes (bisection points to r277076) leads to a miscompilation of the following test case. The problem

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

2019-10-25 Thread msebor at gcc dot gnu.org
|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-10-25 Blocks||83819 Assignee|unassigned at gcc dot gnu.org |msebor at gcc dot gnu.org Target Milestone|--- |10.0 Ever confirmed

[Bug tree-optimization/92245] New: strncpy followed by nul store not folded into memcpy

2019-10-27 Thread msebor at gcc dot gnu.org
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- Because the strlen pass has no support for strncpy beyond warnings, GCC emits suboptimal code for all functions below except f0. In f1(), the strncpy

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

2019-10-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92226 Martin Sebor changed: What|Removed |Added Keywords||patch --- Comment #1 from Martin Sebor -

[Bug c/66970] Add __has_builtin() macro

2019-10-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 --- Comment #23 from Martin Sebor --- Author: msebor Date: Mon Oct 28 22:46:28 2019 New Revision: 277544 URL: https://gcc.gnu.org/viewcvs?rev=277544&root=gcc&view=rev Log: PR c/66970 - Add __has_builtin() macro gcc/ChangeLog: PR c/6697

[Bug c/66970] Add __has_builtin() macro

2019-10-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug target/90835] Incompatibilities with macOS 10.15 headers

2019-10-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90835 Bug 90835 depends on bug 66970, which changed state. Bug 66970 Summary: Add __has_builtin() macro https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970 What|Removed |Added --

[Bug c/92261] New: syntax errors on __has_builtin (__has_builtin)

2019-10-28 Thread msebor at gcc dot gnu.org
Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- With GCC support for __has_builtin (PR 66970) implemented, I noticed a difference between it and Clang for the following test case that Clang accepts and evaluates to zero: $ cat

[Bug tree-optimization/92226] [10 Regression] live nul char store to array eliminated

2019-10-28 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92226 Martin Sebor changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

<    1   2   3   4   5   6   7   8   9   10   >