[Bug c/91812] GCC ignores volatile modifier

2019-09-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 --- Comment #7 from Richard Biener --- Author: rguenth Date: Thu Sep 19 12:49:45 2019 New Revision: 275960 URL: https://gcc.gnu.org/viewcvs?rev=275960&root=gcc&view=rev Log: 2019-09-19 Richard Biener PR tree-optimization/91812

[Bug c/91812] GCC ignores volatile modifier

2019-09-19 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 --- Comment #6 from Richard Biener --- OK, so while the comment says to exclude volatile the code never checked for that: /* We cannot replace a load that may throw or is volatile. */ && !stmt_can_throw_internal (cfun, u

[Bug c/91812] GCC ignores volatile modifier

2019-09-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 --- Comment #5 from Richard Biener --- (In reply to Richard Biener from comment #3) > On trunk we remove the loop because it has no side-effects (oops). actually no, it's the same issue (phiprop).

[Bug c/91812] GCC ignores volatile modifier

2019-09-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 --- Comment #4 from Richard Biener --- And the GCC 8 issue is phiprop doing bogus invariant motion of the load.

[Bug c/91812] GCC ignores volatile modifier

2019-09-18 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 Richard Biener changed: What|Removed |Added Keywords||wrong-code Status|UNCONFIRM

[Bug c/91812] GCC ignores volatile modifier

2019-09-18 Thread fuchedzhy at google dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 --- Comment #2 from Gregory Fuchedzhy --- (In reply to Eric Gallager from comment #1) > If you declare ptr like this instead, the assembly comes out looking > different: > volatile unsigned int *volatile ptr; Even seemingly unrelated code change

[Bug c/91812] GCC ignores volatile modifier

2019-09-18 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91812 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org --- Comment