[Bug c++/100409] C++ FE elides pure throwing call

2022-01-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Richard Biener changed: What|Removed |Added Resolution|--- |INVALID

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Bug 100409 depends on bug 101087, which changed state. Bug 101087 Summary: [9 Regression] Unevaluated operand of sizeof affects noexcept operator https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101087 What|Removed

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #15 from Jason Merrill --- (In reply to Richard Biener from comment #14) > Does that mean C++ should default to -fdelete-dead-exceptions? That makes sense. The C++ standard has nothing to say about this, since pure/const are

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #14 from Richard Biener --- (In reply to Jason Merrill from comment #13) > (In reply to Richard Biener from comment #3) > > - if (! TREE_SIDE_EFFECTS (expr)) > > + if (! TREE_SIDE_EFFECTS (expr) && expr_noexcept_p (expr, 0)) > >

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread jason at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #13 from Jason Merrill --- (In reply to Richard Biener from comment #3) > - if (! TREE_SIDE_EFFECTS (expr)) > + if (! TREE_SIDE_EFFECTS (expr) && expr_noexcept_p (expr, 0)) > expr = void_node; The assumption that an

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread mpolacek at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org ---

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Richard Biener changed: What|Removed |Added Depends on||101087 --- Comment #11 from Richard

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #10 from Richard Biener --- (In reply to Richard Biener from comment #7) > Jason, any idea? diff --git a/gcc/cp/except.c b/gcc/cp/except.c index a8cea53cf91..cbc94dff790 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -1050,7

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread harald at gigawatt dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #9 from Harald van Dijk --- (In reply to Richard Biener from comment #8) > It has been consensus that throwing exceptions and const/pure are different > concepts that co-exist. See for example the recent discussion at >

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #8 from Richard Biener --- (In reply to Harald van Dijk from comment #4) > The documentation for the pure attribute refers to "functions that have no > observable effects on the state of the program other than to return a value" >

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Richard Biener changed: What|Removed |Added CC||jason at gcc dot gnu.org --- Comment

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #6 from Richard Biener --- Created attachment 51116 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51116=edit patch I was testing I was testing this patch.

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #5 from Richard Biener --- Hmm, doesn't quite work. FAIL: g++.dg/cpp0x/sfinae19.C -std=c++14 (internal compiler error) FAIL: g++.dg/cpp0x/sfinae22.C -std=c++14 (internal compiler error) FAIL: g++.dg/cpp1y/pr61636-2.C -std=c++14

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread harald at gigawatt dot nl via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Harald van Dijk changed: What|Removed |Added CC||harald at gigawatt dot nl ---

[Bug c++/100409] C++ FE elides pure throwing call

2021-07-08 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #3 from Richard Biener --- So I'm looking again at this. For the simple cases I have at hand we can fix the C++ FE issue with diff --git a/gcc/cp/cvt.c b/gcc/cp/cvt.c index d035e611be4..81097942449 100644 --- a/gcc/cp/cvt.c +++

[Bug c++/100409] C++ FE elides pure throwing call

2021-05-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 --- Comment #2 from Richard Biener --- After the PR100394 fix this is now the prevailing issue.

[Bug c++/100409] C++ FE elides pure throwing call

2021-05-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100409 Richard Biener changed: What|Removed |Added Keywords||wrong-code --- Comment #1 from