This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5493: G++ 3.0.2 segmentation fault
- From: rodrigc at gcc dot gnu dot org
- To: despriee at free dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mathieu dot despriee at transatel dot com, nobody at gcc dot gnu dot org
- Date: 27 Jan 2002 19:44:38 -0000
- Subject: Re: c++/5493: G++ 3.0.2 segmentation fault
- Reply-to: rodrigc at gcc dot gnu dot org, despriee at free dot fr, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mathieu dot despriee at transatel dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: G++ 3.0.2 segmentation fault
State-Changed-From-To: open->closed
State-Changed-By: rodrigc
State-Changed-When: Sun Jan 27 11:44:38 2002
State-Changed-Why:
The error message produced said to contact qa.mandrakesoft.com.
Did you do that?
I could reproduce your problem with the FSF version of gcc 3.0.3.
With FSF version of gcc 3.1 in CVS, I did not get a compiler
seg fault, but got the following errors:
==============================================================
In file included from ESmsV2Crypto.h:5,
from testage.c++:36:
BinaryArray.h: In constructor `BinaryArray<maxSize>::BinaryArray()':
BinaryArray.h:71: class `BinaryArray<maxSize>' does not have any field named `
template<class _Tp> class std::valarray'
BinaryArray.h: In constructor `BinaryArray<maxSize>::BinaryArray(const char*)':
BinaryArray.h:77: class `BinaryArray<maxSize>' does not have any field named `
template<class _Tp> class std::valarray'
BinaryArray.h: In copy constructor `BinaryArray<maxSize>::BinaryArray(const
BinaryArray<maxSize>&)':
BinaryArray.h:86: class `BinaryArray<maxSize>' does not have any field named `
template<class _Tp> class std::valarray'
In file included from testage.c++:36:
ESmsV2Crypto.h: At global scope:
ESmsV2Crypto.h:20: `ESmsV2' was not declared in this scope
ESmsV2Crypto.h:20: parse error before `)' token
=====================================================================
The following fixes your code, and compiles
with gcc 3.0.3 and gcc 3.1 in CVS:
===========================================================
--- old.ii Sun Jan 27 14:42:01 2002
+++ preprocessed.source.ii Sun Jan 27 14:37:05 2002
@@ -37952,13 +37952,13 @@
template <uint maxSize>
inline
BinaryArray<maxSize>::BinaryArray() :
- std::valarray(0, maxSize)
+ std::valarray<uchar>(maxSize)
{ }
template <uint maxSize>
inline
BinaryArray<maxSize>::BinaryArray(const char* array) :
- std::valarray(maxSize)
+ std::valarray<uchar>(array, maxSize)
{
for(uint i=0; i<maxSize; i++)
(*this)[i] = array[i];
@@ -37967,7 +37967,7 @@
template <uint maxSize>
inline
BinaryArray<maxSize>::BinaryArray(const BinaryArray<maxSize>& right)
:
- std::valarray(right)
+ std::valarray<uchar>(right, maxsize)
{ }
template <uint maxSize>
@@ -38068,7 +38068,7 @@
{
public:
static KappKey getKappKey(uint kappKeyId);
- static void compute(ESmsV2*);
+ static void compute(ESmsV2Crypto*);
private:
static void decryptKey(KappKey&);
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5493