* [Bug c/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
@ 2010-10-01 3:40 ` regehr at cs dot utah.edu
2010-10-01 10:27 ` [Bug rtl-optimization/45852] " rguenth at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: regehr at cs dot utah.edu @ 2010-10-01 3:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
--- Comment #1 from John Regehr <regehr at cs dot utah.edu> 2010-10-01 03:40:43 UTC ---
This problem has been there for some time: none of 3.0.0, 3.1.0, 3.2.0, 3.3.0,
3.4.0, 4.0.0, 4.1.0, 4.2.0, 4.3.0, 4.4.0, or 4.5.0 for x86 generates the right
code.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug rtl-optimization/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
2010-10-01 3:40 ` [Bug c/45852] " regehr at cs dot utah.edu
@ 2010-10-01 10:27 ` rguenth at gcc dot gnu.org
2010-12-14 13:44 ` [Bug middle-end/45852] " jakub at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-10-01 10:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.10.01 10:27:24
Component|c |rtl-optimization
Ever Confirmed|0 |1
--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-10-01 10:27:24 UTC ---
The expander throws away the assignment.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
2010-10-01 3:40 ` [Bug c/45852] " regehr at cs dot utah.edu
2010-10-01 10:27 ` [Bug rtl-optimization/45852] " rguenth at gcc dot gnu.org
@ 2010-12-14 13:44 ` jakub at gcc dot gnu.org
2010-12-14 14:55 ` amonakov at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-14 13:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-14 13:43:42 UTC ---
Created attachment 22753
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22753
gcc46-pr45852.patch
Untested fix. Alternatively if alt_rtl (or target?) has side-effects, we could
ignore it in store_expr.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
` (2 preceding siblings ...)
2010-12-14 13:44 ` [Bug middle-end/45852] " jakub at gcc dot gnu.org
@ 2010-12-14 14:55 ` amonakov at gcc dot gnu.org
2010-12-21 8:35 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-14 14:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #4 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-14 14:54:38 UTC ---
There's a couple of related bugs:
Optimizes away access to volatile field (unconfirmed):
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46762
Does not use volatile MEMs for assignments of structs with volatile fields:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45472
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
` (3 preceding siblings ...)
2010-12-14 14:55 ` amonakov at gcc dot gnu.org
@ 2010-12-21 8:35 ` jakub at gcc dot gnu.org
2011-01-16 20:27 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-21 8:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-21 08:35:19 UTC ---
Author: jakub
Date: Tue Dec 21 08:35:16 2010
New Revision: 168105
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168105
Log:
PR middle-end/45852
* expr.c (store_expr): Ignore alt_rtl if equal to target,
but has side-effects.
* gcc.target/i386/pr45852.c: New test.
Added:
trunk/gcc/testsuite/gcc.target/i386/pr45852.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/expr.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
` (4 preceding siblings ...)
2010-12-21 8:35 ` jakub at gcc dot gnu.org
@ 2011-01-16 20:27 ` jakub at gcc dot gnu.org
2011-01-17 0:37 ` jakub at gcc dot gnu.org
2011-01-17 8:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-16 20:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-16 20:23:04 UTC ---
Author: jakub
Date: Sun Jan 16 20:23:01 2011
New Revision: 168867
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168867
Log:
Backport from mainline
2010-12-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/45852
* expr.c (store_expr): Ignore alt_rtl if equal to target,
but has side-effects.
* gcc.target/i386/pr45852.c: New test.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/i386/pr45852.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/expr.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
` (5 preceding siblings ...)
2011-01-16 20:27 ` jakub at gcc dot gnu.org
@ 2011-01-17 0:37 ` jakub at gcc dot gnu.org
2011-01-17 8:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 0:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-16 22:56:13 UTC ---
Author: jakub
Date: Sun Jan 16 22:56:10 2011
New Revision: 168879
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168879
Log:
Backport from mainline
2010-12-21 Jakub Jelinek <jakub@redhat.com>
PR middle-end/45852
* expr.c (store_expr): Ignore alt_rtl if equal to target,
but has side-effects.
* gcc.target/i386/pr45852.c: New test.
Added:
branches/gcc-4_4-branch/gcc/testsuite/gcc.target/i386/pr45852.c
Modified:
branches/gcc-4_4-branch/gcc/ChangeLog
branches/gcc-4_4-branch/gcc/expr.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug middle-end/45852] volatile structs are broken!
2010-10-01 3:10 [Bug c/45852] New: volatile structs are broken! regehr at cs dot utah.edu
` (6 preceding siblings ...)
2011-01-17 0:37 ` jakub at gcc dot gnu.org
@ 2011-01-17 8:05 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17 8:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45852
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 08:01:41 UTC ---
Fixed for 4.4+.
^ permalink raw reply [flat|nested] 9+ messages in thread