]> gcc.gnu.org Git - gcc.git/commitdiff
re PR c++/24569 (ICE in add_AT_specification, at dwarf2out.c:4966)
authorMark Mitchell <mark@codesourcery.com>
Wed, 2 Nov 2005 18:30:26 +0000 (18:30 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Wed, 2 Nov 2005 18:30:26 +0000 (18:30 +0000)
PR c++/24569
* pt.c (instantiate_decl): Use cp_finish_decl, not
finish_static_data_member_decl.
PR c++/24569
* g++.dg/debug/static1.C: New test.

From-SVN: r106392

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/debug/static1.C [new file with mode: 0644]

index 8776b1f5b65777a5aa4895aebc83aaeaf9a241fd..410c88f05303de5e8b6b45119f8c50ef3a15a6b9 100644 (file)
@@ -1,3 +1,9 @@
+2005-11-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/24569
+       * pt.c (instantiate_decl): Use cp_finish_decl, not
+       finish_static_data_member_decl. 
+
 2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * decl.c (grokfndecl): Remove the setting
index 62db1229b214e058b8c1de275257ab5b0999e7e4..ecfc6d1573d85a1d01a41bc692e2c108599c76b4 100644 (file)
@@ -11630,10 +11630,9 @@ instantiate_decl (tree d, int defer_ok,
          init = tsubst_expr (DECL_INITIAL (code_pattern), 
                              args,
                              tf_error | tf_warning, NULL_TREE);
-         DECL_INITIAL (d) = NULL_TREE;
-         finish_static_data_member_decl (d, init, 
-                                         /*asmspec_tree=*/NULL_TREE,
-                                         LOOKUP_ONLYCONVERTING);
+         DECL_INITIAL (d) = init;
+         cp_finish_decl (d, init, /*asmspec_tree=*/NULL_TREE,
+                         LOOKUP_ONLYCONVERTING);
          pop_nested_class ();
          pop_nested_namespace (ns);
        }
index fd31f902287ba2707f850eeb0d30b4edbdaabb68..04a334264305409f29390c0f186e89288a4e4be0 100644 (file)
@@ -1,3 +1,8 @@
+2005-11-02  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/24569
+       * g++.dg/debug/static1.C: New test.
+
 2005-11-02  Josh Conner  <jconner@apple.com>
 
        * g++.dg/crash38.C: moved into proper directory...
diff --git a/gcc/testsuite/g++.dg/debug/static1.C b/gcc/testsuite/g++.dg/debug/static1.C
new file mode 100644 (file)
index 0000000..7419ce5
--- /dev/null
@@ -0,0 +1,16 @@
+// PR c++/24569
+
+template <int dim>
+struct S
+{
+  static const int u = 2 * dim;
+  static const int p[u];
+  static int f();
+};
+
+template <>
+inline int S<3>::f () { return 1; }
+
+template <int dim> const int S<dim>::u;
+
+template class S<3>;
This page took 0.09697 seconds and 5 git commands to generate.