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++/14355] New: [3.4/3.5 Regression] ICE in cxx_incomplete_type_diagnostic


This came out of PR 14337: this legal piece of code 
------------------ 
template <bool> struct Constraint { typedef int Result; }; 
 
template <typename T> struct IsInt; 
template <> struct IsInt<int> { static const bool value = true; }; 
 
template <typename T> 
typename Constraint<IsInt<T>::value>::Result foo(T); 
 
template <typename> 
void bar() { 
    foo(1); 
} 
 
template void bar<int> (); 
--------------------- 
ICEs mainline and 3.4, but compiles fine with 3.3.4-pre: 
 
g/x> /home/bangerth/bin/gcc-3.3.4-pre/bin/c++ -c x.cc 
g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc 
x.cc: In function `void bar() [with <template-parameter-1-1> = int]': 
x.cc:14:   instantiated from here 
x.cc:11: internal compiler error: in cxx_incomplete_type_diagnostic, at cp/
typeck2.c:273 
Please submit a full bug report, 
 
I presume that the reason it actually gets to the place of the ICE is 
tied to the fact that it doesn't get the thing in PR 14337 right, but 
even then it shouldn't ICE. So there are two distinct problems, although 
one of the problem may be necessary to trigger the other. 
 
Giovanni, didn't you recently work on incomplete types? Maybe you have an 
idea in this field... 
 
W.

-- 
           Summary: [3.4/3.5 Regression] ICE in
                    cxx_incomplete_type_diagnostic
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org,giovannibajo at gcc dot
                    gnu dot org


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


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