[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-06 Thread jakub at gcc dot gnu dot org


--- Comment #6 from jakub at gcc dot gnu dot org  2009-03-06 12:48 ---
The problem is that mark_all_vars_used only marks blocks used by actual code,
but on the testcase the only reference to a one BLOCK is from TYPE_MAX_VALUE
(TYPE_DOMAIN (type)) containing a PLUS_EXPR with that BLOCK as TREE_BLOCK.

IMHO either we need to talk also types in
remove_unused_locals/mark_all_vars_used, or we should drop TREE_BLOCK stuff
from expressions referenced from types during gimplification (do we actually
ever care about TREE_BLOCK of expressions in TYPE_{MIN,MAX}_VALUE,
TYPE_SIZE{,_UNIT}, DECL_SIZE{,_UNIT} etc.?), or during inlining we should just
ignore remapping of blocks for these expressions.  If a BLOCK isn't found for
them, no big deal, just drop it.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-06 Thread rguenth at gcc dot gnu dot org


--- Comment #7 from rguenth at gcc dot gnu dot org  2009-03-06 12:58 ---
Yeah, we should drop TREE_BLOCK from anything not in stmts.  Definitely for
expressions in the types sizes and domains.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-04 Thread rguenth at gcc dot gnu dot org


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu dot
   ||org
  Component|c++ |tree-optimization
   Keywords||ice-on-valid-code
Summary|ICE at tree-inline.c:1042   |[4.4 Regression] ICE at
   |with -O |tree-inline.c:1042 with -O
   Target Milestone|--- |4.4.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-04 Thread rguenth at gcc dot gnu dot org


--- Comment #2 from rguenth at gcc dot gnu dot org  2009-03-04 21:20 ---
Reducing.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-04 Thread rguenth at gcc dot gnu dot org


--- Comment #3 from rguenth at gcc dot gnu dot org  2009-03-04 22:08 ---
Reduced testcase:

class QScriptEnginePrivate;
class QScriptClassInfo;
namespace QScript {
enum Type { InvalidType };
};
class QScriptValueImpl {
public:
inline QScriptValueImpl();
QScript::Type m_type;
};
namespace QScript {
namespace Ecma {
class Core {
public:
inline QScriptEnginePrivate *engine() const { }
inline QScriptClassInfo *classInfo() const { }
QScriptValueImpl publicPrototype;
};
class Boolean: public Core {
void newBoolean(QScriptValueImpl *result, bool value = false);
};
}
template typename T class Buffer {
public:
inline void reserve(int num);
inline void resize(int s);
T *m_data;
int m_capacity;
int m_size;
};
}
template typename T void QScript::BufferT::resize(int s) {
if (m_capacity  s)
  reserve (s  1);
}
template typename T void QScript::BufferT::reserve(int x) {
T *new_data = new T[m_capacity];
for (int i=0; im_size; ++i)
  new_data[i] = m_data[i];
}
class QScriptObject {
public:
inline void reset();
QScript::BufferQScriptValueImpl m_values;
};
class QScriptEnginePrivate {
public:
inline QScriptObject *allocObject();
inline void newObject(QScriptValueImpl *o, const QScriptValueImpl proto,
  QScriptClassInfo *oc = 0);
};
inline void QScriptEnginePrivate::newObject(QScriptValueImpl *o,
const QScriptValueImpl proto,
QScriptClassInfo *oc)
{
  QScriptObject *od = allocObject();
  od-reset();
}
inline QScriptValueImpl::QScriptValueImpl() : m_type(QScript::InvalidType) { }
inline void QScriptObject::reset() { m_values.resize(0); }
namespace QScript {
namespace Ecma {
void Boolean::newBoolean(QScriptValueImpl *result, bool value)
  {
engine()-newObject(result, publicPrototype, classInfo());
  }
}
}


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   Last reconfirmed|-00-00 00:00:00 |2009-03-04 22:08:34
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-04 Thread hjl dot tools at gmail dot com


--- Comment #4 from hjl dot tools at gmail dot com  2009-03-05 00:12 ---
This is caused by revision 144529.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367



[Bug tree-optimization/39367] [4.4 Regression] ICE at tree-inline.c:1042 with -O

2009-03-04 Thread hjl dot tools at gmail dot com


--- Comment #5 from hjl dot tools at gmail dot com  2009-03-05 06:04 ---
*** Bug 39377 has been marked as a duplicate of this bug. ***


-- 

hjl dot tools at gmail dot com changed:

   What|Removed |Added

 CC||dirtyepic at gentoo dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39367