This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

forwarded message from Gabriel Dos Reis



Below is the code I'm talking about.
------- start of forwarded message (RFC 934 encapsulation) -------
Return-Path: <owner-egcs-bugs@cygnus.com>
Message-Id: <199711202029.VAA01260@basson.dptmaths.ens-cachan.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Precedence: bulk
X-Filter: mailagent [version 3.0 PL44] for dosreis@piano.ens-cachan.fr
From: Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr>
Sender: owner-egcs-bugs@cygnus.com
To: egcs-bugs@cygnus.com
Cc: mmitchell@usa.net
Subject: [Internal compiler error] 
Date: Thu, 20 Nov 1997 21:29:53 +0100 (MET)


Hi !

consider:

% cat toto.C
#include <iterator>

template<size_t n, size_t i> struct PartialDotProduct {
    template<class T>
    static T Expand(T* a, T* b) { return T(); }
};

const int N = 10;

template<class In1, class In2>
typename iterator_traits<In1>::value_type
dot(In1 f1, In2 f2)
{
    return PartialDotProduct<N, 0>::Expand(f1, f2);	// line 14
}

int main()
{
    double a[N], b[N];

    double s = dot(&a[0], &b[0]);
}

% eg++ -c toto.C
toto.C: In function `typename iterator_traits<Iterator>::value_type dot(In1, In2)':
toto.C:14: Internal compiler error 243.
toto.C:14: Please submit a full bug report to `egcs-bugs@cygnus.com'.


	I didn't checked whether it worked with previous snapshots.

Best,

- -- Gaby
Gabriel Dos Reis                    | École Normale Supérieure de Cachan
INRIA, Unité de Recherche de        | Centre de Mathématiques et de Leurs
Sophia Antipolis                    |          Applications
Projet SAFIR                        |       Équipe de Géométrie 
------- end -------
-- 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]