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]
Other format: [Raw text]

c++/7112: Regression: ICE on C++ code involving templates and sizeof


>Number:         7112
>Category:       c++
>Synopsis:       Regression: ICE on C++ code involving templates and sizeof
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 24 17:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     M.E. O'Neill
>Release:        3.1
>Organization:
Computer Science Dept, Harvey Mudd College
>Environment:
System: SunOS turing 5.7 Generic_106541-20 sun4u sparc SUNW,Ultra-Enterprise
Architecture: sun4
host: sparc-sun-solaris2.7
build: sparc-sun-solaris2.7
target: sparc-sun-solaris2.7
configured with: ../gcc-3.1/configure --prefix /home/oneill/gcc

>Description:

Compiler ICEs on Legal (if somewhat twisted) C++ code.  The test-case
ICEs on all platforms tried (i386-redhat-linux, powerpc-apple-darwin5.5,
and sparc-sun-solaris2.7), and on versions 3.0.x, 3.1 and the 20020624
3.1.1 prerelease, although it was derived from code that only ICEd on
powerpc-apple-darwin5.5.

Problem does not occur with Red Hat's 2.96RH version or the 2.95.x series.
>How-To-Repeat:
Compile the following code:

template<int size>
struct Foobar {
    // Contents irrelevant
};

template <typename A>
struct Wrapper {
    // Contents irrelevant
};

template <typename A>
Foobar<sizeof(Wrapper<A>)> *
compiler_bug (A)
{
    return 0;
}

int main()
{
    compiler_bug(1);
}

>Fix:
Unknown.
>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]