public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/2996: Internal compiler error on typecast (T[][]...)
@ 2001-05-29 12:46 tom
  0 siblings, 0 replies; only message in thread
From: tom @ 2001-05-29 12:46 UTC (permalink / raw)
  To: gcc-gnats

>Number:         2996
>Category:       c++
>Synopsis:       Internal compiler error on typecast (T[][]...)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Tue May 29 12:46:02 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Thomas Dietel
>Release:        "egcs-2.91.66", "gcc version 2.95.4 20010319 (Debian prerelease)" and "gcc version 2.96 20000731"
>Organization:
>Environment:
Redhat 6.2/7.0, and Debian(testing)
>Description:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
 /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66/cc1plus StArray.ii -quiet -version -o StArray.s
GNU C++ version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) (i386-redhat-linux) compiled by GNU C version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release).
StArray.cxx: In method `T StArray<T>::operator ()(int, int = 0, int = 0, int = 0, int = 0)':
StArray.cxx:20: Internal compiler error.
StArray.cxx:20: Please submit a full bug report to `egcs-bugs@egcs.cygnus.com'.
StArray.cxx:20: See <URL: http://egcs.cygnus.com/faq.html#bugreport > for details.
>How-To-Repeat:
Command line:
 g++ -v -save-temps -c -o StArray.o StArray.ii


.ii file:
# 1 "StArray.cxx"

# 1 "StArray.h" 1



template <class T>
class StArray
{
 public:
    StArray(int dim1, int dim2=1, int dim3=1, int dim4=1, int dim5=1);
    ~StArray();

    T operator() (int a1, int a2=0, int a3=0, int a4=0, int a5=0);

 private:
    T *****data;  

};




# 2 "StArray.cxx" 2


template <class T>
StArray<T>::StArray(int dim1, int dim2=1, int dim3=1, int dim4=1, int dim5=1)
{
    data = new T[dim1][dim2][dim3][dim4][dim5];
};

template <class T>
StArray<T>::~StArray()
{
    delete[] data;
}


template <class T>
T StArray<T>::operator() (int a1, int a2=0, int a3=0, int a4=0, int a5=0)
{
    return (T[dim1][dim2][dim3][dim4][dim5])data[a1][a2][a3][a4][a5];
}

>Fix:
None
>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-29 12:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29 12:46 c++/2996: Internal compiler error on typecast (T[][]...) tom

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).