[EMAIL PROTECTED]:~ % cat dingens.cc
#include <iostream>

template<class T> class A {
public:
    size_t operator()(const T& o) {
        if (sizeof(T)==sizeof(size_t))
            return (const size_t) o;
        else
            return 42;
    }
};

struct B { unsigned int n; };

int main() {
    A<B> hash;

    std::cout << hash(B()) << std::endl;
    return 0;
}

[EMAIL PROTECTED]:~ % g++-4.2 -o dingens dingens.cc
g++-4.2: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions, see
<URL:file:///usr/share/doc/gcc-4.2/README.Bugs>.


-- 
           Summary: g++-4.2: Internal error: Segmentation fault (program
                    cc1plus)
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bumens at dingens dot org
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33051

Reply via email to