]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/10119 (tree-checking ICE in dump_expr)
authorNathan Sidwell <nathan@codesourcery.com>
Mon, 24 Mar 2003 19:41:10 +0000 (19:41 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Mon, 24 Mar 2003 19:41:10 +0000 (19:41 +0000)
cp:
PR c++/10119
* error.c (dump_expr) [BASELINK]: Use dump_expr.
* pt.c (maybe_fold_nontype_args): New function.
(tsubst_copy) [SCOPE_REF]: Subst any template_id args.
[TEMPLATE_ID_EXPR]: Break out folding code, call it.
(tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Call
maybe_fold_nontype_args.
testsuite:
PR c++/10119
* g++.dg/template/ptrmem5.C: New test.

From-SVN: r64814

gcc/cp/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/template/ptrmem5.C [new file with mode: 0644]

index 5ffb1440a5f477dd22301c2aa9a9d07349750075..8cc29882ab90c1c93b794177e9ef3596f354d7ca 100644 (file)
@@ -1,3 +1,13 @@
+2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
+
+       PR c++/10119
+       * error.c (dump_expr) [BASELINK]: Use dump_expr.
+       * pt.c (maybe_fold_nontype_args): New function.
+       (tsubst_copy) [SCOPE_REF]: Subst any template_id args.
+       [TEMPLATE_ID_EXPR]: Break out folding code, call it.
+       (tsubst_copy_and_build) [TEMPLATE_ID_EXPR]: Call
+       maybe_fold_nontype_args.
+
 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/10026
index a402ba0619391304b0d23d7fbf7de950ae691043..a5f853a4e280f5ee82a01fe660f8454fb1c7a6e0 100644 (file)
@@ -1,5 +1,8 @@
 2003-03-24  Nathan Sidwell  <nathan@codesourcery.com>
 
+       PR c++/10119
+       * g++.dg/template/ptrmem5.C: New test.
+
        PR c++/10026
        * g++.dg/lookup/koenig1.C: New test.
 
diff --git a/gcc/testsuite/g++.dg/template/ptrmem5.C b/gcc/testsuite/g++.dg/template/ptrmem5.C
new file mode 100644 (file)
index 0000000..50a7e77
--- /dev/null
@@ -0,0 +1,25 @@
+// { dg-do compile }
+
+// Copyright (C) 2003 Free Software Foundation, Inc.
+// Contributed by Nathan Sidwell 24 Mar 2003 <nathan@codesourcery.com>
+
+// PR 10119 (part). We failed to tsubst the args of a template-id-expr
+
+template <class T, void (T::* const U)()> struct Good
+{
+  static int const value = 0;
+};
+
+struct A
+{
+  template <typename U> void good ()
+  {
+    int s_id = Good<A, &A::good<U> >::value;
+  }
+};
+
+
+int main()
+{
+  A().good<int>();
+}