[Bug c++/77396] New: address sanitizer crashes if all static global variables are optimized

2016-08-28 Thread no...@turm-lahnstein.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- Following stackoverflow discussion: http://stackoverflow.com/questions/39081183/errors-with-g-5-and-6-when-using-address-sanitizer

[Bug c++/77397] New: function initializing global static variables not optimized again fully

2016-08-28 Thread no...@turm-lahnstein.de
Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- Compiling static int data = 0; static int dummy = data; int main() { } with g++ -Os leads to a less than perfect assembler code

[Bug c++/80372] non-optimal handling of copying a std::complex

2017-04-09 Thread no...@turm-lahnstein.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80372 --- Comment #3 from ead <no...@turm-lahnstein.de> --- (In reply to Andrew Pinski from comment #2) > What options are you using? -O2 or -O3 ? -mcpu=native ? It is compiled with -O3, but it is the same for -O2 or -Os. If compiled wi

[Bug c++/80372] New: non-optimal handling of copying a std::complex

2017-04-08 Thread no...@turm-lahnstein.de
++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- While copying a std::complex from a memory location to another, four movsd operations are used. However it is possible to use two movups, which are faster (at least on some

[Bug c++/80373] New: non-optimal handling of copying a std::complex

2017-04-08 Thread no...@turm-lahnstein.de
++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- While copying a std::complex from a memory location to another, four movsd operations are used. However it is possible to use two movups, which are faster (at least on some

[Bug c/87268] New: Missed optimization for a tailcall

2018-09-10 Thread no...@turm-lahnstein.de
Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- For a simple code like this: extern int shared; void doit(int *); int call_doit(){ doit(); } when compiled with -O3 the resulting assembler is without tailcall optimization

[Bug middle-end/87268] Missed optimization for a tailcall

2018-09-10 Thread no...@turm-lahnstein.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87268 --- Comment #3 from ead --- Sorry, I only saw that clang gives me what I expect... and overlooked the warning. call_doit should return void and not int.

[Bug c++/86497] New: Regression for x!=x

2018-07-11 Thread no...@turm-lahnstein.de
: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- When compiling bool is_nan1(double x){ return x!=x; } with g++-8.1 -O3 the resulting assembler (https://godbolt.org/g/BBFM3Q) is _Z7is_nan1d: ucomisd %xmm0, %xmm0 movl $1, %edx setne %al

[Bug c++/84891] New: -fno-signed-zeros leads to optimization which should be possible only if also -ffinite-math-only is on

2018-03-15 Thread no...@turm-lahnstein.de
: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- Please consider the following example #include #include #include std::complex mult

[Bug c++/85292] New: multiple definition of default argument emitted

2018-04-08 Thread no...@turm-lahnstein.de
: c++ Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- Please consider the following code: #include namespace timeit{ typedef std::function Fun; //returns time needed for execution in seconds, calls setup once

[Bug middle-end/84891] -fno-signed-zeros leads to optimization which should be possible only if also -ffinite-math-only is on

2018-03-19 Thread no...@turm-lahnstein.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84891 --- Comment #4 from ead <no...@turm-lahnstein.de> --- From my naive point of view: - The c++ standard doesn't define how complex-number-multiplication should work, it is implementation defined/gcc-specific (I'm not a standard-schol

[Bug c/90356] New: Missed optimization for variables initialized to 0.0

2019-05-05 Thread no...@turm-lahnstein.de
Component: c Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- For the following example: float doit(float k){ float c[2]={0.0}; c[1]+=k; return c[0]+c[1]; } the resulting assembler (-O2) is (https://gcc.godbolt.org/z

[Bug middle-end/90356] Missed optimization for variables initialized to 0.0

2019-05-05 Thread no...@turm-lahnstein.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90356 --- Comment #3 from ead --- I guess -0.0+0.0=0.0 is the reason we have to add it once. I think there is no need to add 0.0 twice. Btw. compiled with -fno-signed-zeros, the code gets optimized to doit: ret as expected.

[Bug c/91348] New: Missed optimization: not passing hidden pointer but copying memory

2019-08-04 Thread no...@turm-lahnstein.de
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- For the following example: struct Vec3{ double x, y, z; }; void vadd_v2(struct Vec3* a, struct Vec3* out); struct Vec3 use_v1(struct

[Bug c/91515] New: missed optimization: no tailcall for types of class MEMORY

2019-08-21 Thread no...@turm-lahnstein.de
Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- Produced assembler (-O2) for struct Vec3{ double x, y, z; }; struct Vec3 create(void); struct Vec3 use(){ return create

[Bug c/91398] Possible missed optimization: Can a pointer be passed as hidden pointer in x86-64 System V ABI

2019-08-09 Thread no...@turm-lahnstein.de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91398 --- Comment #3 from ead --- Thank you for the expanations and your time!

[Bug c/91398] New: Possible missed optimization: Can a pointer be passed as hidden pointer in x86-64 System V ABI

2019-08-08 Thread no...@turm-lahnstein.de
Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: no...@turm-lahnstein.de Target Milestone: --- For the following example: struct Vec3{ double x, y, z; }; struct Vec3 do_something(void); void use