| Summary: | [3.4 Regression] ICE (on invalid) in get_innermost_template_args | ||
|---|---|---|---|
| Product: | gcc | Reporter: | Jakub Jelinek <jakub> |
| Component: | c++ | Assignee: | Alexandre Oliva <aoliva> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | gcc-bugs, reichelt |
| Priority: | P2 | Keywords: | accepts-invalid, ice-on-invalid-code, monitored, patch |
| Version: | 4.0.0 | ||
| Target Milestone: | 3.4.4 | ||
| Host: | Target: | ||
| Build: | Known to work: | 4.0.0 | |
| Known to fail: | Last reconfirmed: | 2004-12-01 15:20:50 | |
When compiling: struct S { typedef void *P; }; namespace M { typedef void *P; }; namespace N { class S; struct N { template <typename T> void foo (typename T::P); }; struct R { N& n; template <class U, class T> inline void bar (U p); void baz (M::P); }; template <class U, class T> inline void R::bar (U p) { n.foo <typename T> (p); delete this; } void R::baz (M::P p) { bar <M::P, S>(p); } } I get: 141300.ii: In member function `void N::R::bar(U) [with U = void*, T = N::S]': 141300.ii:36: instantiated from here 141300.ii:30: internal compiler error: tree check: expected tree_vec, have error_mark in get_innermost_template_args, at cp/pt.c:575 with checking enabled and usually segfault with checking disabled, in both GCC 3.4.x and 4.0.0. explicit_targs passed down from build_new_method_call is error_mark.