]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR ada/65319 (FAIL: g++.dg/other/dump-ada-spec-3.C -std=gnu++98 (internal compile...
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 5 Mar 2015 13:55:43 +0000 (13:55 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 5 Mar 2015 13:55:43 +0000 (13:55 +0000)
PR ada/65319
* c-ada-spec.c (print_destructor): Remove obsolete code.

From-SVN: r221214

gcc/c-family/ChangeLog
gcc/c-family/c-ada-spec.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/other/dump-ada-spec-3.C [new file with mode: 0644]

index 76cf06a2ab2eb4103e841919a90aa7691b210752..003eeeb6e8f68a95da33dea73619b9f002dd7517 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR ada/65319
+       * c-ada-spec.c (print_destructor): Remove obsolete code.
+
 2015-02-11  Jakub Jelinek  <jakub@redhat.com>
 
        Backported from mainline
index fc21b629aaae63eba15421fdb97a6c2b8b64ca42..22027797c654cea75839f6aaf9784b59f4ca71fb 100644 (file)
@@ -2538,18 +2538,9 @@ static void
 print_destructor (pretty_printer *buffer, tree t)
 {
   tree decl_name = DECL_NAME (DECL_ORIGIN (t));
-  const char *s = IDENTIFIER_POINTER (decl_name);
 
-  if (*s == '_')
-    {
-      for (s += 2; *s != ' '; s++)
-       pp_character (buffer, *s);
-    }
-  else
-    {
-      pp_string (buffer, "Delete_");
-      pp_ada_tree_identifier (buffer, decl_name, t, false);
-    }
+  pp_string (buffer, "Delete_");
+  pp_ada_tree_identifier (buffer, decl_name, t, false);
 }
 
 /* Return the name of type T.  */
index 8ad53a3f44046cf43b17afa8d27bcc46081f3dd6..8169c0cda466e6bd582f2cebdf5b6bc1437e791c 100644 (file)
@@ -1,3 +1,7 @@
+2015-03-05  Eric Botcazou  <ebotcazou@adacore.com>
+
+       * g++.dg/other/dump-ada-spec-3.C: New test.
+
 2015-03-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/g++.dg/other/dump-ada-spec-3.C b/gcc/testsuite/g++.dg/other/dump-ada-spec-3.C
new file mode 100644 (file)
index 0000000..3d5e3f1
--- /dev/null
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-ada-spec" } */
+
+#include <iostream>
+
+using namespace std;
+
+class Base {
+   public:
+     int My_V;
+     virtual void Primitive ();
+
+     Base ();
+};
+
+void Base::Primitive () {
+  cout << "C++ Primitive  " << this->My_V << "\n";
+}
+
+Base::Base () {
+}
+
+void Dispatch (Base * B) {
+  B->Primitive ();
+}
+
+/* { dg-final { cleanup-ada-spec } } */