On 6/21/19 1:47 PM, Jonathan Wakely wrote:
> On Fri, 21 Jun 2019 at 11:40, Martin Liška wrote:
>> Yes, I would be fine to deprecate that for GCC 10.1
> 
> Would it be appropriate to issue a warning in GCC 10.x if the option is used?

Sure. With the patch attached one will see:

$ gcc -frepo /tmp/main.cc -c
gcc: warning: switch ‘-frepo’ is no longer supported

I'm sending patch that also removes -frepo tests from test-suite.
I've been testing the patch.

Thanks,
Martin

> 
> I think in most cases the "fix" would be to simply remove the -frepo
> option from your makefiles (or other build system) and let the linker
> handle things. You'd get larger object files and slower links, but it
> should work.
> 

>From 103ae184e4f6cb5e11f3777845828e3677bc74b7 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Fri, 21 Jun 2019 13:39:23 +0200
Subject: [PATCH] Deprecate -frepo option.

gcc/ChangeLog:

2019-06-21  Martin Liska  <mli...@suse.cz>

	* doc/extend.texi: Remove -frepo from
	documentation.
	* doc/invoke.texi: Likewise.
	* doc/sourcebuild.texi: Likewise.

gcc/c-family/ChangeLog:

2019-06-21  Martin Liska  <mli...@suse.cz>

	* c.opt: Mark frepo deprecated.

gcc/testsuite/ChangeLog:

2019-06-21  Martin Liska  <mli...@suse.cz>

	* g++.dg/parse/repo1.C: Remove.
	* g++.dg/rtti/repo1.C: Remove.
	* g++.dg/template/repo1.C: Remove.
	* g++.dg/template/repo10.C: Remove.
	* g++.dg/template/repo11.C: Remove.
	* g++.dg/template/repo2.C: Remove.
	* g++.dg/template/repo3.C: Remove.
	* g++.dg/template/repo4.C: Remove.
	* g++.dg/template/repo5.C: Remove.
	* g++.dg/template/repo6.C: Remove.
	* g++.dg/template/repo7.C: Remove.
	* g++.dg/template/repo8.C: Remove.
	* g++.dg/template/repo9.C: Remove.
	* g++.old-deja/g++.pt/instantiate4.C: Remove.
	* g++.old-deja/g++.pt/instantiate6.C: Remove.
	* g++.old-deja/g++.pt/repo1.C: Remove.
	* g++.old-deja/g++.pt/repo2.C: Remove.
	* g++.old-deja/g++.pt/repo3.C: Remove.
	* g++.old-deja/g++.pt/repo4.C: Remove.
	* lib/g++.exp: Remove support for -frepo.
	* lib/gcc-dg.exp: Likewise.
	* lib/obj-c++.exp: Likewise.
---
 gcc/c-family/c.opt                            |  2 +-
 gcc/doc/extend.texi                           | 25 ----------
 gcc/doc/invoke.texi                           |  8 +--
 gcc/doc/sourcebuild.texi                      |  3 --
 gcc/testsuite/g++.dg/parse/repo1.C            | 10 ----
 gcc/testsuite/g++.dg/rtti/repo1.C             | 19 -------
 gcc/testsuite/g++.dg/template/repo1.C         | 20 --------
 gcc/testsuite/g++.dg/template/repo10.C        | 16 ------
 gcc/testsuite/g++.dg/template/repo11.C        | 31 ------------
 gcc/testsuite/g++.dg/template/repo2.C         | 18 -------
 gcc/testsuite/g++.dg/template/repo3.C         | 11 -----
 gcc/testsuite/g++.dg/template/repo4.C         | 18 -------
 gcc/testsuite/g++.dg/template/repo5.C         | 14 ------
 gcc/testsuite/g++.dg/template/repo6.C         | 26 ----------
 gcc/testsuite/g++.dg/template/repo7.C         | 25 ----------
 gcc/testsuite/g++.dg/template/repo8.C         | 24 ---------
 gcc/testsuite/g++.dg/template/repo9.C         | 49 -------------------
 .../g++.old-deja/g++.pt/instantiate4.C        | 31 ------------
 .../g++.old-deja/g++.pt/instantiate6.C        | 29 -----------
 gcc/testsuite/g++.old-deja/g++.pt/repo1.C     | 24 ---------
 gcc/testsuite/g++.old-deja/g++.pt/repo2.C     | 28 -----------
 gcc/testsuite/g++.old-deja/g++.pt/repo3.C     | 39 ---------------
 gcc/testsuite/g++.old-deja/g++.pt/repo4.C     | 19 -------
 gcc/testsuite/lib/g++.exp                     |  5 --
 gcc/testsuite/lib/gcc-dg.exp                  | 21 --------
 gcc/testsuite/lib/obj-c++.exp                 |  8 +--
 26 files changed, 3 insertions(+), 520 deletions(-)
 delete mode 100644 gcc/testsuite/g++.dg/parse/repo1.C
 delete mode 100644 gcc/testsuite/g++.dg/rtti/repo1.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo1.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo10.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo11.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo2.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo3.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo4.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo5.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo6.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo7.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo8.C
 delete mode 100644 gcc/testsuite/g++.dg/template/repo9.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/repo1.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/repo2.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/repo3.C
 delete mode 100644 gcc/testsuite/g++.old-deja/g++.pt/repo4.C

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 572cf186262..963c651019d 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1732,7 +1732,7 @@ ObjC ObjC++ LTO Var(flag_replace_objc_classes)
 Used in Fix-and-Continue mode to indicate that object files may be swapped in at runtime.
 
 frepo
-C++ ObjC++
+C++ ObjC++ Deprecated
 Enable automatic template instantiation.
 
 frtti
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index f2619e12f93..8cee30501d0 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -24485,31 +24485,6 @@ fine-grained control when necessary. It is also the most portable
 alternative and programs using this approach will work with most modern
 compilers.
 
-@item
-@opindex frepo
-Compile your template-using code with @option{-frepo}.  The compiler
-generates files with the extension @samp{.rpo} listing all of the
-template instantiations used in the corresponding object files that
-could be instantiated there; the link wrapper, @samp{collect2},
-then updates the @samp{.rpo} files to tell the compiler where to place
-those instantiations and rebuild any affected object files.  The
-link-time overhead is negligible after the first pass, as the compiler
-continues to place the instantiations in the same files.
-
-This can be a suitable option for application code written for the Borland
-model, as it usually just works.  Code written for the Cfront model 
-needs to be modified so that the template definitions are available at
-one or more points of instantiation; usually this is as simple as adding
-@code{#include <tmethods.cc>} to the end of each template header.
-
-For library code, if you want the library to provide all of the template
-instantiations it needs, just try to link all of its object files
-together; the link will fail, but cause the instantiations to be
-generated as a side effect.  Be warned, however, that this may cause
-conflicts if multiple libraries try to provide the same instantiations.
-For greater control, use explicit instantiation as described in the next
-option.
-
 @item
 @opindex fno-implicit-templates
 Compile your code with @option{-fno-implicit-templates} to disable the
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index eaef4cd63d2..efc89563e67 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -221,7 +221,7 @@ in the following sections.
 -fno-nonansi-builtins  -fnothrow-opt  -fno-operator-names @gol
 -fno-optional-diags  -fpermissive @gol
 -fno-pretty-templates @gol
--frepo  -fno-rtti  -fsized-deallocation @gol
+-fno-rtti  -fsized-deallocation @gol
 -ftemplate-backtrace-limit=@var{n} @gol
 -ftemplate-depth=@var{n} @gol
 -fno-threadsafe-statics  -fuse-cxa-atexit @gol
@@ -2716,12 +2716,6 @@ the default template arguments for that template.  If either of these
 behaviors make it harder to understand the error message rather than
 easier, you can use @option{-fno-pretty-templates} to disable them.
 
-@item -frepo
-@opindex frepo
-Enable automatic template instantiation at link time.  This option also
-implies @option{-fno-implicit-templates}.  @xref{Template
-Instantiation}, for more information.
-
 @item -fno-rtti
 @opindex fno-rtti
 @opindex frtti
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 85efadb3ca1..5012184fa60 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2783,9 +2783,6 @@ int main() @{ return 0; @}
 @item cleanup-profile-file
 Removes profiling files generated for this test.
 
-@item cleanup-repo-files
-Removes files generated for this test for @option{-frepo}.
-
 @end table
 
 @node Ada Tests
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
deleted file mode 100644
index efadd58723e..00000000000
--- a/gcc/testsuite/g++.dg/parse/repo1.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-
-extern "C" inline void f() {}
-
-int main () {
-  f();
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
deleted file mode 100644
index f72a9730ab9..00000000000
--- a/gcc/testsuite/g++.dg/rtti/repo1.C
+++ /dev/null
@@ -1,19 +0,0 @@
-// PR c++/22204
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-#include <typeinfo>
-template<int>
-struct function1
-{
-  function1()
-  {
-    typeid(int[100]);
-  }
-};
-function1<1> b;
-
-int main () {}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.dg/template/repo1.C b/gcc/testsuite/g++.dg/template/repo1.C
deleted file mode 100644
index 342993eca14..00000000000
--- a/gcc/testsuite/g++.dg/template/repo1.C
+++ /dev/null
@@ -1,20 +0,0 @@
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-struct A {
-  A();
-};
-
-A::A() {}
-
-template <typename T>
-struct B : public A {
-  B() {} // { dg-bogus "" }
-};
-
-B<int> b;
-
-int main () {}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.dg/template/repo10.C b/gcc/testsuite/g++.dg/template/repo10.C
deleted file mode 100644
index c92f7a52b60..00000000000
--- a/gcc/testsuite/g++.dg/template/repo10.C
+++ /dev/null
@@ -1,16 +0,0 @@
-// PR c++/51910
-// { dg-options -frepo }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-// { dg-final cleanup-repo-files }
-
-template<typename T>
-struct Foo
-{
-  virtual ~Foo() { }
-};
-
-int main( int, char*[] )
-{
-  Foo<int> test;
-}
diff --git a/gcc/testsuite/g++.dg/template/repo11.C b/gcc/testsuite/g++.dg/template/repo11.C
deleted file mode 100644
index 5cabfd452ed..00000000000
--- a/gcc/testsuite/g++.dg/template/repo11.C
+++ /dev/null
@@ -1,31 +0,0 @@
-// PR c++/64521
-// { dg-options "-frepo -std=c++11" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-// { dg-final cleanup-repo-files }
-
-template <typename H> struct J { J(H) {} };
-template <unsigned long, typename...> struct K;
-template <unsigned long I> struct K<I> {};
-template <unsigned long I, typename H, typename... T>
-struct K<I, H, T...> : K<I + 1, T...>, J<H> {
-  K(const H &p1, const T &... p2) : K<I + 1, T...>(p2...), J<H>(p1) {}
-};
-template <typename... E> struct C : K<0, E...> {
-  C(const E &... p1) : K<0, E...>(p1...) {}
-};
-template <typename> struct A {
-  A() = default;
-};
-struct M;
-template <typename> struct L {
-  struct B {
-    template <typename> static M *__test(...);
-    typedef A<int> _Del;
-    typedef decltype(__test<_Del>()) type;
-  };
-  C<typename B::type, A<M>> _M_t;
-  L(typename B::type) : _M_t(0, A<M>()) {}
-};
-struct M {};
-int main() { L<int>(new M); }
diff --git a/gcc/testsuite/g++.dg/template/repo2.C b/gcc/testsuite/g++.dg/template/repo2.C
deleted file mode 100644
index e3224155e97..00000000000
--- a/gcc/testsuite/g++.dg/template/repo2.C
+++ /dev/null
@@ -1,18 +0,0 @@
-// PR c++/17163
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template <int __inst>
-struct __Atomicity_lock
-{
-  static unsigned char _S_atomicity_lock;
-};
-template <int __inst>
-unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
-template unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
-
-int main () {
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.dg/template/repo3.C b/gcc/testsuite/g++.dg/template/repo3.C
deleted file mode 100644
index cfa38a9e435..00000000000
--- a/gcc/testsuite/g++.dg/template/repo3.C
+++ /dev/null
@@ -1,11 +0,0 @@
-// { dg-options "-frepo -DF='a'" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template <typename A, typename B> void f () {}
-template <typename A, typename B> void g () { f<int,int>(); }
-int main () { g<int,int>(); }
-
-char c = F;
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.dg/template/repo4.C b/gcc/testsuite/g++.dg/template/repo4.C
deleted file mode 100644
index 64882a8c694..00000000000
--- a/gcc/testsuite/g++.dg/template/repo4.C
+++ /dev/null
@@ -1,18 +0,0 @@
-// PR c++/17775
-// { dg-options "-frepo" }
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-namespace { 
-  struct Foo {}; 
-} 
- 
-template <typename Tp> 
-void foo(Tp) {} 
- 
-int 
-main() 
-{ 
-  foo(Foo()); 
-} 
diff --git a/gcc/testsuite/g++.dg/template/repo5.C b/gcc/testsuite/g++.dg/template/repo5.C
deleted file mode 100644
index e45ade7df48..00000000000
--- a/gcc/testsuite/g++.dg/template/repo5.C
+++ /dev/null
@@ -1,14 +0,0 @@
-// PR c++/25625
-// { dg-options "-frepo" } 
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template< typename T, T N > struct integral_c {
-  static const T value = N;
-  typedef integral_c< T, value + 1 > next;
-};
-template< typename T, T N > T const integral_c< T, N >::value;
-integral_c<int,0> a;
-
-int main () {}
diff --git a/gcc/testsuite/g++.dg/template/repo6.C b/gcc/testsuite/g++.dg/template/repo6.C
deleted file mode 100644
index 4b7178e2ad3..00000000000
--- a/gcc/testsuite/g++.dg/template/repo6.C
+++ /dev/null
@@ -1,26 +0,0 @@
-// PR c++/34178
-// { dg-options "-frepo" }
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template<typename T>
-class A
-{
-private:
-  static const int x;
-  static int y;
-
-public:
-  int getX () { return x + y; }
-};
-
-template<typename T> const int A<T>::x = 0;
-template<typename T> int A<T>::y = 0;
-
-int
-main ()
-{
-  A<int> a;
-  return a.getX();
-}
diff --git a/gcc/testsuite/g++.dg/template/repo7.C b/gcc/testsuite/g++.dg/template/repo7.C
deleted file mode 100644
index dafb3f5597c..00000000000
--- a/gcc/testsuite/g++.dg/template/repo7.C
+++ /dev/null
@@ -1,25 +0,0 @@
-// PR c++/34340
-// { dg-options "-frepo" }
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-struct A
-{
-  int a;
-};
-
-template <typename T> struct D
-{
-  static const A b;
-};
-
-template<typename T> const A D<T>::b = { 2 };
-template class D<A>;
-
-const A *x = &D<A>::b;
-
-int
-main ()
-{
-}
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
deleted file mode 100644
index c51592c9349..00000000000
--- a/gcc/testsuite/g++.dg/template/repo8.C
+++ /dev/null
@@ -1,24 +0,0 @@
-// PR c++/34340
-// { dg-options "-frepo" }
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-struct A
-{
-  int a;
-};
-
-template <typename T> struct D
-{
-  static const A b;
-};
-
-template<typename T> const A D<T>::b = { 2 };
-
-const A *x = &D<A>::b;
-
-int
-main ()
-{
-}
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
deleted file mode 100644
index 7ddc6bf56d3..00000000000
--- a/gcc/testsuite/g++.dg/template/repo9.C
+++ /dev/null
@@ -1,49 +0,0 @@
-// PR c++/36364
-// { dg-options "-frepo" }
-// { dg-final { cleanup-repo-files } }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template <typename C> struct A
-{
-  static void assign (C &c1, const C &c2) { c1 = c2; }
-};
-
-template <typename C, typename T> struct B
-{
-  struct D
-  {
-    static const C terminal;
-    static unsigned long stor[];
-    static D &empty_rep ()
-    {
-      void *p = reinterpret_cast <void *>(&stor);
-      return *reinterpret_cast <D *>(p);
-    }
-    void test (unsigned long n)
-    {
-      T::assign (this->refdata ()[n], terminal);
-    }
-    C *refdata () throw ()
-    {
-      return reinterpret_cast <C *>(this + 1);
-    }
-  };
-  C *dataplus;
-  C *data () const { return dataplus; }
-  D *rep () const { return &((reinterpret_cast < D * >(data ()))[-1]); }
-  static D & empty_rep () { return D::empty_rep (); }
-  B () : dataplus (empty_rep ().refdata ()) { }
-  ~B () { }
-  void push_back (C c) { rep ()->test (10); }
-};
-
-template <typename C, typename T> const C B <C, T>::D::terminal = C ();
-template <typename C, typename T> unsigned long B <C, T>::D::stor[64];
-
-int
-main ()
-{
-  B <char, A <char> > s;
-  s.push_back ('a');
-}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
deleted file mode 100644
index d7a8cab31c5..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ /dev/null
@@ -1,31 +0,0 @@
-// { dg-do link }
-// { dg-options "-frepo -Werror" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-
-// Submitted by Melissa O'Neill <one...@cs.sfu.ca>
-// the vtable of Foo<int> wouldn't be generated
-
-template <typename A>
-struct Foo {
-   virtual void foo() {}
-};
-
-template <typename A>
-struct Bar {   
-   void bar();
-};
-
-template <typename A> 
-void Bar<A>::bar() {
-   Foo<A> oof;
-}
-
-int main () {
-    Bar<int> rab;
-    
-    rab.bar();
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
deleted file mode 100644
index 6726b216673..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
+++ /dev/null
@@ -1,29 +0,0 @@
-// { dg-do link }
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-// Simplified from testcase by Erez Louidor Lior <s3824...@techst02.technion.ac.il>
-
-template <class T>
-class foo{
-public:
-  void g();
-  void h();
-};
-
-template <class T>
-void foo<T>::g() {
-  h();
-}
-
-template <class T>
-void foo<T>::h() {
-}
-
-int main() {
-  foo<int> f;
-  f.g();
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
deleted file mode 100644
index bdfe306b4ad..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
+++ /dev/null
@@ -1,24 +0,0 @@
-// { dg-do link }
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-// Bug: g++ complains about duplicate explicit instantiations with -frepo.
-// From Jason Merrill <ja...@cygnus.com>
-
-// Build then link:
-
-template <class T> struct A {
-  virtual ~A () { }
-};
-
-template <class T> void g (T t) { }
-
-template class A<int>;
-
-int main ()
-{
-  g (42);
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
deleted file mode 100644
index a8d8b1217a1..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
+++ /dev/null
@@ -1,28 +0,0 @@
-// { dg-do link  }
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-// Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
-// Contributed by Jason Merrill <ja...@cygnus.com>
-
-// Build then link:
-
-template <class T>
-T f (T t)
-{
-  return t;
-}
-
-template <class T>
-T g (T t)
-{
-  return f (t);
-}
-
-int main ()
-{
-  int i = g (42);
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
deleted file mode 100644
index 2f62139660e..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
+++ /dev/null
@@ -1,39 +0,0 @@
-// { dg-do link }
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-// Test that we properly generate the vtable and such for C.
-// Contributed by scott snyder <sny...@fnal.gov>
-
-// Build then link:
-
-struct A
-{
-  virtual ~A () {}
-};
-
-template <typename T>
-struct B : virtual public A
-{
-  virtual void foo () {}
-};
-
-template <typename T>
-struct C : virtual public A
-{
-};
-
-template <typename T>
-struct D : public B<T>, public C<T>
-{
-};
-
-int
-main ()
-{
-  D<int> x;
-  return 0;
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
deleted file mode 100644
index 84575cd9469..00000000000
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
+++ /dev/null
@@ -1,19 +0,0 @@
-// { dg-do link }
-// { dg-options "-frepo" }
-// { dg-require-host-local "" }
-// { dg-skip-if "dkms are not final links" { vxworks_kernel } }
-
-template <class T>
-struct S {
-  ~S ();
-};
-
-template <class T>
-S<T>::~S () {}
-
-int main ()
-{
-  S<int> s;
-}
-
-// { dg-final { cleanup-repo-files } }
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 161044290a2..ac98120903c 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -316,11 +316,6 @@ proc g++_target_compile { source dest type options } {
     set options [concat $gpp_compile_options $options]
 
     set options [concat "$ALWAYS_CXXFLAGS" $options]
-
-    if { [regexp "(^| )-frepo( |$)" $options] && \
-	 [regexp "\.o(|bj)$" $dest] } then {
-	regsub "\.o(|bj)$" $dest ".rpo" rponame
-	exec rm -f $rponame
     }
 
     # bind_pic_locally adds -fpie/-fPIE flags to flags_to_postpone and it is
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index e23b63cf3d1..5aa247f59eb 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -242,14 +242,6 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
 
     set options [list]
 
-    # Tests should be able to use "dg-do repo".  However, the dg test
-    # driver checks the argument to dg-do against a list of acceptable
-    # options, and "repo" is not among them.  Therefore, we resort to
-    # this ugly approach.
-    if [string match "*-frepo*" $extra_tool_flags] then {
-	set do_what "repo"
-    }
-
     switch $do_what {
 	"preprocess" {
 	    set compile_type "preprocess"
@@ -273,10 +265,6 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
 	    # The following line is needed for targets like the i960 where
 	    # the default output file is b.out.  Sigh.
 	}
-	"repo" {
-	    set compile_type "object"
-	    set output_file "[file rootname [file tail $prog]].o"
-	}
 	"run" {
 	    set compile_type "executable"
 	    # FIXME: "./" is to cope with "." not being in $PATH.
@@ -325,15 +313,6 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
 	fail "$name (internal compiler error)"
     }
 
-    if { $do_what == "repo" } {
-	set object_file "$output_file"
-	set output_file "[file rootname [file tail $prog]].exe"
-	set comp_output \
-	    [ concat $comp_output \
-		  [$target_compile "$object_file" "$output_file" \
-		       "executable" $options] ]
-    }
-
     return [list $comp_output $output_file]
 }
 
diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp
index c32f2070f36..39eb03f2129 100644
--- a/gcc/testsuite/lib/obj-c++.exp
+++ b/gcc/testsuite/lib/obj-c++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004-2019 Free Software Foundation, Inc.
+# Copyrightgcc/testsuite/lib/obj-c++.exp (C) 2004-2019 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -377,12 +377,6 @@ proc obj-c++_target_compile { source dest type options } {
 
     set options [concat "$ALWAYS_OBJCXXFLAGS" $options];
 
-    if { [regexp "(^| )-frepo( |$)" $options] && \
-	 [regexp "\.o(|bj)$" $dest] } then {
-	regsub "\.o(|bj)$" $dest ".rpo" rponame
-	exec rm -f $rponame
-    }
-
     set options [dg-additional-files-options $options $source]
 
     set result [target_compile $source $dest $type $options]
-- 
2.21.0

Reply via email to