diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2003-09-05 08:38:44 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2003-09-05 08:38:44 +0000 |
commit | 12483c9f2e0c237977f2e2ee190492274f7f0d28 (patch) | |
tree | 0f5cce31b1086b96c55db1488aad78c82b94fc6c /gcc/cp/semantics.c | |
parent | 8e1daa341261864912c3b19c87c78babd4a80edf (diff) | |
download | gcc-12483c9f2e0c237977f2e2ee190492274f7f0d28.zip gcc-12483c9f2e0c237977f2e2ee190492274f7f0d28.tar.gz gcc-12483c9f2e0c237977f2e2ee190492274f7f0d28.tar.bz2 |
re PR c++/11922 (ICE on type_unification_real)
cp:
PR c++/11922
* pt.c (tsubst_qualified_id): Make sure we get a non-type.
(tsubst_expr, tsubst_copy_and_build): Pass false, not zero, as
is_type_p to lookup_qualified_name.
* semantics.c (finish_call_expr): Refactor some code.
testsuite:
PR c++/11922
* g++/dg/template/qualified-id1.C: New test.
From-SVN: r71109
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r-- | gcc/cp/semantics.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index d3191a9..d8ac60d9 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -1622,12 +1622,11 @@ finish_call_expr (tree fn, tree args, bool disallow_virtual, bool koenig_p) to refer to it. */ if (!BASELINK_P (fn) && is_overloaded_fn (fn)) { - tree f; + tree f = fn; - if (TREE_CODE (fn) == TEMPLATE_ID_EXPR) - f = get_first_fn (TREE_OPERAND (fn, 0)); - else - f = get_first_fn (fn); + if (TREE_CODE (f) == TEMPLATE_ID_EXPR) + f = TREE_OPERAND (f, 0); + f = get_first_fn (f); if (DECL_FUNCTION_MEMBER_P (f)) { tree type = currently_open_derived_class (DECL_CONTEXT (f)); |