This is the mail archive of the gcc-bugs@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]

c++/2807: problem with __complex__ in std::complex<double> specialization



>Number:         2807
>Category:       c++
>Synopsis:       problem with __complex__ in std::complex<double> specialization
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Sat May 12 04:16:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Frederik Schaffalitzky
>Release:        gcc version 3.0 20010512 (prerelease)
>Organization:
>Environment:
Linux shadow.robots.ox.ac.uk 2.2.17 #4 SMP Tue Feb 20 13:28:13 GMT 2001 i686 unknown

Reading specs from /data/az5/fsm/GCC3.0/install/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../gcc/configure --prefix=/homes/az2/fsm/GCC3.0/install --srcdir=/homes/az2/fsm/GCC3.0/gcc --enable-shared --with-shared
Thread model: single
gcc version 3.0 20010512 (prerelease)
>Description:
The compiler segfaults when compiling the following file
with "-g -finline-functions". Note that the __complex__
construct is used in <complex> on my platform.

#if 0
namespace std {
  template<typename _Tp>
  struct complex;
  
  template<>
  struct complex<double>
  {
    typedef __complex__ double _ComplexT;
    _ComplexT _M_value;
  };
}
#else
# include <complex>
#endif

template <typename T>
struct X
{
  X (X<T> const &, T);
};

template <typename T>
X<T>::X (X<T> const &, T s)
{
}

template class X<std::complex<double> >;
>How-To-Repeat:
g++ -g -finline-function f.cxx
>Fix:
Don't know.
Hint: the problem goes away if -g or -finline-functions
is omitted or if the parameter "s" to X<T>::X() is omitted.
>Release-Note:
>Audit-Trail:
>Unformatted:


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