||a/show_bug.cgi?id=88814
Last reconfirmed||2020-08-24
CC||msebor at gcc dot gnu.org
Ever confirmed|0 |1
Blocks||83819
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96596
Martin Sebor changed:
What|Removed |Added
Last reconfirmed||2020-08-25
Status|UNCONFIRMED
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_
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
||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.
: 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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96826
Martin Sebor changed:
What|Removed |Added
Blocks||83819
Keywords|
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96596
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96838
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Severity|normal
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96900
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Known to fail|
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903
Martin Sebor changed:
What|Removed |Added
Blocks||88443
Ever confirmed|0
|--- |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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96925
Martin Sebor changed:
What|Removed |Added
Blocks||56456
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96900
Martin Sebor changed:
What|Removed |Added
Keywords||missed-optimization
--- Comment #3 from M
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
--- Comment #16 from Martin Sebor ---
I think it should be. Let me do it.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96951
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Severity|normal
||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
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
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]
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96984
Martin Sebor changed:
What|Removed |Added
Last reconfirmed||2020-09-08
Status|UNCONFIRMED
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92942
Martin Sebor changed:
What|Removed |Added
Keywords||patch
--- Comment #2 from Martin Sebor -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903
Martin Sebor changed:
What|Removed |Added
Keywords||patch
--- Comment #2 from Martin Sebor -
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96903
Martin Sebor changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
||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
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
: 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
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
|--- |DUPLICATE
CC||msebor at gcc dot gnu.org
Component|c++ |tree-optimization
See Also||https://gcc.gnu.org/bugzill
||a
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86318
Martin Sebor changed:
What|Removed |Added
Host||90404
--- Comment #2 from Martin Sebor -
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80794
Martin Sebor changed:
What|Removed |Added
See Also||https://gcc.gnu.org/bugzill
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
-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).
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97048
Martin Sebor changed:
What|Removed |Added
Summary|bogus/missing |[meta-bug] bogus/missing
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97047
Martin Sebor changed:
What|Removed |Added
Keywords||diagnostic
Blocks|
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
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
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
---
|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
|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
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
||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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295
Martin Sebor changed:
What|Removed |Added
Known to fail||11.0
Keywords|
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97023
Martin Sebor changed:
What|Removed |Added
Keywords||patch
Target Milestone|---
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96126
Martin Sebor changed:
What|Removed |Added
Target Milestone|--- |11.0
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96295
Martin Sebor changed:
What|Removed |Added
CC||vincent.lebourlot@starqube.
||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
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
--
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50584
Martin Sebor changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
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
-
|--- |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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84051
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Target Milestone|9.0
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
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).
||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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97154
Martin Sebor changed:
What|Removed |Added
Resolution|--- |INVALID
Status|UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97146
Martin Sebor changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
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
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
||msebor at gcc dot gnu.org
Keywords||diagnostic,
||missed-optimization
Ever confirmed|0 |1
Component|c |tree-optimization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97175
Martin Sebor changed:
What|Removed |Added
Status|NEW |ASSIGNED
Component|tree-optimiza
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92141
Martin Sebor changed:
What|Removed |Added
Status|UNCONFIRMED |NEW
Last reconfirmed|
: 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
: 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
||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
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
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
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
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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92157
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
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
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?
||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
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
: 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
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
|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
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92226
Martin Sebor changed:
What|Removed |Added
Keywords||patch
--- Comment #1 from Martin Sebor -
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66970
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
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
--
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
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92226
Martin Sebor changed:
What|Removed |Added
Status|ASSIGNED|RESOLVED
Resolution|---
501 - 600 of 7383 matches
Mail list logo