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


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

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

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

(This is the ICE-on-mainline from 10992)

This ICEs on mainline:
--------------------------------
template <bool b> struct X {
    template <typename T>
    static int* execute(int* 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.4-pre/bin/c++ -c y.cc
y.cc: In static member function `static int* X::execute(int*)':
y.cc:3:   instantiated from `static int* X<b>::execute(int*) [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,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c y.cc
y.cc: In function `void foo()':
y.cc:8: error: parse error before `>' token


Thus, 3.3 gives the right clue: we're missing the "template" keyword
for disambiguation, but the ICE at an unrelated place is not
helpful in finding it.

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]