[Bug analyzer/94355] New: support for C++ new expression

2020-03-27 Thread vanyacpp at gmail dot com
Assignee: dmalcolm at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- At the moment static analyzer warns about leaked malloc. It would be great if C++ new expression were also supported. Example: void f() { char* p = new char; } Expected diagnostic

[Bug target/94852] New: -ffloat-store on x64 target

2020-04-29 Thread vanyacpp at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- At the moment -ffloat-store significantly pessimizes the code generation regardless of whether -mfpmath=sse -msse2 are used or not: float f(float a, float b) { return a + b; } -O2

[Bug target/94852] -ffloat-store on x64 target

2020-04-29 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94852 --- Comment #4 from Ivan Sorokin --- (In reply to Richard Biener from comment #1) > @item -ffloat-store > @opindex ffloat-store > Do not store floating-point variables in registers, and inhibit other > options that might change whether a floating

[Bug target/94852] -ffloat-store on x64 target

2020-04-29 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94852 --- Comment #6 from Ivan Sorokin --- (In reply to Richard Biener from comment #1) > @item -ffloat-store > @opindex ffloat-store > Do not store floating-point variables in registers, and inhibit other > options that might change whether a floating

[Bug c++/92707] New: type alias on type alias on lambda in unevaluated context does not work

2019-11-28 Thread vanyacpp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC shows an error on this code: template using foo = decltype([] {}); template using bar = foo; extern foo a; extern bar a

[Bug c++/93211] New: equivalence of dependent function calls doesn't check if the call is eligible for ADL

2020-01-09 Thread vanyacpp at gmail dot com
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider this code: // https://gcc.godbolt.org/z/3U2TTd #include template void g(T); template void f() {}

[Bug target/91824] unnecessary sign-extension after _mm_movemask_epi8 or __builtin_popcount

2020-02-01 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91824 --- Comment #7 from Ivan Sorokin --- (In reply to Jakub Jelinek from comment #6) > Fixed. Thank you!

[Bug c++/56936] New: gcc don't show error when accessing to current instantiation

2013-04-12 Thread vanyacpp at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56936 Bug #: 56936 Summary: gcc don't show error when accessing to current instantiation Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIR

[Bug c++/56936] gcc don't show error when accessing to missing member of current instantiation

2013-04-13 Thread vanyacpp at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56936 --- Comment #4 from Ivan Sorokin 2013-04-13 11:06:35 UTC --- (In reply to comment #3) > [temp.res]/8 "If no valid specialization can be generated for a template, and > that template is not instantiated, the template is ill-formed, no diagn

[Bug c++/57352] New: internal compiler error in cp_parser_abort_tentative_parse at cp/parser.c:22878

2013-05-21 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com gcc 4.7.2 crashes on the following code: struct x { operator class {} (); }; With error message: 13.cpp:3:21: internal compiler error: in

[Bug c++/57449] New: name lookup of conversions-function-id differs from clang

2013-05-29 Thread vanyacpp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com On the code below the behavior of clang and gcc differ. Clang accepts this code, while gcc reject it: 13.cpp: In function 'int main()': 13.cpp:19:21: error: n

[Bug c++/57752] New: during the lookup for a base class name, non-type names should be ignored

2013-06-28 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com [class.derived]p2 says: "During the lookup for a base class name, non-type names are ignored." So gcc should compile this program:

[Bug c++/58360] New: gcc crashes on boost::adaptors::transformed

2013-09-08 Thread vanyacpp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Created attachment 30763 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30763&action=edit gcc-crash-on-boost-adaptors-transformed I tried to use boost::adaptors::transformed and gcc

[Bug c++/44786] -fcatch-undefined-behavior: Turn on runtime code generation to check for undefined behavior

2012-04-08 Thread vanyacpp at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44786 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #3

[Bug c++/59284] New: missing diagnostic on incomplete type at the point of template definition

2013-11-25 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com According to [temp.res]p8 this code is invalid, but gcc don't show error on it: struct x; template void f() { x x; } "If a type use

[Bug c++/86346] New: internal compiler error related to duduction guides

2018-06-28 Thread vanyacpp at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Here is the code: template struct bool_constant {}; using true_type = bool_constant; template constexpr bool is_same_v = false; template constexpr bool is_same_v

[Bug tree-optimization/91400] New: __builtin_cpu_supports conjunction is optimized poorly

2019-08-08 Thread vanyacpp at gmail dot com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Clang 8 optimizes both f() and g() to the same code: bool f() { return __builtin_cpu_supports("popcnt") && __builtin_cpu_supports

[Bug middle-end/91824] New: unnecessary sign-extension after _mm_movemask_epi8 or __builtin_popcount

2019-09-19 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- gcc -O2 -mpopcnt leaves unnecessary cdqe: #include #include void f(uint64_t& val, __m128i mask) {

[Bug middle-end/90345] New: too pessimistic check whether pointer may alias local variable

2019-05-04 Thread vanyacpp at gmail dot com
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider the following example (reduced from a real program): #include #include struct big_integer { void push_back(uint32_t

[Bug middle-end/90345] too pessimistic check whether pointer may alias a local variable

2019-05-07 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90345 --- Comment #4 from Ivan Sorokin --- Making points-to analysis aware of SESE regions will definitely help here and is a nice thing to have. There is one more option. In my reduced test case the body of 'push_back' is unavailable, but when it is

[Bug middle-end/81212] New: -Wreturn-type is disabled when used together with -fsanitize=return

2017-06-26 Thread vanyacpp at gmail dot com
Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider this code snippet: struct X { X(void* p); void* p; }; X f(bool x, void* p) { if (x) return X(p

[Bug c++/78655] New: gcc doesn't exploit the fact that the result of pointer addition can not be nullptr

2016-12-02 Thread vanyacpp at gmail dot com
IRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider the following piece of code: #include struct blob { void* data; size_t size; };

[Bug tree-optimization/78687] New: inefficient code generated for eggs.variant

2016-12-05 Thread vanyacpp at gmail dot com
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Created attachment 40254 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40254&action=edit gcc-eggs-variant-missing-opt.cpp I have a piece of co

[Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr

2016-12-06 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78655 --- Comment #3 from Ivan Sorokin --- (In reply to Richard Biener from comment #1) > Of course I wonder why the check is here in the first place... Is placement > new valid for nullptr? I believe this check here is to allow placement new (std::

[Bug c++/78655] gcc doesn't exploit the fact that the result of pointer addition can not be nullptr

2016-12-06 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78655 --- Comment #4 from Ivan Sorokin --- (In reply to Richard Biener from comment #1) > + if (flag_delete_null_pointer_checks > + && is_gimple_assign (stmt) > + && is_gimple_assign (stmt) Duplicate conjunct. > + && gimple_assign_rh

[Bug demangler/78944] New: null pointer in demangler

2016-12-28 Thread vanyacpp at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Demangling the name _Z3fooAv32pM causes null pointer dereferencing: $ valgrind c++filt _Z3fooAv32pM ==11277== Memcheck, a memory error detector ==11277== Copyright (C) 2002-2015, and GNU

[Bug demangler/78944] null pointer in demangler

2016-12-29 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78944 --- Comment #1 from Ivan Sorokin --- In addition to the reported crash on _Z3fooAv32pM, there are two other seeming unrelated crashes: _Z1f7729646840 and _Z1fDpDF02s4o.

[Bug demangler/78944] null pointer in demangler

2017-01-03 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78944 --- Comment #2 from Ivan Sorokin --- Another very rare crash discovered by my fuzzer: _Z1fAqu4SmFG1n3_a.

[Bug demangler/78944] null pointer in demangler

2017-01-11 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78944 --- Comment #3 from Ivan Sorokin --- I retested these cases on a more recent version of binutils 2.27. It turned out that the first three cases are fixed. The last one still causes a crash. Here is a more simple reprocase: $ c++filt _Z1fAqu4

[Bug tree-optimization/80015] New: auto vectorization leave scalar code even if it is unreachable

2017-03-12 Thread vanyacpp at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider these two versions of dot_product: #include float dot_product(float const* a, float const* b

[Bug c++/80016] New: error is positioned incorrectly

2017-03-12 Thread vanyacpp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Created attachment 40955 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40955&action=edit expr-loc-bug.cpp Compilation of the attached file expr-loc-bug.cpp gives the followin

[Bug c++/82640] New: gcc doesn't show errors on anonymous local variables

2017-10-20 Thread vanyacpp at gmail dot com
y: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC compiles the following code: int main() { int (*); int (&)[-1]; auto const (&)[3]; } I believe the code is incorrect as the local variables are unnamed.

[Bug tree-optimization/82689] New: merging writes of different types to the same location

2017-10-23 Thread vanyacpp at gmail dot com
Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider the following code: #include union x { std::int64_t a; std::uint64_t b; }; void f(x& xx, bool flag, std::int64_t value) {

[Bug target/82693] New: gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Recently I have discovered that empty arguments are passed differently by gcc and by clang. struct empty {}; void f(empty, empty, empty); int main() { f(empty{}, empty

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 --- Comment #2 from Ivan Sorokin --- Created attachment 42451 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42451&action=edit caller.cpp

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 --- Comment #3 from Ivan Sorokin --- Created attachment 42452 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42452&action=edit empty.h

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 --- Comment #1 from Ivan Sorokin --- Created attachment 42450 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42450&action=edit callee.cpp

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 --- Comment #4 from Ivan Sorokin --- Created attachment 42453 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42453&action=edit build.sh

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 Ivan Sorokin changed: What|Removed |Added Attachment #42451|0 |1 is obsolete|

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 --- Comment #6 from Ivan Sorokin --- I added files to reproduce the issue: caller.cpp and callee.cpp are the files that need to be compiled with different compilers. empty.h is common header. build.sh is a shell script that compiles and run all f

[Bug target/82693] gcc/clang calling convension mismatch

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82693 Ivan Sorokin changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/60336] empty struct value is passed differently in C and C++

2017-10-23 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60336 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment

[Bug c++/82910] New: marking data members private affects code generation of copying

2017-11-08 Thread vanyacpp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider the following piece of code: struct pair { private: void* first; unsigned second; }; struct other { pair get() const

[Bug tree-optimization/77938] New: missing tailcall optimization in case when local variable escapes

2016-10-11 Thread vanyacpp at gmail dot com
Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC does not eliminate tailcalls in case when an address of any local variable escapes the function. Consider the following

[Bug tree-optimization/77938] missing tailcall optimization in case when local variable escapes

2016-10-11 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77938 --- Comment #1 from Ivan Sorokin --- The generated code for caller is the following: caller(): sub rsp, 24 lea rdi, [rsp+12] callescape(int&) callcallee() add rsp, 24 ret As

[Bug tree-optimization/77938] missing tailcall optimization in case when local variable escapes that goes out of scope before the possible tail call site

2016-10-17 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77938 --- Comment #5 from Ivan Sorokin --- (In reply to Andrew Pinski from comment #4) > Related (maybe a dup really) to PR 59813. I agree. The linked bug is just another manifestation of the same issue. Regarding my question about excessive stack fr

[Bug c++/78427] New: missed optimization of loop condition

2016-11-19 Thread vanyacpp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider the following code: void and_1(uint64_t const* a, uint64_t* b, size_t n) { for (size_t i = 0; i != n; ++i) b[i] = a[i] & b[i]; } GCC 6.2 (-O2, -mtune=has

[Bug c++/78427] missed optimization of loop condition

2016-11-19 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78427 --- Comment #1 from Ivan Sorokin --- I wonder if it is feasible to implement this optimization in GCC.

[Bug c++/78427] missed optimization of loop condition

2016-11-19 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78427 --- Comment #2 from Ivan Sorokin --- Created attachment 40086 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40086&action=edit loop-bench.cpp I uploaded my test program, so you can reproduce the issue.

[Bug c++/60683] New: confused by earlier errors, bailing out on incorrect std::initializer_list

2014-03-27 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com The following code leads to error "confused by earlier errors, bailing out": namespace std { template struct initia

[Bug c++/61341] New: internal compiler error: in tsubst, at cp/pt.c:11313

2014-05-28 Thread vanyacpp at gmail dot com
Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com GCC 4.8.2 template /* 1 */ struct X { }; template struct X, X > /* 2 */ { T i; }; template struct X...> /* 3 */ { const int static value = sizeof...(T); }; template st

[Bug c++/61341] internal compiler error: in tsubst, at cp/pt.c:11313

2014-05-28 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61341 --- Comment #1 from Ivan Sorokin --- Reduced case: template struct X {}; template void foo(X... a); void test() { foo(X(), X()); }

[Bug c++/61355] New: gcc doesn't normalize type in non-type template parameters

2014-05-29 Thread vanyacpp at gmail dot com
ormal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com template struct X { }; int test() { X x; } GCC rejects this code with a message: 3.cpp: In function ‘int test()’: 3.cpp:6:18: error: ‘int()’ is not a valid

[Bug c++/65389] New: long compile time on incorrect code with lambdas

2015-03-11 Thread vanyacpp at gmail dot com
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com The following program takes ages to compile: template void demangle_type_rec(F out, FF prepend_suffix) { //int class_type = // uncomment to get infinite stream of error messages

[Bug c++/60241] New: internal compiler error: in finish_member_declaration, at cp/semantics.c:2617

2014-02-17 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com I've got internal compiler error on the following code: template struct x { template struct y { typedef T re

[Bug c++/60335] New: confused by earlier errors, bailing out

2014-02-24 Thread vanyacpp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com struct baz0 { int baz1(void bar0, struct bar0 {} bar3); };

[Bug c++/60385] New: confused by earlier errors, bailing out

2014-03-01 Thread vanyacpp at gmail dot com
++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com float foo4() {} namespace foo4 { struct bar6 { friend wchar_t bar1(); }; } GCC 4.7.3

[Bug c++/67965] New: gcc (incorrectly) requires template keyword in non-dependent expression

2015-10-14 Thread vanyacpp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- I believe that in the following example "template" keyword is not required as expression "f()" is not type de

[Bug c++/68114] New: gcc doesn't show error when return type of deleted function is incomplete

2015-10-27 Thread vanyacpp at gmail dot com
erity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- struct z; z f() = delete; // should be an error here As I understand, f is a function definition and return type of fun

[Bug c++/68114] gcc doesn't show error when return type of deleted function is incomplete

2015-10-30 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68114 Ivan Sorokin changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

[Bug c++/61975] New: default template arguments do not work with out-of-class class declaration

2014-07-31 Thread vanyacpp at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com GCC shows error on this code: template struct x { template struct y; }; template <> template struct x::y { typedef U type; };

[Bug c++/36961] fails to identify template

2014-08-11 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36961 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #7

[Bug c++/69348] New: alias declarations can not be used inside qualifiers of declarators

2016-01-18 Thread vanyacpp at gmail dot com
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC shows error on this code. The code works correctly on clang and MSVC. template struct X { int foo(); }; template using foo2

[Bug c++/67190] New: gcc allows extra template <> on explicit template specializations

2015-08-12 Thread vanyacpp at gmail dot com
normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC accepts this code: template struct vector {}; template struct z {}; template <> template <> // extra str

[Bug c++/63809] Missing warning on extra template

2015-08-12 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63809 --- Comment #2 from Ivan Sorokin --- (In reply to Marc Glisse from comment #0) > g++ fails to warn about the extra parameter list. clang does warn, see > PR63750. Why is it a warning? Isn't this code incorrect? I can not find anything in [temp.e

[Bug tree-optimization/71761] New: missing tailcall optimization

2016-07-04 Thread vanyacpp at gmail dot com
Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Currently GCC doesn't optimize tailcall in the following function: struct token { char const* tok_start; char const* tok_end; int tok_type; uns

[Bug tree-optimization/71761] missing tailcall optimization

2016-07-04 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71761 --- Comment #2 from Ivan Sorokin --- I compared this with clang. 1) typedef int token; Both GCC and clang optimize this to a single jump. 2) struct token {int a}; clang optimizes this into a single jump. GCC generates: subq$8, %rsp

[Bug c++/68901] UBSan triggers false -Wpadded warning

2016-07-29 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #1

[Bug c++/68901] UBSan triggers false -Wpadded warning

2016-07-29 Thread vanyacpp at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68901 --- Comment #2 from Ivan Sorokin --- Created attachment 39034 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39034&action=edit bug-68901.cpp

[Bug c++/76995] New: syntax error

2016-08-15 Thread vanyacpp at gmail dot com
at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC shows syntax error on this code. Looks like it disambiguates the expression "(mytype())(args...)" as cstyle-cast although "(args...)" is not a valid cast-expression. struct mytype {

[Bug sanitizer/99418] New: sanitizer checks for accessing multidimentional VLA-array

2021-03-05 Thread vanyacpp at gmail dot com via Gcc-bugs
Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot

[Bug sanitizer/99418] sanitizer checks for accessing multidimentional VLA-array

2021-03-06 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug sanitizer/99418] sanitizer checks for accessing multidimentional VLA-array

2021-03-06 Thread vanyacpp at gmail dot com via Gcc-bugs
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.

[Bug sanitizer/99418] sanitizer checks for accessing multidimentional VLA-array

2021-03-09 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug sanitizer/99418] sanitizer checks for accessing multidimentional VLA-array

2021-03-09 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug sanitizer/99418] sanitizer checks for accessing multidimentional VLA-array

2021-03-09 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug c++/100039] New: GCC can not bind lvalue to lvalue reference in brace-initialized-temporary expression

2021-04-11 Thread vanyacpp at gmail dot com via Gcc-bugs
Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider this program: typedef int& ref; int main() { int a; ref{a}; } This is accepted by clang,

[Bug analyzer/94355] support for C++ new expression

2021-04-12 Thread vanyacpp at gmail dot com via Gcc-bugs
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); }

[Bug analyzer/94355] support for C++ new expression

2021-04-12 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug middle-end/99797] accessing uninitialized automatic variables

2021-04-19 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99797 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment

[Bug rtl-optimization/48877] Inline asm for rdtsc generates silly code

2020-12-25 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48877 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #2

[Bug middle-end/56719] missed optimization: i > 0xffff || i*4 > 0xffff

2020-12-25 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56719 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #8

[Bug tree-optimization/47579] STL size() == 0 does unnecessary shift

2020-12-25 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47579 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #3

[Bug c++/80016] error is positioned incorrectly

2021-01-02 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80016 Ivan Sorokin changed: What|Removed |Added Resolution|--- |FIXED Status|ASSIGNED

[Bug c++/98501] New: potential optimization for base<->derived pointer casts

2021-01-02 Thread vanyacpp at gmail dot com via Gcc-bugs
normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Consider this code: struct base1 { int a; }; struct base2 { int b; }; struct derived : base1, base2 {}; derived& to_derived_ba

[Bug c++/98501] potential optimization for base<->derived pointer casts

2021-01-05 Thread vanyacpp at gmail dot com via Gcc-bugs
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?

[Bug rtl-optimization/98555] Functions optimized to zero length break function pointer inequality

2021-01-09 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98555 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #4

[Bug c++/98660] -Wold-style-cast should not warn on casts that look like (decltype(x))(x)

2021-01-13 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98660 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #1

[Bug middle-end/98709] New: gcc optimizes bitwise operations, but doesn't optimize logical ones

2021-01-16 Thread vanyacpp at gmail dot com via Gcc-bugs
ormal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- GCC 10.2 produces very good code for this function noticing that both sides of conjuntion are the same: unsigned foo_bi

[Bug middle-end/98710] New: missing optimization (x | c) & ~(y | c) -> x & ~(y | c)

2021-01-16 Thread vanyacpp at gmail dot com via Gcc-bugs
ity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- On this function clang generates slightly shorter code unsigned foo(unsigned x, unsigned y, unsigned c) { return (x | c

[Bug tree-optimization/98774] New: gcc -O3 does not vectorize multiplication

2021-01-20 Thread vanyacpp at gmail dot com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Created attachment 50014 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50014&action=edit nbody-update-velocity.cpp In the following sample GCC (-O3

[Bug tree-optimization/98775] New: missing optimization opportunity on nbody

2021-01-20 Thread vanyacpp at gmail dot com via Gcc-bugs
-optimization Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- Created attachment 50015 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50015&action=edit nbody.cpp On the attached sample (208 LOC), clang 11.0 genera

[Bug tree-optimization/98775] missing optimization opportunity on nbody

2021-01-20 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug c++/98814] Add fix-it hints for missing asterisk

2021-01-26 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98814 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #2

[Bug tree-optimization/98774] gcc -O3 does not vectorize some operations

2021-01-27 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug c++/82640] gcc doesn't show errors on anonymous local variables

2021-01-30 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82640 Ivan Sorokin changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Bug target/91400] __builtin_cpu_supports conjunction is optimized poorly

2021-02-04 Thread vanyacpp at gmail dot com via Gcc-bugs
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

[Bug middle-end/99087] New: suboptimal codegen for division by constant 3

2021-02-13 Thread vanyacpp at gmail dot com via Gcc-bugs
: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: vanyacpp at gmail dot com Target Milestone: --- These two are functionally the same, but generate different code with g++ -O2: unsigned long long foo(unsigned long long a) { return a / 3; } unsigned long long

[Bug middle-end/95014] gcc fails to merge two identical returns

2021-04-30 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95014 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #1

[Bug rtl-optimization/3507] appalling optimisation with sub/cmp on multiple targets

2021-06-14 Thread vanyacpp at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3507 Ivan Sorokin changed: What|Removed |Added CC||vanyacpp at gmail dot com --- Comment #60

  1   2   >