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++/11071] New: [3.4 regression] ICE in regenerate_decl_from_template after forgotten template for disambiguation, part 2


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

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

           Summary: [3.4 regression] ICE in regenerate_decl_from_template
                    after forgotten template for disambiguation, part 2
           Product: gcc
           Version: 3.4
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P1
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: bangerth@dealii.org
                CC: gcc-bugs@gcc.gnu.org
OtherBugsDependingO 11070
             nThis:

[This is a variation of 11070, but this time it's really worse. When
this one is fixed, this probably also fixes 11070, please check!]

This ICEs with present mainline while it compiles fine with 3.3:
-----------------------------------
template <bool b> struct X {
    template <typename T>
    static int* execute(T* x) { return x; }
};

template <typename T> void foo() {
  static bool const same = true;
  X<same>::execute ((int*)0);
}

template void foo<int> ();
------------------------------------

g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc

g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c y.cc
y.cc: In static member function `static int* X::execute(T*)':
y.cc:3:   instantiated from `static int* X<b>::execute(T*) [with T = int, bool b
= same]'
y.cc:8:   instantiated from `void foo() [with T = int]'
y.cc:11:   instantiated from here
y.cc:3: internal compiler error: in regenerate_decl_from_template, at cp/pt.c:
   10691
Please submit a full bug report,

Note that in comparison to 11070, this time the template
parameter is actually deduced implicitly. Thus, it is
not specified explicitly after "execute" and IMHO we
shouldn't require "template" for disambiguation, right?

Whatever the matter, adding "template" doesn't help here,
we get the same crash in any case. This is really bad :-(

I mark this bug as blocking 11070, which in turn is related to 10922.

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]