* [Bug c++/50672] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
@ 2011-10-09 12:32 ` paolo.carlini at oracle dot com
2011-10-09 14:56 ` dcb314 at hotmail dot com
` (21 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 12:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
Last reconfirmed| |2011-10-09
Ever Confirmed|0 |1
--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 12:31:46 UTC ---
Can you try to reduce the testcase somewhat, maybe helping yourself with
'delta'? http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
Thanks.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
2011-10-09 12:32 ` [Bug c++/50672] " paolo.carlini at oracle dot com
@ 2011-10-09 14:56 ` dcb314 at hotmail dot com
2011-10-09 15:05 ` paolo.carlini at oracle dot com
` (20 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: dcb314 at hotmail dot com @ 2011-10-09 14:56 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #2 from dcb <dcb314 at hotmail dot com> 2011-10-09 14:55:29 UTC ---
(In reply to comment #1)
> Can you try to reduce the testcase somewhat, maybe helping yourself with
> 'delta'? http://gcc.gnu.org/wiki/A_guide_to_testcase_reduction
I tried for an hour or so to get 'delta' to do something useful.
I failed. Feel free to have a go yourself.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
2011-10-09 12:32 ` [Bug c++/50672] " paolo.carlini at oracle dot com
2011-10-09 14:56 ` dcb314 at hotmail dot com
@ 2011-10-09 15:05 ` paolo.carlini at oracle dot com
2011-10-09 15:28 ` markus at trippelsdorf dot de
` (19 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 15:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 15:04:34 UTC ---
I already felt free, I asked because without a manageable testcase it gonna
take more time, be warned.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (2 preceding siblings ...)
2011-10-09 15:05 ` paolo.carlini at oracle dot com
@ 2011-10-09 15:28 ` markus at trippelsdorf dot de
2011-10-09 15:32 ` markus at trippelsdorf dot de
` (18 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-09 15:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Markus Trippelsdorf <markus at trippelsdorf dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |markus at trippelsdorf dot
| |de
--- Comment #4 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-09 15:28:16 UTC ---
% cat test.ii
namespace std {
template<class _CharT> struct char_traits;
typedef struct __locale_struct {
}
*__locale_t;
template<typename _CharT, typename _Traits = char_traits<_CharT> > class
basic_ostream;
typedef basic_ostream<char> ostream;
}
class UniqueId {
};
typedef int BoxCoordinate;
typedef int BoxDimension;
const BoxDimension X = 0;
const BoxDimension Y = 1;
const BoxDimension NDimensions = 2;
class BoxPoint {
protected: BoxCoordinate point[NDimensions];
public: BoxPoint(BoxCoordinate x, BoxCoordinate y) {
}
bool isValid() const {
}
void operator += (const BoxPoint& p) {
if (isValid() && p.isValid()) {
point[X] += p.point[X];
}
}
BoxCoordinate& operator [] (const BoxDimension& dimension) {
return point[dimension];
}
};
class BoxSize: public BoxPoint {
};
class BoxRegion {
private: BoxPoint _origin;
BoxSize _space;
public: BoxRegion(const BoxPoint& o, const BoxSize& s) : _origin(o),
_space(s) {
}
BoxCoordinate& origin(BoxDimension d) {
}
BoxCoordinate& space(BoxDimension d) {
}
};
inline bool operator <= (const BoxPoint& p, const BoxRegion& r) {
for (BoxDimension d = X;
d <= Y;
d++) if (p[d] < r.origin(d) || p[d] >= r.origin(d) +
r.space(d)) return false;
return true;
}
extern "C" {
typedef struct _WidgetRec *Widget;
}
struct GraphGC {
BoxPoint offsetIfSelected;
};
class GraphNode;
class Graph;
class GraphEdge {
private: UniqueId _id;
GraphNode *_from;
GraphNode *_to;
bool _hidden;
GraphEdge *_nextFrom;
GraphEdge *_nextTo;
GraphEdge *_prevFrom;
GraphEdge *_prevTo;
GraphEdge *next;
GraphEdge *prev;
Graph *graph;
public: GraphEdge(GraphNode *f, GraphNode *t): _id(), _from(f),
_to(t), _hidden(false), _nextFrom(0), _nextTo(0),
_prevFrom(0), _prevTo(0), next(0), prev(0), graph(0) {
}
GraphNode *from() const {
}
GraphNode *to() const {
}
};
class LineGraphEdge: public GraphEdge {
protected: static void findLine(const BoxPoint& c1, const BoxPoint& c2,
const BoxRegion& b1, const BoxRegion& b2, BoxPoint& p1, BoxPoi
nt& p2, const GraphGC& gc);
virtual void drawLine(Widget w, const BoxRegion& exposed,
const GraphGC& gc) const;
public: void _print(std::ostream& os, const GraphGC &gc) const;
};
class ArcGraphEdge: public LineGraphEdge {
static bool center(const BoxPoint& p1, const BoxPoint& p2,
const BoxPoint& p3, double& x, double& y);
void makeLine(Widget w, const BoxRegion& exposed, std::ostream&
os, const GraphGC& gc) const;
};
class GraphNode {
public: int count;
bool& selected() {
}
GraphEdge *firstTo() const {
}
GraphEdge *nextTo(GraphEdge *ref) const;
virtual const BoxPoint& pos() const = 0;
virtual const BoxRegion& region(const GraphGC& gc) const = 0;
virtual bool isHint() const {
}
};
class PosGraphNode: public GraphNode {
};
class RegionGraphNode: public PosGraphNode {
};
class HintGraphNode: public RegionGraphNode {
};
void ArcGraphEdge::makeLine(Widget w, const BoxRegion& exposed,
std::ostream& os, const GraphGC& gc) const {
HintGraphNode *arc_hint = 0;
RegionGraphNode *arc_from = 0;
RegionGraphNode *arc_to = 0;
bool make_arc = true;
if (from()->isHint() && to()->isHint()) {
make_arc = false;
}
else if (from()->isHint() && from()->firstTo() != 0) {
if (arc_hint == 0 || arc_from == 0 || arc_to == 0 ||
arc_hint->nextTo(arc_hint->firstTo()) != 0) {
make_arc = false;
}
}
if (!make_arc) {
if (w != 0) LineGraphEdge::drawLine(w, exposed, gc);
else LineGraphEdge::_print(os, gc);
return;
}
BoxPoint pos_from = arc_from->pos();
BoxRegion region_from = arc_from->region(gc);
BoxPoint pos_to = arc_to->pos();
BoxRegion region_to = arc_to->region(gc);
BoxPoint pos_hint = arc_hint->pos();
if (arc_hint->selected()) {
pos_hint += gc.offsetIfSelected;
}
if (pos_hint <= region_from || pos_hint <= region_to) {
return;
}
double cx, cy;
bool ok = center(pos_from, pos_hint, pos_to, cx, cy);
if (!ok) {
if (w != 0) LineGraphEdge::drawLine(w, exposed, gc);
else LineGraphEdge::_print(os, gc);
}
}
% g++ test.ii -Wfatal-errors -S -O2 -w -fpermissive -o /dev/null
test.ii: In member function ‘void ArcGraphEdge::makeLine(Widget, const
BoxRegion&, std::ostream&, const GraphGC&) const’:
test.ii:103:9: internal compiler error: Segmentation fault
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (3 preceding siblings ...)
2011-10-09 15:28 ` markus at trippelsdorf dot de
@ 2011-10-09 15:32 ` markus at trippelsdorf dot de
2011-10-09 15:39 ` [Bug c++/50672] [4.7 Regression] " paolo.carlini at oracle dot com
` (17 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: markus at trippelsdorf dot de @ 2011-10-09 15:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #5 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2011-10-09 15:31:43 UTC ---
Created attachment 25449
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25449
reduced testcase
Copy & paste didn't work. Here is an attachment.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (4 preceding siblings ...)
2011-10-09 15:32 ` markus at trippelsdorf dot de
@ 2011-10-09 15:39 ` paolo.carlini at oracle dot com
2011-10-09 15:40 ` paolo.carlini at oracle dot com
` (16 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 15:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenther at suse dot de
Summary|ice: verify_ssa failed: no |[4.7 Regression] ice:
|immediate_use list |verify_ssa failed: no
| |immediate_use list
--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-09 15:38:39 UTC ---
Thanks Markus. Looks like a regression, and should be better categorized.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug c++/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (5 preceding siblings ...)
2011-10-09 15:39 ` [Bug c++/50672] [4.7 Regression] " paolo.carlini at oracle dot com
@ 2011-10-09 15:40 ` paolo.carlini at oracle dot com
2011-10-10 9:39 ` [Bug tree-optimization/50672] " rguenth at gcc dot gnu.org
` (15 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-09 15:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Paolo Carlini <paolo.carlini at oracle dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (6 preceding siblings ...)
2011-10-09 15:40 ` paolo.carlini at oracle dot com
@ 2011-10-10 9:39 ` rguenth at gcc dot gnu.org
2011-10-10 10:36 ` rguenth at gcc dot gnu.org
` (14 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 9:39 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Component|c++ |tree-optimization
Known to work| |4.6.1
Version|unknown |4.7.0
AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.0
--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-10 09:38:44 UTC ---
Caused by PRE. Mine.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (7 preceding siblings ...)
2011-10-10 9:39 ` [Bug tree-optimization/50672] " rguenth at gcc dot gnu.org
@ 2011-10-10 10:36 ` rguenth at gcc dot gnu.org
2011-10-10 15:35 ` rguenth at gcc dot gnu.org
` (13 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|rguenth at gcc dot gnu.org |tom at codesourcery dot com
--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-10-10 10:35:30 UTC ---
Err. It's tailmerge ... not mine ;)
More reduced testcase:
typedef int BoxCoordinate;
typedef int BoxDimension;
const BoxDimension X = 0;
const BoxDimension Y = 1;
const BoxDimension NDimensions = 2;
class BoxPoint {
BoxCoordinate point[NDimensions];
public:
bool isValid() const;
void operator += (const BoxPoint& p) {
if (isValid() && p.isValid()) {
point[X] += p.point[X];
}
}
const BoxCoordinate& operator [] (const BoxDimension& dimension) const {
return point[dimension];
}
};
class BoxRegion {
public:
BoxCoordinate& origin(BoxDimension d) const;
BoxCoordinate& space(BoxDimension d) const;
};
inline bool operator <= (const BoxPoint& p, const BoxRegion& r) {
for (BoxDimension d = X;
d <= Y;
d++) if (p[d] < r.origin(d) || p[d] >= r.origin(d) + r.space(d))
return false;
return true;
}
typedef struct _WidgetRec *Widget;
struct GraphGC {
BoxPoint offsetIfSelected;
};
class GraphNode;
class GraphEdge {
public:
GraphNode *from() const;
GraphNode *to() const;
};
class LineGraphEdge: public GraphEdge {
protected:
virtual void drawLine(Widget w, const GraphGC& gc) const;
void _print(const GraphGC &gc) const;
};
class ArcGraphEdge: public LineGraphEdge {
static bool center(const BoxPoint& p1, const BoxPoint& p2,
const BoxPoint& p3, double& x, double& y);
void makeLine(Widget w, const GraphGC& gc) const;
};
class GraphNode {
public:
bool& selected();
GraphEdge *firstTo() const;
GraphEdge *nextTo(GraphEdge *ref) const;
virtual const BoxPoint& pos() const = 0;
virtual const BoxRegion& region(const GraphGC& gc) const = 0;
virtual bool isHint() const;
};
class PosGraphNode: public GraphNode { };
class RegionGraphNode: public PosGraphNode { };
class HintGraphNode: public RegionGraphNode { };
void ArcGraphEdge::makeLine(Widget w, const GraphGC& gc) const {
HintGraphNode *arc_hint = 0;
RegionGraphNode *arc_from = 0;
RegionGraphNode *arc_to = 0;
bool make_arc = true;
if (from()->isHint() && to()->isHint()) {
make_arc = false;
}
else if (from()->isHint() && from()->firstTo() != 0) {
if (arc_hint == 0 || arc_from == 0 || arc_to == 0
|| arc_hint->nextTo(arc_hint->firstTo()) != 0) {
make_arc = false;
}
}
if (!make_arc) {
if (w != 0) LineGraphEdge::drawLine(w, gc);
else LineGraphEdge::_print(gc);
return;
}
BoxPoint pos_from = arc_from->pos();
BoxRegion region_from = arc_from->region(gc);
BoxPoint pos_to = arc_to->pos();
BoxRegion region_to = arc_to->region(gc);
BoxPoint pos_hint = arc_hint->pos();
if (arc_hint->selected()) {
pos_hint += gc.offsetIfSelected;
}
if (pos_hint <= region_from || pos_hint <= region_to) {
return;
}
double cx, cy;
bool ok = center(pos_from, pos_hint, pos_to, cx, cy);
if (!ok) {
if (w != 0) LineGraphEdge::drawLine(w, gc);
else LineGraphEdge::_print(gc);
}
}
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (8 preceding siblings ...)
2011-10-10 10:36 ` rguenth at gcc dot gnu.org
@ 2011-10-10 15:35 ` rguenth at gcc dot gnu.org
2011-10-10 15:49 ` vries at gcc dot gnu.org
` (12 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-10-10 15:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (9 preceding siblings ...)
2011-10-10 15:35 ` rguenth at gcc dot gnu.org
@ 2011-10-10 15:49 ` vries at gcc dot gnu.org
2011-10-10 20:18 ` vries at gcc dot gnu.org
` (11 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2011-10-10 15:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |vries at gcc dot gnu.org
--- Comment #9 from vries at gcc dot gnu.org 2011-10-10 15:48:37 UTC ---
This assert does not happen with this patch:
...
Index: tree-ssa-tail-merge.c
===================================================================
--- tree-ssa-tail-merge.c (revision 179592)
+++ tree-ssa-tail-merge.c (working copy)
@@ -1628,7 +1628,7 @@ tail_merge_optimize (unsigned int todo)
int nr_bbs_removed;
bool loop_entered = false;
int iteration_nr = 0;
- bool update_vops = !symbol_marked_for_renaming (gimple_vop (cfun));
+ bool update_vops = true;
int max_iterations = PARAM_VALUE (PARAM_MAX_TAIL_MERGE_ITERATIONS);
if (!flag_tree_tail_merge || max_iterations == 0)
...
I'm now going to analyse why that is the case.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (10 preceding siblings ...)
2011-10-10 15:49 ` vries at gcc dot gnu.org
@ 2011-10-10 20:18 ` vries at gcc dot gnu.org
2011-10-18 8:58 ` vries at gcc dot gnu.org
` (10 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2011-10-10 20:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #10 from vries at gcc dot gnu.org 2011-10-10 20:14:53 UTC ---
Created attachment 25458
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25458
tentative patch
Currently testing attached patch on x86_64.
2011-10-10 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/50672
* tree-into-ssa.c (maybe_replace_use): Do SET_USE for unlinked use_p.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (11 preceding siblings ...)
2011-10-10 20:18 ` vries at gcc dot gnu.org
@ 2011-10-18 8:58 ` vries at gcc dot gnu.org
2011-10-18 11:15 ` vries at gcc dot gnu.org
` (9 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2011-10-18 8:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #11 from vries at gcc dot gnu.org 2011-10-18 08:57:43 UTC ---
Author: vries
Date: Tue Oct 18 08:57:39 2011
New Revision: 180126
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180126
Log:
2011-10-18 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/50672
* tree-ssa-dce.c (mark_virtual_operand_for_renaming): New function,
factored out of ...
(mark_virtual_phi_result_for_renaming): Use
mark_virtual_operand_for_renaming.
* tree-flow.h (mark_virtual_operand_for_renaming): Declare.
* tree-ssa-tail-merge.c (release_last_vdef): New function.
(purge_bbs): Add update_vops parameter. Call release_last_vdef for each
deleted basic block.
(tail_merge_optimize): Add argument to call to purge_bbs.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-flow.h
trunk/gcc/tree-ssa-dce.c
trunk/gcc/tree-ssa-tail-merge.c
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (12 preceding siblings ...)
2011-10-18 8:58 ` vries at gcc dot gnu.org
@ 2011-10-18 11:15 ` vries at gcc dot gnu.org
2011-11-02 16:31 ` vries at gcc dot gnu.org
` (8 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2011-10-18 11:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
vries at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #12 from vries at gcc dot gnu.org 2011-10-18 11:14:35 UTC ---
patch checked in, marking fixed.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (13 preceding siblings ...)
2011-10-18 11:15 ` vries at gcc dot gnu.org
@ 2011-11-02 16:31 ` vries at gcc dot gnu.org
2012-08-01 19:35 ` dcb314 at hotmail dot com
` (7 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2011-11-02 16:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #13 from vries at gcc dot gnu.org 2011-11-02 16:30:03 UTC ---
Author: vries
Date: Wed Nov 2 16:29:50 2011
New Revision: 180779
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180779
Log:
2011-11-02 Tom de Vries <tom@codesourcery.com>
PR tree-optimization/50672
* g++.dg/pr50672.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/pr50672.C
Modified:
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (14 preceding siblings ...)
2011-11-02 16:31 ` vries at gcc dot gnu.org
@ 2012-08-01 19:35 ` dcb314 at hotmail dot com
2012-08-01 20:11 ` markus at trippelsdorf dot de
` (6 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: dcb314 at hotmail dot com @ 2012-08-01 19:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
--- Comment #14 from David Binderman <dcb314 at hotmail dot com> 2012-08-01 19:35:27 UTC ---
This seems to have broken again with 4.8 trunk, dated 20120801.
It seemed ok about a week ago, so probably some recent breakage.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (15 preceding siblings ...)
2012-08-01 19:35 ` dcb314 at hotmail dot com
@ 2012-08-01 20:11 ` markus at trippelsdorf dot de
2012-08-01 21:20 ` vries at gcc dot gnu.org
` (5 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: markus at trippelsdorf dot de @ 2012-08-01 20:11 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #15 from Markus Trippelsdorf <markus at trippelsdorf dot de> 2012-08-01 20:11:15 UTC ---
markus@x4 tmp % cat test.ii
struct A
{
bool isHint();
};
class B
{
void makeLine( int *) const;
void drawLine() const; A* to() const;
void _print() const;
};
A a;
void B::makeLine(int *p1) const
{
if (a.isHint() && to()->isHint()) ;
else {
if (p1) B::drawLine(); else B::_print();
return;
}
if (p1) B::drawLine(); else B::_print();
}
markus@x4 tmp % gdb g++
Reading symbols from /usr/bin/g++...(no debugging symbols found)...done.
(gdb) run -c -O2 test.ii
Starting program: /usr/bin/g++ -c -O2 test.ii
process 7858 is executing new program:
/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.0/g++
[New process 7861]
process 7861 is executing new program:
/usr/libexec/gcc/x86_64-pc-linux-gnu/4.8.0/cc1plus
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 7861]
walk_aliased_vdefs_1 (ref=ref@entry=0x0, vdef=0x7ffff73f4870, walker=0x896fe0
<mark_all_reaching_defs_necessary_1>, data=0x0, visited=0x101e040,
cnt=0) at ../../gcc/gcc/tree-ssa-alias.c:2182
2182 if (gimple_nop_p (def_stmt))
(gdb) bt
#0 walk_aliased_vdefs_1 (ref=ref@entry=0x0, vdef=0x7ffff73f4870,
walker=0x896fe0 <mark_all_reaching_defs_necessary_1>, data=0x0,
visited=0x101e040, cnt=0) at ../../gcc/gcc/tree-ssa-alias.c:2182
#1 0x000000000088ce8e in walk_aliased_vdefs (ref=ref@entry=0x0,
vdef=<optimized out>,
walker=walker@entry=0x896fe0 <mark_all_reaching_defs_necessary_1>,
data=data@entry=0x0, visited=visited@entry=0x101e040)
at ../../gcc/gcc/tree-ssa-alias.c:2217
#2 0x0000000000896e25 in mark_all_reaching_defs_necessary
(stmt=stmt@entry=0x7ffff73e5e40) at ../../gcc/gcc/tree-ssa-dce.c:664
#3 0x0000000000898a44 in propagate_necessity (el=el@entry=0x10ea0e0) at
../../gcc/gcc/tree-ssa-dce.c:909
...
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (16 preceding siblings ...)
2012-08-01 20:11 ` markus at trippelsdorf dot de
@ 2012-08-01 21:20 ` vries at gcc dot gnu.org
2012-08-01 23:15 ` vries at gcc dot gnu.org
` (4 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2012-08-01 21:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #16 from vries at gcc dot gnu.org 2012-08-01 21:19:36 UTC ---
With the example from comment 15 and r190039, I don't see a segmentation fault,
but this:
...
$ g++ test.C -O2
test.C: In member function ‘void B::makeLine(int*) const’:
test.C:12:7: error: no immediate_use list
void B::makeLine(int *p1) const
^
for SSA_NAME: .MEM_20 in statement:
# .MEM_13 = VDEF <.MEM_20>
B::drawLine (this_7(D));
test.C:12:7: internal compiler error: verify_ssa failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
...
The example passes with -fno-tree-tail-merge.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (17 preceding siblings ...)
2012-08-01 21:20 ` vries at gcc dot gnu.org
@ 2012-08-01 23:15 ` vries at gcc dot gnu.org
2012-08-02 8:05 ` [Bug tree-optimization/50672] [4.7/4.8 " rguenth at gcc dot gnu.org
` (3 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: vries at gcc dot gnu.org @ 2012-08-01 23:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #17 from vries at gcc dot gnu.org 2012-08-01 23:14:36 UTC ---
The test-case from comment 15 passes with r190033, and fails with r190034.
block 10 contains:
...
# .MEMD.2233_20 = PHI <.MEMD.2233_5(11), .MEMD.2233_10(12)>
...
and is replaced by block 9 by tail-merge.
Quoted from http://gcc.gnu.org/ml/gcc-patches/2011-10/msg00977.html:
...
Whoever unlinks the vuse (by removing its definition) has to replace it with
something valid, which is either the bare symbol .MEM, or the VUSE associated
with the removed VDEF (thus, as unlink_stmt_vdef does).
...
So the def of _20 is removed, and it's uses need to be handled. That is done
by release_last_vdef which was part of the fix for this bug, and is removed in
r190034.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7/4.8 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (18 preceding siblings ...)
2012-08-01 23:15 ` vries at gcc dot gnu.org
@ 2012-08-02 8:05 ` rguenth at gcc dot gnu.org
2012-08-02 9:43 ` rguenth at gcc dot gnu.org
` (2 subsequent siblings)
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-02 8:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |ASSIGNED
AssignedTo|tom at codesourcery dot com |rguenth at gcc dot gnu.org
Summary|[4.7 Regression] ice: |[4.7/4.8 Regression] ice:
|verify_ssa failed: no |verify_ssa failed: no
|immediate_use list |immediate_use list
--- Comment #18 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-02 08:05:05 UTC ---
Let me look into this some more - I removed the code because we later
mark all virtual operands for renaming anyway, so it seemed redundant. But
yes,
releasing an SSA name and keeping released names in the IL is not going to
work. The original testcase still passes though.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7/4.8 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (19 preceding siblings ...)
2012-08-02 8:05 ` [Bug tree-optimization/50672] [4.7/4.8 " rguenth at gcc dot gnu.org
@ 2012-08-02 9:43 ` rguenth at gcc dot gnu.org
2012-08-02 9:44 ` rguenth at gcc dot gnu.org
2012-08-02 9:44 ` rguenth at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-02 9:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
--- Comment #19 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-02 09:43:19 UTC ---
Author: rguenth
Date: Thu Aug 2 09:43:14 2012
New Revision: 190070
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190070
Log:
2012-08-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50672
Revert
2012-08-01 Richard Guenther <rguenther@suse.de>
* tree-ssa-tail-merge.c (release_last_vdef): Remove.
(replace_block_by): Adjust.
* g++.dg/torture/pr50672.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr50672.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-tail-merge.c
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7/4.8 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (20 preceding siblings ...)
2012-08-02 9:43 ` rguenth at gcc dot gnu.org
@ 2012-08-02 9:44 ` rguenth at gcc dot gnu.org
2012-08-02 9:44 ` rguenth at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-02 9:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #19 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-02 09:43:19 UTC ---
Author: rguenth
Date: Thu Aug 2 09:43:14 2012
New Revision: 190070
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190070
Log:
2012-08-02 Richard Guenther <rguenther@suse.de>
PR tree-optimization/50672
Revert
2012-08-01 Richard Guenther <rguenther@suse.de>
* tree-ssa-tail-merge.c (release_last_vdef): Remove.
(replace_block_by): Adjust.
* g++.dg/torture/pr50672.C: New testcase.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr50672.C
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-tail-merge.c
--- Comment #20 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-02 09:43:48 UTC ---
Fixed again.
^ permalink raw reply [flat|nested] 24+ messages in thread
* [Bug tree-optimization/50672] [4.7/4.8 Regression] ice: verify_ssa failed: no immediate_use list
2011-10-09 10:01 [Bug c++/50672] New: ice: verify_ssa failed: no immediate_use list dcb314 at hotmail dot com
` (21 preceding siblings ...)
2012-08-02 9:44 ` rguenth at gcc dot gnu.org
@ 2012-08-02 9:44 ` rguenth at gcc dot gnu.org
22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-08-02 9:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50672
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #20 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-08-02 09:43:48 UTC ---
Fixed again.
^ permalink raw reply [flat|nested] 24+ messages in thread