Take the following C++ code: typedef __complex__ double cdouble; inline cdouble to_complex(const double &r, const double &i = 0.0) { cdouble z; __real__ z = r; return z; } template<class value_type, bool simple_copy = true, bool atomic = true> class RefPointer { }; template<typename elt_t> class Vector : public RefPointer<elt_t> { public: typedef elt_t number; static elt_t elt_zero(); }; template <typename t> inline t min(t a, t b) { } template<> inline cdouble Vector<cdouble>::elt_zero() { return to_complex(0.0); } template<typename elt_t> class Tensor : public Vector<elt_t> { }; cdouble trace(const Tensor<cdouble> &t) { cdouble output = t.elt_zero(); } --- Compile at -O1, we get: t.cc: In function double __complex__ trace(const Tensor<double __complex__>&): t.cc:20: error: statement makes a memory store, but has no V_MAY_DEFS nor V_MUST_DEFS REALPART_EXPR <D.1799_14> = D.1803_7; t.cc:20: internal compiler error: verify_ssa failed Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions.
-- Summary: [4.1 Regression] Product: gcc Version: 4.1.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: critical Priority: P2 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pinskia at gcc dot gnu dot org GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24365