[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-11-13 Thread d-bugmail--- via Digitalmars-d-bugs
|--- |FIXED --- Comment #16 from Dlang Bot --- dlang/dmd pull request #13047 "Fix issue 22277 - removing strongly pure function calls is an incorrect optimization" was merged into master: - f5a75f5834a3ee9efa14c0e2a4da86a0c356b6df by dkorpel: fix issue 22277 - removing str

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-11-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #15 from timon.g...@gmx.ch --- (In reply to Ate Eskola from comment #14) > And Andrei killed that before the draft review? What was the rationale? I was too busy to spend a lot of time on it, especially given that Andrei was not a huge fa

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-11-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #14 from Ate Eskola --- And Andrei killed that before the draft review? What was the rationale? --

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-11-03 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 timon.g...@gmx.ch changed: What|Removed |Added CC||timon.g...@gmx.ch --- Comment #13 from ti

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #12 from Ate Eskola --- Currently, the compiler is allowed to elide such a `free` call if it can prove that `free` has been called before with a similar value in the pointed object. In that case, any potential crash or infinite loop would

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #11 from Dennis --- (In reply to Ate Eskola from comment #10) > I think the compiler is allowed to elide a `free` call implemented like > that. Agreed, I used a `debug` statement for demonstration purposes based on the knowledge that the

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 Ate Eskola changed: What|Removed |Added CC||ajiesk...@gmail.com Severity|normal

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-22 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #9 from Max Samukha --- (In reply to João Lourenço from comment #8) > > I am not sure this premise is true. A function returning 'void' may do no > > work at all or do work without observable side effects. I need to think > > more abo

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 João Lourenço changed: What|Removed |Added CC||jlourenco5...@gmail.com --- Comment #8 from

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-15 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #7 from Max Samukha --- (In reply to Andrei Alexandrescu from comment #5) > > > > Could you explain why void and pure is a contradiction? > > `void` implies "all of my work is done via side effects" I am not sure this premise is true.

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 Luís Ferreira changed: What|Removed |Added CC||lsferreira...@gmail.com --- Comment #6 from

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 --- Comment #5 from Andrei Alexandrescu --- (In reply to Max Samukha from comment #4) > (In reply to Andrei Alexandrescu from comment #3) > > This has been discussed a number of times in the past. One proposal was that > > `void` pure functions must

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-14 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 Max Samukha changed: What|Removed |Added CC||maxsamu...@gmail.com --- Comment #4 from Max S

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 Andrei Alexandrescu changed: What|Removed |Added CC||and...@erdani.com --- Comment #3 from

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-06 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=22277 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com --- Comment #2 from Razv

[Issue 22277] removing strongly pure function calls is an incorrect optimization

2021-09-04 Thread d-bugmail--- via Digitalmars-d-bugs
--- @dkorpel created dlang/dmd pull request #13047 "Fix issue 22277 - removing strongly pure function calls is an incorrect optimization" fixing this issue: - fix issue 22277 - removing strongly pure function calls is an incorrect optimization https://github.com/dlang/dmd/pull/13047 --