https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
Bug ID: 99418
Summary: sanitizer checks for accessing multidimentional
VLA-array
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Pr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #1 from Ivan Sorokin ---
Here is the reduced example. It doesn't SIGSEGV, but it doesn't report any
sanitizer errors either:
$ g++ -g -fsanitize=bounds 3.cpp
$ cat 3.cpp
#include
void escape(int& a)
{}
void test(size_t n, size_t m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #2 from Ivan Sorokin ---
It looks like this is related to ignore_off_by_one parameter of
ubsan_instrument_bounds.
As can be seen in gimple the problematic .UBSAN_BOUNDS checks against array
size plus 1.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #6 from Ivan Sorokin ---
(In reply to Jakub Jelinek from comment #4)
> Asan can't by design detect neither #c0 nor #c1, only ubsan can.
> The reason why ubsan has that off by one stuff is that in C/C++,
> &mas[n - 1][m] is not undefin
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #7 from Ivan Sorokin ---
(In reply to Martin Liška from comment #3)
> That said, can we close it as resolved?
I'm sorry for not being clear from the beginning. The original report was about
-fsanitize=bounds sanitizer which sometime
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99418
--- Comment #8 from Ivan Sorokin ---
If I understand #c5 correctly the minimal reproducer should be this:
void g(int&);
void f()
{
int a[10];
int& p = a[10]; // (1)
g(a[10]); // (2)
}
Both (1) and (2) are undefined and -fsani
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100039
Bug ID: 100039
Summary: GCC can not bind lvalue to lvalue reference in
brace-initialized-temporary expression
Product: gcc
Version: 10.3.0
Status: UNCONFIRMED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94355
--- Comment #6 from Ivan Sorokin ---
I played with -fanalyzer on godbolt (GCC trunk). I noticed that -fanalyzer
doesn't report double free in this (convoluted) case:
#include
int main()
{
int* p = new int;
delete p;
free(p);
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94355
--- Comment #7 from Ivan Sorokin ---
For me the support for operator new works well for trivially constructible
types. For a non-trivially constructible type I got a false positive:
struct foo { foo(); };
int main()
{
delete new foo();
}
I
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99797
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #10
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48877
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56719
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47579
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #3
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80016
Ivan Sorokin changed:
What|Removed |Added
Resolution|--- |FIXED
Status|ASSIGNED
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98501
Bug ID: 98501
Summary: potential optimization for base<->derived pointer
casts
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Prior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98501
--- Comment #2 from Ivan Sorokin ---
(In reply to Richard Biener from comment #1)
> I think there's a duplicate of this PR.
I searched the list of bugs and I found PR95663. Is it it?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98555
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98660
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98709
Bug ID: 98709
Summary: gcc optimizes bitwise operations, but doesn't optimize
logical ones
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98710
Bug ID: 98710
Summary: missing optimization (x | c) & ~(y | c) -> x & ~(y |
c)
Product: gcc
Version: 10.2.1
Status: UNCONFIRMED
Severity: normal
Prior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98774
Bug ID: 98774
Summary: gcc -O3 does not vectorize multiplication
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-o
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98775
Bug ID: 98775
Summary: missing optimization opportunity on nbody
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-o
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98775
--- Comment #1 from Ivan Sorokin ---
Created attachment 50016
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50016&action=edit
nbody-unrolled.cpp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98814
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98774
--- Comment #3 from Ivan Sorokin ---
(In reply to Hongtao.liu from comment #1)
> It's fixed in current trunk https://godbolt.org/z/63576n
I can confirm that now GCC does use packed multiplication mulpd. Although it is
used somewhat inefficiently
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82640
Ivan Sorokin changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91400
--- Comment #2 from Ivan Sorokin ---
I've sent a patch to gcc-patches mailing list:
https://gcc.gnu.org/pipermail/gcc-patches/2021-February/564663.html
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99087
Bug ID: 99087
Summary: suboptimal codegen for division by constant 3
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95014
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3507
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #60
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
Bug ID: 108676
Summary: GCC prints function signature incorrectly
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
--- Comment #1 from Ivan Sorokin ---
I added a broken link to godbolt, here is a valid one:
https://godbolt.org/z/EE5eezW1r
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108676
Ivan Sorokin changed:
What|Removed |Added
Resolution|--- |DUPLICATE
Status|NEW
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66968
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66968
--- Comment #10 from Ivan Sorokin ---
One more case (from 108676):
template
struct X
{};
template
X f();
template
X g();
int main()
{
g();
}
Here 'X' is printed in the error message instead of 'X'.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108219
--- Comment #5 from Ivan Sorokin ---
(In reply to Patrick Palka from comment #4)
> Fixed for GCC 13 so far
Thank you very much!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105099
Bug ID: 105099
Summary: In lookup for namespace name qualifiers only
namespaces should be considered
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: n
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105141
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105762
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98709
Ivan Sorokin changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19987
Bug 19987 depends on bug 98709, which changed state.
Bug 98709 Summary: gcc optimizes bitwise operations, but doesn't optimize
logical ones
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98709
What|Removed |Added
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101706
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103382
Ivan Sorokin changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107161
Bug ID: 107161
Summary: gcc doesn't constant fold member if any other member
is mutable
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107161
--- Comment #2 from Ivan Sorokin ---
> Do constexpr/consteval work in such circumstances?
Yes, constexpr works for variables like "p.a":
extern constexpr mytype p = {1, 2};
int foo()
{
constexpr int t = p.a + 10;
return t;
}
foo():
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103382
Bug ID: 103382
Summary: condition_variable::wait() is not cancellable because
it is marked noexcept
Product: gcc
Version: 10.2.0
Status: UNCONFIRMED
Severity:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103382
--- Comment #1 from Ivan Sorokin ---
Please note there was a related issue PR67726. I hope it is possible to meet
the requirements mentioned in the issue as well as enabling cancellation.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103382
--- Comment #3 from Ivan Sorokin ---
> Huh, I thought it was noexcept. Then yes, we should remove it.
Thank you very much! I'm looking forward for a fix.
> There are still lots of other places where the stadnard does require
> 'noexcept' and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103559
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103566
Bug ID: 103566
Summary: confusing error message for typedefs with initializers
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Comp
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102335
Bug ID: 102335
Summary: gcc misses -Wunused-value
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98774
--- Comment #4 from Ivan Sorokin ---
I retested the sample on GCC 11.2.
https://godbolt.org/z/xrarP3zbY
Compared to Clang 12.0.1 GCC still generates 6 more instructions in total and
does 6 mulpd against Clang's 4 mulpd.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102355
Bug ID: 102355
Summary: excessive stack usage
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61355
--- Comment #6 from Ivan Sorokin ---
(In reply to Patrick Palka from comment #5)
> Fixed for GCC 12.
Thanks!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102704
Bug ID: 102704
Summary: NRVO for throw expression
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102888
Bug ID: 102888
Summary: missing case for combining / and % into one operation
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Compo
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102881
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107528
Bug ID: 107528
Summary: constexpr evaluator doesn't check for deallocate of
mismatched size
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107529
Bug ID: 107529
Summary: constexpr evaluator doesn't check for destroyed
objects
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Prior
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108219
Bug ID: 108219
Summary: requirement fails on a valid expression
Product: gcc
Version: 12.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104503
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105862
Bug ID: 105862
Summary: missed inlining opportunity of
_Sp_counted_deleter::_M_destroy
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105864
Bug ID: 105864
Summary: storing nullptr_t to memory should not generate any
instructions
Product: gcc
Version: 12.1.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105864
--- Comment #5 from Ivan Sorokin ---
I would suggest (In reply to Andrew Pinski from comment #4)
> nullptr_t t, t1 = nullptr;
> __builtin_memcpy(&a[0], &t, sizeof(t));
> So I suspect this should be marked as invalid.
The questions is how G
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
--- Comment #5 from Ivan Sorokin ---
(In reply to CVS Commits from comment #4)
> commit r14-2751-g2a3556376c69a1fb588dcf25225950575e42784f
> Author: Drew Ross
> Co-authored-by: Jakub Jelinek
Thank you!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98710
--- Comment #7 from Ivan Sorokin ---
(In reply to Andrew Pinski from comment #6)
> Fixed.
Thank you!
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98710
--- Comment #8 from Ivan Sorokin ---
> How often these show up, I have no idea.
Perhaps I should have written this in the original message.
The original expression "(x | c) & ~(y | c)" is obviously a reduced version of
what happens in real
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111541
Bug ID: 111541
Summary: missing optimization x & ~c | (y | c) -> x | (y | c)
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Compon
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111718
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109527
Bug ID: 109527
Summary: redundant register assignment
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
Bug ID: 109570
Summary: detect fclose on unopened or NULL files
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: analyzer
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109570
--- Comment #1 from Ivan Sorokin ---
Generalizing. Perhaps similarly free(NULL) can be detected?
void* obj = malloc(...);
if (!obj)
{
free(obj);
return false;
}
Unliky fclose(NULL), free(NULL) is completely well defined operation, but
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99087
Ivan Sorokin changed:
What|Removed |Added
Status|NEW |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112410
Bug ID: 112410
Summary: error when auto(x) is used in a variable initializer
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Compon
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112480
--- Comment #7 from Ivan Sorokin ---
(In reply to Jonathan Wakely from comment #6)
> + // The following seems redundant but improves codegen, see PR 112480.
> + if constexpr (is_trivially_destructible_v<_Tp>)
> + this->_M_en
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112533
Bug ID: 112533
Summary: missed optimization (~A & C) == (~B & C) => (A & C) ==
(B & C)
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71990
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #5
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
Bug ID: 109986
Summary: missing fold (~a | b) ^ a => ~(a & b)
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
--- Comment #1 from Ivan Sorokin ---
(In reply to Ivan Sorokin from comment #0)
> int foo(int a, int b)
> {
> return (~a | b) ^ a;
> }
>
> This can be optimized to `return ~(a | b);`. This transformation is done by
> LLVM, but not by GCC.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109986
--- Comment #3 from Ivan Sorokin ---
I tried to investigate why GCC is able to simplify `(a | b) ^ a` and `(a | ~b)
^ a` from comment 2, but not similarly looking `(~a | b) ^ a` from comment 0.
`(a | b) ^ a` matches the following pattern from m
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110534
Bug ID: 110534
Summary: confusing -Wuninitialized when strict aliasing is
violated
Product: gcc
Version: 13.1.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110561
Ivan Sorokin changed:
What|Removed |Added
CC||vanyacpp at gmail dot com
--- Comment #1
83 matches
Mail list logo