From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22827 invoked by alias); 17 Mar 2013 04:45:06 -0000 Received: (qmail 22654 invoked by uid 48); 17 Mar 2013 04:44:39 -0000 From: "markus at trippelsdorf dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/56635] [4.8 regression] internal compiler error: in find_lattice_value, at tree-complex.c:15 Date: Sun, 17 Mar 2013 04:45:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: markus at trippelsdorf dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-03/txt/msg01230.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D56635 Markus Trippelsdorf changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |markus at trippelsdorf dot | |de --- Comment #3 from Markus Trippelsdorf 201= 3-03-17 04:44:38 UTC --- markus@x4 tmp % cat test.ii templatestruct A; templateA<_Tp>operator/(A<_Tp>, A<_Tp>& p2) { A<_Tp> a; a /=3D p2; return a; } templatebool operator!=3D(A<_Tp>& p1, A<_Tp>&) { return p1.real(); } template<>struct A { double& real() { return __real__ _M_value; } templatevoid operator/=3D(A<_Tp>&) { _M_value /=3D 10; } _Complex double _M_value; }; templateclass B { T *buf; public: B(int, bool); T& operator[](int) { return buf[0]; } }; struct C { C(const int&); typedef ATy; typedef B DataT; Azero; enum InitType { NOZERO }; virtual C* DivInv(C *); }; templateclass D : Sp { typedef typename Sp::Ty Ty; typedef typename Sp::DataT DataT; DataT dd; public: D(const int&, C::InitType); Ty& operator[](int) { return dd[0]; } D* DivInv(C *); }; templateD *D::DivInv(C *) { if ((*this)[0] !=3D this->zero) (*this)[0] =3D (*static_cast(0))[0] / (*this)[0]; else (*this)[0] =3D (*static_cast(0))[0]; return 0; } D *b =3D new D(0, C::NOZERO); templateD::D(const int&, C::InitType) : Sp(0), dd(0, 0) {} markus@x4 tmp % c++ -Wextra -Wall -c -O3 test.ii test.ii: In member function =E2=80=98D* D::DivInv(C*) [with Sp =3D = C]=E2=80=99: test.ii:67:26: internal compiler error: in find_lattice_value, at tree-complex.c:151 templateD *D::DivInv(C *) ^