This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Oct 2005 12:19:43 -0000
- Subject: [Bug middle-end/24362] [4.0/4.1 Regression] internal compiler error: in extract_component, at tree-complex.c:68
- References: <bug-24362-7585@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from pinskia at gcc dot gnu dot org 2005-10-14 12:19 -------
Reduced testcase for 4.0 at -O0 and 4.1 at -O1:
typedef unsigned int size_t;
typedef __complex__ double cdouble;
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();
const elt_t *pointer() const;
};
template <typename t> inline t min(t a, t b) {
}
template<typename elt_t> class Tensor : public Vector<elt_t> {
public: typedef Vector<elt_t> vector;
size_t columns(void) const;
size_t rows(void) const;
};
cdouble trace(const Tensor<cdouble> &t) {
const size_t r = t.rows();
const size_t c = t.columns();
cdouble output = t.elt_zero();
const cdouble *data = t.pointer();
for (size_t i = 0, j = min(r,c);
j--;
i += (r+1)) {
output += data[i];
}
return output;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24362