public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/54494] New: Missing store to volatile
@ 2012-09-05 17:47 pinskia at gcc dot gnu.org
2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-05 17:47 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Bug #: 54494
Summary: Missing store to volatile
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pinskia@gcc.gnu.org
Consider:
extern const unsigned long base;
static inline void wreg(unsigned char val, unsigned long addr)
{
*((volatile unsigned char *) (base + addr)) = val;
}
void wreg_twice(void)
{
wreg(0, 42);
wreg(0, 42);
}
---- CUT ---
At -O2 the second store to the volatile char is removed by the strlen pass.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
@ 2012-09-05 17:48 ` pinskia at gcc dot gnu.org
2012-09-05 18:03 ` pinskia at gcc dot gnu.org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-05 17:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
AssignedTo|unassigned at gcc dot |pinskia at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.2
Summary|Missing store to volatile |[4.7/4.8 Regression]
| |Missing store to volatile
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-05 17:48:42 UTC ---
I am going to fix this.
Note this is causing the mips linux kernel to become unstable.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
@ 2012-09-05 18:03 ` pinskia at gcc dot gnu.org
2012-09-05 18:24 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-05 18:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-09-05
Known to work| |4.6.1
Ever Confirmed|0 |1
Known to fail| |4.7.0, 4.7.1, 4.8.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
2012-09-05 18:03 ` pinskia at gcc dot gnu.org
@ 2012-09-05 18:24 ` pinskia at gcc dot gnu.org
2012-09-05 20:07 ` ralf@linux-mips.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-05 18:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-05 18:23:56 UTC ---
Created attachment 28134
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28134
Patch which fixes the problem
Here is the fix.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (2 preceding siblings ...)
2012-09-05 18:24 ` pinskia at gcc dot gnu.org
@ 2012-09-05 20:07 ` ralf@linux-mips.org
2012-09-06 4:12 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ralf@linux-mips.org @ 2012-09-05 20:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Ralf Baechle <ralf@linux-mips.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ralf@linux-mips.org
--- Comment #3 from Ralf Baechle <ralf@linux-mips.org> 2012-09-05 20:06:47 UTC ---
I've tested your proposed fix with the kernel configuration that I extracted
the test case from and I'm happy to report that the patch is working for me.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (3 preceding siblings ...)
2012-09-05 20:07 ` ralf@linux-mips.org
@ 2012-09-06 4:12 ` pinskia at gcc dot gnu.org
2012-09-06 8:08 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 4:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://gcc.gnu.org/ml/gcc-p |http://gcc.gnu.org/ml/gcc-p
|atches/2012-09/msg00321.htm |atches/2012-09/msg00350.htm
|l |l
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 04:12:03 UTC ---
Updated patch:
http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00350.html
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7/4.8 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (4 preceding siblings ...)
2012-09-06 4:12 ` pinskia at gcc dot gnu.org
@ 2012-09-06 8:08 ` pinskia at gcc dot gnu.org
2012-09-06 8:09 ` [Bug tree-optimization/54494] [4.7 " pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 8:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 08:08:21 UTC ---
Author: pinskia
Date: Thu Sep 6 08:08:09 2012
New Revision: 191014
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191014
Log:
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also.
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* gcc.dg/tree-ssa/strlen-1.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (6 preceding siblings ...)
2012-09-06 8:09 ` [Bug tree-optimization/54494] [4.7 " pinskia at gcc dot gnu.org
@ 2012-09-06 8:09 ` pinskia at gcc dot gnu.org
2012-09-06 13:52 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 8:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
Summary|[4.7/4.8 Regression] |[4.7 Regression] Missing
|Missing store to volatile |store to volatile
Known to fail|4.8.0 |
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 08:08:21 UTC ---
Author: pinskia
Date: Thu Sep 6 08:08:09 2012
New Revision: 191014
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191014
Log:
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also.
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* gcc.dg/tree-ssa/strlen-1.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-inline.c
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 08:09:13 UTC ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (5 preceding siblings ...)
2012-09-06 8:08 ` pinskia at gcc dot gnu.org
@ 2012-09-06 8:09 ` pinskia at gcc dot gnu.org
2012-09-06 8:09 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 8:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.8.0
Summary|[4.7/4.8 Regression] |[4.7 Regression] Missing
|Missing store to volatile |store to volatile
Known to fail|4.8.0 |
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 08:09:13 UTC ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (7 preceding siblings ...)
2012-09-06 8:09 ` pinskia at gcc dot gnu.org
@ 2012-09-06 13:52 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 13:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 13:51:45 UTC ---
Author: pinskia
Date: Thu Sep 6 13:51:37 2012
New Revision: 191025
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191025
Log:
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* tree-inline.c (remap_gimple_op_r): Copy TREE_SIDE_EFFECTS also.
2012-09-06 Andrew Pinski <apinski@cavium.com>
PR tree-opt/54494
* gcc.dg/tree-ssa/strlen-1.c: New testcase.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c
- copied unchanged from r191014,
trunk/gcc/testsuite/gcc.dg/tree-ssa/strlen-1.c
Modified:
branches/gcc-4_7-branch/ (props changed)
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-inline.c
Propchange: branches/gcc-4_7-branch/
('svn:mergeinfo' modified)
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (8 preceding siblings ...)
2012-09-06 13:52 ` pinskia at gcc dot gnu.org
@ 2012-09-06 13:54 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 13:53:57 UTC ---
Fixed.
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 13:53:57 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug tree-optimization/54494] [4.7 Regression] Missing store to volatile
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
` (9 preceding siblings ...)
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
@ 2012-09-06 13:54 ` pinskia at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-09-06 13:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54494
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 13:53:57 UTC ---
Fixed.
--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-09-06 13:53:57 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2012-09-06 13:54 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-05 17:47 [Bug tree-optimization/54494] New: Missing store to volatile pinskia at gcc dot gnu.org
2012-09-05 17:48 ` [Bug tree-optimization/54494] [4.7/4.8 Regression] " pinskia at gcc dot gnu.org
2012-09-05 18:03 ` pinskia at gcc dot gnu.org
2012-09-05 18:24 ` pinskia at gcc dot gnu.org
2012-09-05 20:07 ` ralf@linux-mips.org
2012-09-06 4:12 ` pinskia at gcc dot gnu.org
2012-09-06 8:08 ` pinskia at gcc dot gnu.org
2012-09-06 8:09 ` [Bug tree-optimization/54494] [4.7 " pinskia at gcc dot gnu.org
2012-09-06 8:09 ` pinskia at gcc dot gnu.org
2012-09-06 13:52 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
2012-09-06 13:54 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).