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]

[Bug c++/11105] New: [3.3/3.4 regression of sorts] ICE in mangle_conv_op_name_for_type


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [3.3/3.4 regression of sorts] ICE in
                    mangle_conv_op_name_for_type
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: critical
          Priority: P1
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bangerth@dealii.org
                CC: gcc-bugs@gcc.gnu.org,mmitchel@gcc.gnu.org

[Mark, this is likely related to 8006 and 9729, which is why I CC: you]

This is an attempt to work around a problem in 11097, but with both
3.3 and mainline we either get an error for an ABI problem or, if
one specifies -fabi-version=0, an ICE (see below). The code compiled
with prior versions, although probably to bogus results. So it's
a regression-of-sorts, but the present state is clearly not very
desirable -- you can't compile the code even if the miscompilation
would not lead to problems in a given program.

So here's the testcase:
----------------------------------
template <typename T> struct S {
    struct I{};
    operator I* ();
};

template <typename T> struct S2 : S<T> {
    operator typename S<T>::I* ();
};

template struct S2<int>;
--------------------------------

g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc -fabi-version=1
x.cc:7: error: due to a defect in the G++ 3.2 ABI, G++ has assigned the same
   mangled name to two different types
g/x>
g/x>
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc -fabi-version=0
x.cc:7: internal compiler error: in mangle_conv_op_name_for_type, at
   cp/mangle.c:2653
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Results with 3.3 are the same.

W.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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