public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement
@ 2013-04-06 9:44 dcb314 at hotmail dot com
2013-04-06 9:45 ` [Bug c++/56854] " dcb314 at hotmail dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2013-04-06 9:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56854
Bug #: 56854
Summary: error: non-decl/MEM_REF LHS in clobber statement
Classification: Unclassified
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: dcb314@hotmail.com
I just tried to compile the package openlierox-0.59-0.10
on gcc-4.9 trunk dated 20130403 on an AMD x86_64 box.
The compiler said
/home/dcb/rpmbuild/BUILD/OpenLieroX/src/game/Settings.h: In constructor
'FeatureSettingsLayer::FeatureSettingsLayer(const string&)':
/home/dcb/rpmbuild/BUILD/OpenLieroX/src/game/Settings.h:49:2: error:
non-decl/MEM_REF LHS in clobber statement
FeatureSettingsLayer(const std::string& debug_name_) :
debug_name(debug_name_) { makeSet(false); }
^
MEM[(struct ScriptVar_t *)this_1(D)].settings[_32]
# .MEM_113 = VDEF <.MEM_85>
MEM[(struct ScriptVar_t *)this_1(D)].settings[_32] ={v} {CLOBBER};
/home/dcb/rpmbuild/BUILD/OpenLieroX/src/game/Settings.h:49:2: internal compiler
error: verify_gimple failed
0xab89f9 verify_gimple_in_cfg(function*)
../../src/trunk/gcc/tree-cfg.c:4769
0x9efe17 execute_function_todo
../../src/trunk/gcc/passes.c:1963
0x9f0807 execute_todo
../../src/trunk/gcc/passes.c:1996
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Preprocessed source code attached. Flag -O2 required.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/56854] error: non-decl/MEM_REF LHS in clobber statement
2013-04-06 9:44 [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement dcb314 at hotmail dot com
@ 2013-04-06 9:45 ` dcb314 at hotmail dot com
2013-04-08 11:09 ` [Bug tree-optimization/56854] [4.9 Regression] " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2013-04-06 9:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56854
--- Comment #1 from David Binderman <dcb314 at hotmail dot com> 2013-04-06 09:45:18 UTC ---
Created attachment 29813
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29813
gzipped C++ source code
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/56854] [4.9 Regression] error: non-decl/MEM_REF LHS in clobber statement
2013-04-06 9:44 [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement dcb314 at hotmail dot com
2013-04-06 9:45 ` [Bug c++/56854] " dcb314 at hotmail dot com
@ 2013-04-08 11:09 ` rguenth at gcc dot gnu.org
2013-04-08 14:15 ` jakub at gcc dot gnu.org
2013-04-09 10:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-04-08 11:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56854
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |tree-optimization
Target Milestone|--- |4.9.0
Summary|error: non-decl/MEM_REF LHS |[4.9 Regression] error:
|in clobber statement |non-decl/MEM_REF LHS in
| |clobber statement
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> 2013-04-08 11:09:28 UTC ---
It's very likely forwprop that does this. We should probably disallow
any forwprop into CLOBBER lhs. CCP will do everything that is allowed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/56854] [4.9 Regression] error: non-decl/MEM_REF LHS in clobber statement
2013-04-06 9:44 [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement dcb314 at hotmail dot com
2013-04-06 9:45 ` [Bug c++/56854] " dcb314 at hotmail dot com
2013-04-08 11:09 ` [Bug tree-optimization/56854] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-04-08 14:15 ` jakub at gcc dot gnu.org
2013-04-09 10:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-08 14:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-08 14:15:17 UTC ---
So like this?
Reducing testcase now...
--- tree-ssa-forwprop.c.jj12013-02-25 23:51:21.000000000 +0100
+++ tree-ssa-forwprop.c2013-04-08 16:12:37.908611768 +0200
@@ -826,7 +826,11 @@ forward_propagate_addr_expr_1 (tree name
&& integer_zerop (TREE_OPERAND (lhs, 1))
&& useless_type_conversion_p
(TREE_TYPE (TREE_OPERAND (def_rhs, 0)),
- TREE_TYPE (gimple_assign_rhs1 (use_stmt))))
+ TREE_TYPE (gimple_assign_rhs1 (use_stmt)))
+ /* Don't forward anything into clobber stmts if it would result
+ in the lhs no longer being a MEM_REF. */
+ && (!gimple_clobber_p (use_stmt)
+ || TREE_CODE (TREE_OPERAND (def_rhs, 0)) == MEM_REF))
{
tree *def_rhs_basep = &TREE_OPERAND (def_rhs, 0);
tree new_offset, new_base, saved, new_lhs;
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/56854] [4.9 Regression] error: non-decl/MEM_REF LHS in clobber statement
2013-04-06 9:44 [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement dcb314 at hotmail dot com
` (2 preceding siblings ...)
2013-04-08 14:15 ` jakub at gcc dot gnu.org
@ 2013-04-09 10:16 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-09 10:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56854
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-09 10:16:15 UTC ---
Author: jakub
Date: Tue Apr 9 10:04:24 2013
New Revision: 197625
URL: http://gcc.gnu.org/viewcvs?rev=197625&root=gcc&view=rev
Log:
PR tree-optimization/56854
* tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Don't
forward into clobber stmts if it would change MEM_REF lhs into
non-MEM_REF.
* g++.dg/torture/pr56854.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr56854.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-forwprop.c
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-09 10:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-06 9:44 [Bug c++/56854] New: error: non-decl/MEM_REF LHS in clobber statement dcb314 at hotmail dot com
2013-04-06 9:45 ` [Bug c++/56854] " dcb314 at hotmail dot com
2013-04-08 11:09 ` [Bug tree-optimization/56854] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-04-08 14:15 ` jakub at gcc dot gnu.org
2013-04-09 10:16 ` jakub 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).