public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Dropping support of repo files (tlink)
@ 2019-06-20 14:05 Martin Liška
  2019-06-20 14:21 ` David Edelsohn
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-20 14:05 UTC (permalink / raw)
  To: GCC Development; +Cc: David Edelsohn, Jan Hubicka

Hi.

In order to not buffer stderr output in LTO mode, I would like to remove
support for repo files (tlink). If I'm correctly it's only used by AIX
target. Would it be possible to drop that for the future? Is it even
used?

Thank you,
Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-20 14:05 Dropping support of repo files (tlink) Martin Liška
@ 2019-06-20 14:21 ` David Edelsohn
  2019-06-20 14:27   ` Iain Sandoe
  2019-06-20 15:10   ` Martin Liška
  0 siblings, 2 replies; 65+ messages in thread
From: David Edelsohn @ 2019-06-20 14:21 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Development, Jan Hubicka

On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>
> Hi.
>
> In order to not buffer stderr output in LTO mode, I would like to remove
> support for repo files (tlink). If I'm correctly it's only used by AIX
> target. Would it be possible to drop that for the future? Is it even
> used?

AIX currently does not support GCC LTO, but the hope was that GCC
would not do anything to specifically inhibit that ability to
eventually support that feature. AIX currently needs collect2.  I
guess that AIX could try to find another mechanism when it adds
support.

Thanks, David

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-20 14:21 ` David Edelsohn
@ 2019-06-20 14:27   ` Iain Sandoe
  2019-06-20 15:10   ` Martin Liška
  1 sibling, 0 replies; 65+ messages in thread
From: Iain Sandoe @ 2019-06-20 14:27 UTC (permalink / raw)
  To: Martin Liška; +Cc: GCC Development, Jan Hubicka, David Edelsohn


> On 20 Jun 2019, at 15:21, David Edelsohn <dje.gcc@gmail.com> wrote:
> 
> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>> 
>> Hi.
>> 
>> In order to not buffer stderr output in LTO mode, I would like to remove
>> support for repo files (tlink). If I'm correctly it's only used by AIX
>> target. Would it be possible to drop that for the future? Is it even
>> used?
> 
> AIX currently does not support GCC LTO, but the hope was that GCC
> would not do anything to specifically inhibit that ability to
> eventually support that feature. AIX currently needs collect2.  I
> guess that AIX could try to find another mechanism when it adds
> support.

Darwin needs collect2,  but does not use the tlink facility.
thanks
Iain

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-20 14:21 ` David Edelsohn
  2019-06-20 14:27   ` Iain Sandoe
@ 2019-06-20 15:10   ` Martin Liška
  2019-06-20 19:53     ` Richard Biener
  1 sibling, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-20 15:10 UTC (permalink / raw)
  To: David Edelsohn; +Cc: GCC Development, Jan Hubicka

On 6/20/19 4:21 PM, David Edelsohn wrote:
> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>
>> Hi.
>>
>> In order to not buffer stderr output in LTO mode, I would like to remove
>> support for repo files (tlink). If I'm correctly it's only used by AIX
>> target. Would it be possible to drop that for the future? Is it even
>> used?
> 
> AIX currently does not support GCC LTO, but the hope was that GCC
> would not do anything to specifically inhibit that ability to
> eventually support that feature. AIX currently needs collect2.  I
> guess that AIX could try to find another mechanism when it adds
> support.

Yes, I'm fine with collect2. I'm more precisely asking about read_report_files
that lives in tlink.c. If I understand correctly, it's parsing output of linker
and tries to find template implementations in a .rpo files that live on a disk.
That's a legacy functionality that I'm targeting to remove.

Thanks,
Martin

> 
> Thanks, David
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-20 15:10   ` Martin Liška
@ 2019-06-20 19:53     ` Richard Biener
  2019-06-21 10:22       ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-06-20 19:53 UTC (permalink / raw)
  To: gcc, Martin Liška, David Edelsohn; +Cc: GCC Development, Jan Hubicka

On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
>On 6/20/19 4:21 PM, David Edelsohn wrote:
>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>>
>>> Hi.
>>>
>>> In order to not buffer stderr output in LTO mode, I would like to
>remove
>>> support for repo files (tlink). If I'm correctly it's only used by
>AIX
>>> target. Would it be possible to drop that for the future? Is it even
>>> used?
>> 
>> AIX currently does not support GCC LTO, but the hope was that GCC
>> would not do anything to specifically inhibit that ability to
>> eventually support that feature. AIX currently needs collect2.  I
>> guess that AIX could try to find another mechanism when it adds
>> support.
>
>Yes, I'm fine with collect2. I'm more precisely asking about
>read_report_files
>that lives in tlink.c. If I understand correctly, it's parsing output
>of linker
>and tries to find template implementations in a .rpo files that live on
>a disk.
>That's a legacy functionality that I'm targeting to remove.

IIRC -frepo also works on Linux?

Richard. 

>Thanks,
>Martin
>
>> 
>> Thanks, David
>> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-20 19:53     ` Richard Biener
@ 2019-06-21 10:22       ` Martin Liška
  2019-06-21 10:28         ` Jonathan Wakely
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-21 10:22 UTC (permalink / raw)
  To: Richard Biener, gcc, David Edelsohn; +Cc: Jan Hubicka

On 6/20/19 9:53 PM, Richard Biener wrote:
> On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
>> On 6/20/19 4:21 PM, David Edelsohn wrote:
>>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>>>
>>>> Hi.
>>>>
>>>> In order to not buffer stderr output in LTO mode, I would like to
>> remove
>>>> support for repo files (tlink). If I'm correctly it's only used by
>> AIX
>>>> target. Would it be possible to drop that for the future? Is it even
>>>> used?
>>>
>>> AIX currently does not support GCC LTO, but the hope was that GCC
>>> would not do anything to specifically inhibit that ability to
>>> eventually support that feature. AIX currently needs collect2.  I
>>> guess that AIX could try to find another mechanism when it adds
>>> support.
>>
>> Yes, I'm fine with collect2. I'm more precisely asking about
>> read_report_files
>> that lives in tlink.c. If I understand correctly, it's parsing output
>> of linker
>> and tries to find template implementations in a .rpo files that live on
>> a disk.
>> That's a legacy functionality that I'm targeting to remove.
> 
> IIRC -frepo also works on Linux?

Heh, you are right ;). Is there are consumer of that infrastructure
or can we just drop it?

Martin

> 
> Richard. 
> 
>> Thanks,
>> Martin
>>
>>>
>>> Thanks, David
>>>
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 10:22       ` Martin Liška
@ 2019-06-21 10:28         ` Jonathan Wakely
  2019-06-21 10:35           ` Iain Sandoe
  0 siblings, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-06-21 10:28 UTC (permalink / raw)
  To: Martin Liška; +Cc: Richard Biener, gcc, David Edelsohn, Jan Hubicka

On Fri, 21 Jun 2019 at 11:22, Martin Liška <mliska@suse.cz> wrote:
>
> On 6/20/19 9:53 PM, Richard Biener wrote:
> > On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
> >> On 6/20/19 4:21 PM, David Edelsohn wrote:
> >>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
> >>>>
> >>>> Hi.
> >>>>
> >>>> In order to not buffer stderr output in LTO mode, I would like to
> >> remove
> >>>> support for repo files (tlink). If I'm correctly it's only used by
> >> AIX
> >>>> target. Would it be possible to drop that for the future? Is it even
> >>>> used?
> >>>
> >>> AIX currently does not support GCC LTO, but the hope was that GCC
> >>> would not do anything to specifically inhibit that ability to
> >>> eventually support that feature. AIX currently needs collect2.  I
> >>> guess that AIX could try to find another mechanism when it adds
> >>> support.
> >>
> >> Yes, I'm fine with collect2. I'm more precisely asking about
> >> read_report_files
> >> that lives in tlink.c. If I understand correctly, it's parsing output
> >> of linker
> >> and tries to find template implementations in a .rpo files that live on
> >> a disk.
> >> That's a legacy functionality that I'm targeting to remove.
> >
> > IIRC -frepo also works on Linux?
>
> Heh, you are right ;). Is there are consumer of that infrastructure
> or can we just drop it?

Anybody using option 2 at
https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html

I have no idea if anybody is using that, but we should at least
deprecate it instead of just dropping a documented option without
warning.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 10:28         ` Jonathan Wakely
@ 2019-06-21 10:35           ` Iain Sandoe
  2019-06-21 10:40             ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Iain Sandoe @ 2019-06-21 10:35 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Martin Liška, Richard Biener, gcc, David Edelsohn, Jan Hubicka


> On 21 Jun 2019, at 11:28, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 
> On Fri, 21 Jun 2019 at 11:22, Martin Liška <mliska@suse.cz> wrote:
>> 
>> On 6/20/19 9:53 PM, Richard Biener wrote:
>>> On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
>>>> On 6/20/19 4:21 PM, David Edelsohn wrote:
>>>>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>>>>> 
>>>>>> Hi.
>>>>>> 
>>>>>> In order to not buffer stderr output in LTO mode, I would like to
>>>> remove
>>>>>> support for repo files (tlink). If I'm correctly it's only used by
>>>> AIX
>>>>>> target. Would it be possible to drop that for the future? Is it even
>>>>>> used?
>>>>> 
>>>>> AIX currently does not support GCC LTO, but the hope was that GCC
>>>>> would not do anything to specifically inhibit that ability to
>>>>> eventually support that feature. AIX currently needs collect2.  I
>>>>> guess that AIX could try to find another mechanism when it adds
>>>>> support.
>>>> 
>>>> Yes, I'm fine with collect2. I'm more precisely asking about
>>>> read_report_files
>>>> that lives in tlink.c. If I understand correctly, it's parsing output
>>>> of linker
>>>> and tries to find template implementations in a .rpo files that live on
>>>> a disk.
>>>> That's a legacy functionality that I'm targeting to remove.
>>> 
>>> IIRC -frepo also works on Linux?
>> 
>> Heh, you are right ;). Is there are consumer of that infrastructure
>> or can we just drop it?
> 
> Anybody using option 2 at
> https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
> 
> I have no idea if anybody is using that, but we should at least
> deprecate it instead of just dropping a documented option without
> warning.

I should have been clearer about Darwin:

collect2 is required because it wraps the calling of lto-wrapper and ld.

FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
using case #2 from Jonathan’s post.

So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
safer step.

Iain

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 10:35           ` Iain Sandoe
@ 2019-06-21 10:40             ` Martin Liška
  2019-06-21 11:47               ` Jonathan Wakely
  2019-06-21 11:50               ` Dropping support of repo files (tlink) Iain Sandoe
  0 siblings, 2 replies; 65+ messages in thread
From: Martin Liška @ 2019-06-21 10:40 UTC (permalink / raw)
  To: Iain Sandoe, Jonathan Wakely
  Cc: Richard Biener, gcc, David Edelsohn, Jan Hubicka

On 6/21/19 12:34 PM, Iain Sandoe wrote:
> 
>> On 21 Jun 2019, at 11:28, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>
>> On Fri, 21 Jun 2019 at 11:22, Martin Liška <mliska@suse.cz> wrote:
>>>
>>> On 6/20/19 9:53 PM, Richard Biener wrote:
>>>> On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
>>>>> On 6/20/19 4:21 PM, David Edelsohn wrote:
>>>>>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>>>>>>
>>>>>>> Hi.
>>>>>>>
>>>>>>> In order to not buffer stderr output in LTO mode, I would like to
>>>>> remove
>>>>>>> support for repo files (tlink). If I'm correctly it's only used by
>>>>> AIX
>>>>>>> target. Would it be possible to drop that for the future? Is it even
>>>>>>> used?
>>>>>>
>>>>>> AIX currently does not support GCC LTO, but the hope was that GCC
>>>>>> would not do anything to specifically inhibit that ability to
>>>>>> eventually support that feature. AIX currently needs collect2.  I
>>>>>> guess that AIX could try to find another mechanism when it adds
>>>>>> support.
>>>>>
>>>>> Yes, I'm fine with collect2. I'm more precisely asking about
>>>>> read_report_files
>>>>> that lives in tlink.c. If I understand correctly, it's parsing output
>>>>> of linker
>>>>> and tries to find template implementations in a .rpo files that live on
>>>>> a disk.
>>>>> That's a legacy functionality that I'm targeting to remove.
>>>>
>>>> IIRC -frepo also works on Linux?
>>>
>>> Heh, you are right ;). Is there are consumer of that infrastructure
>>> or can we just drop it?
>>
>> Anybody using option 2 at
>> https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
>>
>> I have no idea if anybody is using that, but we should at least
>> deprecate it instead of just dropping a documented option without
>> warning.
> 
> I should have been clearer about Darwin:
> 
> collect2 is required because it wraps the calling of lto-wrapper and ld.
> 
> FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
> using case #2 from Jonathan’s post.
> 
> So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
> safer step.

Thank you for the information.

Yes, I would be fine to deprecate that for GCC 10.1

Martin

> 
> Iain
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 10:40             ` Martin Liška
@ 2019-06-21 11:47               ` Jonathan Wakely
  2019-06-21 11:52                 ` [PATCH] Deprecate -frepo option Martin Liška
  2019-06-21 11:50               ` Dropping support of repo files (tlink) Iain Sandoe
  1 sibling, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-06-21 11:47 UTC (permalink / raw)
  To: Martin Liška
  Cc: Iain Sandoe, Richard Biener, gcc, David Edelsohn, Jan Hubicka

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?

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.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 10:40             ` Martin Liška
  2019-06-21 11:47               ` Jonathan Wakely
@ 2019-06-21 11:50               ` Iain Sandoe
  2019-06-21 12:37                 ` Richard Biener
  1 sibling, 1 reply; 65+ messages in thread
From: Iain Sandoe @ 2019-06-21 11:50 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jonathan Wakely, Richard Biener, gcc, David Edelsohn, Jan Hubicka


> On 21 Jun 2019, at 11:40, Martin Liška <mliska@suse.cz> wrote:
> 
> On 6/21/19 12:34 PM, Iain Sandoe wrote:
>> 
>>> On 21 Jun 2019, at 11:28, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>> 
>>> On Fri, 21 Jun 2019 at 11:22, Martin Liška <mliska@suse.cz> wrote:
>>>> 
>>>> On 6/20/19 9:53 PM, Richard Biener wrote:
>>>>> On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
>>>>>> On 6/20/19 4:21 PM, David Edelsohn wrote:
>>>>>>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
>>>>>>>> 
>>>>>>>> Hi.
>>>>>>>> 
>>>>>>>> In order to not buffer stderr output in LTO mode, I would like to
>>>>>> remove
>>>>>>>> support for repo files (tlink). If I'm correctly it's only used by
>>>>>> AIX
>>>>>>>> target. Would it be possible to drop that for the future? Is it even
>>>>>>>> used?
>>>>>>> 
>>>>>>> AIX currently does not support GCC LTO, but the hope was that GCC
>>>>>>> would not do anything to specifically inhibit that ability to
>>>>>>> eventually support that feature. AIX currently needs collect2.  I
>>>>>>> guess that AIX could try to find another mechanism when it adds
>>>>>>> support.
>>>>>> 
>>>>>> Yes, I'm fine with collect2. I'm more precisely asking about
>>>>>> read_report_files
>>>>>> that lives in tlink.c. If I understand correctly, it's parsing output
>>>>>> of linker
>>>>>> and tries to find template implementations in a .rpo files that live on
>>>>>> a disk.
>>>>>> That's a legacy functionality that I'm targeting to remove.
>>>>> 
>>>>> IIRC -frepo also works on Linux?
>>>> 
>>>> Heh, you are right ;). Is there are consumer of that infrastructure
>>>> or can we just drop it?
>>> 
>>> Anybody using option 2 at
>>> https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
>>> 
>>> I have no idea if anybody is using that, but we should at least
>>> deprecate it instead of just dropping a documented option without
>>> warning.
>> 
>> I should have been clearer about Darwin:
>> 
>> collect2 is required because it wraps the calling of lto-wrapper and ld.
>> 
>> FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
>> using case #2 from Jonathan’s post.
>> 
>> So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
>> safer step.
> 
> Thank you for the information.
> 
> Yes, I would be fine to deprecate that for GCC 10.1

“thinking aloud” - would it work to deprecate (or even disallow immediately if no-one is using it) LTO + frepo?
(so that non-LTO frepo continues as long as anyone needs it)


Iain




^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PATCH] Deprecate -frepo option.
  2019-06-21 11:47               ` Jonathan Wakely
@ 2019-06-21 11:52                 ` Martin Liška
  2019-06-21 11:59                   ` Jakub Jelinek
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-21 11:52 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Iain Sandoe, Richard Biener, gcc, David Edelsohn, Jan Hubicka,
	GCC Patches

[-- Attachment #1: Type: text/plain, Size: 724 bytes --]

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.
> 


[-- Attachment #2: 0001-Deprecate-frepo-option.patch --]
[-- Type: text/x-patch, Size: 24241 bytes --]

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

gcc/ChangeLog:

2019-06-21  Martin Liska  <mliska@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  <mliska@suse.cz>

	* c.opt: Mark frepo deprecated.

gcc/testsuite/ChangeLog:

2019-06-21  Martin Liska  <mliska@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 <oneill@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 <s3824888@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 <jason@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 <jason@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 <snyder@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


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 11:52                 ` [PATCH] Deprecate -frepo option Martin Liška
@ 2019-06-21 11:59                   ` Jakub Jelinek
  2019-06-21 14:04                     ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-06-21 11:59 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jonathan Wakely, Iain Sandoe, Richard Biener, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches

On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> 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.

IMHO for just deprecation of an option you don't want to remove it from the
testsuite, just match the warning it will generate in those tests, and
I'm not convinced you want to remove it from the documentation (rather than
just saying in the documentation that the option is deprecated and might be
removed in a later GCC version).

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 11:50               ` Dropping support of repo files (tlink) Iain Sandoe
@ 2019-06-21 12:37                 ` Richard Biener
  2019-06-21 12:50                   ` Jan Hubicka
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-06-21 12:37 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Martin Liška, Jonathan Wakely, gcc, David Edelsohn, Jan Hubicka

On Fri, Jun 21, 2019 at 1:50 PM Iain Sandoe <idsandoe@googlemail.com> wrote:
>
>
> > On 21 Jun 2019, at 11:40, Martin Liška <mliska@suse.cz> wrote:
> >
> > On 6/21/19 12:34 PM, Iain Sandoe wrote:
> >>
> >>> On 21 Jun 2019, at 11:28, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> >>>
> >>> On Fri, 21 Jun 2019 at 11:22, Martin Liška <mliska@suse.cz> wrote:
> >>>>
> >>>> On 6/20/19 9:53 PM, Richard Biener wrote:
> >>>>> On June 20, 2019 5:09:55 PM GMT+02:00, "Martin Liška" <mliska@suse.cz> wrote:
> >>>>>> On 6/20/19 4:21 PM, David Edelsohn wrote:
> >>>>>>> On Thu, Jun 20, 2019 at 10:05 AM Martin Liška <mliska@suse.cz> wrote:
> >>>>>>>>
> >>>>>>>> Hi.
> >>>>>>>>
> >>>>>>>> In order to not buffer stderr output in LTO mode, I would like to
> >>>>>> remove
> >>>>>>>> support for repo files (tlink). If I'm correctly it's only used by
> >>>>>> AIX
> >>>>>>>> target. Would it be possible to drop that for the future? Is it even
> >>>>>>>> used?
> >>>>>>>
> >>>>>>> AIX currently does not support GCC LTO, but the hope was that GCC
> >>>>>>> would not do anything to specifically inhibit that ability to
> >>>>>>> eventually support that feature. AIX currently needs collect2.  I
> >>>>>>> guess that AIX could try to find another mechanism when it adds
> >>>>>>> support.
> >>>>>>
> >>>>>> Yes, I'm fine with collect2. I'm more precisely asking about
> >>>>>> read_report_files
> >>>>>> that lives in tlink.c. If I understand correctly, it's parsing output
> >>>>>> of linker
> >>>>>> and tries to find template implementations in a .rpo files that live on
> >>>>>> a disk.
> >>>>>> That's a legacy functionality that I'm targeting to remove.
> >>>>>
> >>>>> IIRC -frepo also works on Linux?
> >>>>
> >>>> Heh, you are right ;). Is there are consumer of that infrastructure
> >>>> or can we just drop it?
> >>>
> >>> Anybody using option 2 at
> >>> https://gcc.gnu.org/onlinedocs/gcc/Template-Instantiation.html
> >>>
> >>> I have no idea if anybody is using that, but we should at least
> >>> deprecate it instead of just dropping a documented option without
> >>> warning.
> >>
> >> I should have been clearer about Darwin:
> >>
> >> collect2 is required because it wraps the calling of lto-wrapper and ld.
> >>
> >> FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
> >> using case #2 from Jonathan’s post.
> >>
> >> So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
> >> safer step.
> >
> > Thank you for the information.
> >
> > Yes, I would be fine to deprecate that for GCC 10.1
>
> “thinking aloud” - would it work to deprecate (or even disallow immediately if no-one is using it) LTO + frepo?
> (so that non-LTO frepo continues as long as anyone needs it)

Does that even work? ;)  It would need an intermediate compile-step to
instantiate templates to
another LTO object.

Richard.

>
> Iain
>
>
>
>

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 12:37                 ` Richard Biener
@ 2019-06-21 12:50                   ` Jan Hubicka
  2019-06-21 13:08                     ` Iain Sandoe
  0 siblings, 1 reply; 65+ messages in thread
From: Jan Hubicka @ 2019-06-21 12:50 UTC (permalink / raw)
  To: Richard Biener
  Cc: Iain Sandoe, Martin Liška, Jonathan Wakely, gcc, David Edelsohn

> > >> I should have been clearer about Darwin:
> > >>
> > >> collect2 is required because it wraps the calling of lto-wrapper and ld.
> > >>
> > >> FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
> > >> using case #2 from Jonathan’s post.
> > >>
> > >> So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
> > >> safer step.
> > >
> > > Thank you for the information.
> > >
> > > Yes, I would be fine to deprecate that for GCC 10.1
> >
> > “thinking aloud” - would it work to deprecate (or even disallow immediately if no-one is using it) LTO + frepo?
> > (so that non-LTO frepo continues as long as anyone needs it)
> 
> Does that even work? ;)  It would need an intermediate compile-step to
> instantiate templates to
> another LTO object.

It is iterating the linker executions so it definitly makes no sense.
One problem is that in the collect2 at the time of deciding whether
to open temporary file for the linker output (which is the problem
Martin tries to solve) we do not know yet whether we will do -flto
(because that will be decided by linker plugin later) or repo
(because it works by looking for .repo files only after the link-step
failed).

I suppose we could block -frepo when -flto is on the command line that
is most common case for LTO builds arriving to bit odd situation that at
link-time -flto will effect nothing but colors of diagnostics
(I would really like to have this solved for gcc 10 in some way)

Honza
> 
> Richard.
> 
> >
> > Iain
> >
> >
> >
> >

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: Dropping support of repo files (tlink)
  2019-06-21 12:50                   ` Jan Hubicka
@ 2019-06-21 13:08                     ` Iain Sandoe
  0 siblings, 0 replies; 65+ messages in thread
From: Iain Sandoe @ 2019-06-21 13:08 UTC (permalink / raw)
  To: Jan Hubicka
  Cc: Richard Biener, Martin Liška, Jonathan Wakely, gcc, David Edelsohn


> On 21 Jun 2019, at 13:49, Jan Hubicka <hubicka@ucw.cz> wrote:
> 
>>>>> I should have been clearer about Darwin:
>>>>> 
>>>>> collect2 is required because it wraps the calling of lto-wrapper and ld.
>>>>> 
>>>>> FWIW Darwin also passes all the “-frepo” testcases, however, I’m not aware of anyone actually
>>>>> using case #2 from Jonathan’s post.
>>>>> 
>>>>> So, AFAIK the tlink capability isn’t required for modern C++ on Darwin; but, maybe deprecation is a
>>>>> safer step.
>>>> 
>>>> Thank you for the information.
>>>> 
>>>> Yes, I would be fine to deprecate that for GCC 10.1
>>> 
>>> “thinking aloud” - would it work to deprecate (or even disallow immediately if no-one is using it) LTO + frepo?
>>> (so that non-LTO frepo continues as long as anyone needs it)
>> 
>> Does that even work? ;)  It would need an intermediate compile-step to
>> instantiate templates to
>> another LTO object.
> 
> It is iterating the linker executions so it definitly makes no sense.
> One problem is that in the collect2 at the time of deciding whether
> to open temporary file for the linker output (which is the problem
> Martin tries to solve) we do not know yet whether we will do -flto
> (because that will be decided by linker plugin later) or repo
> (because it works by looking for .repo files only after the link-step
> failed).

for “non ELF” (at least for Darwin) we decide by scanning the object files
using simple object - if any LTO section is seen, we spawn lto-wrapper,
else we just proceed with a normal link.

That used to be horribly inefficient (it was a new “nm & grep " process per
object)- but we fixed that during 9 - still too heavy?

> I suppose we could block -frepo when -flto is on the command line that
> is most common case for LTO builds arriving to bit odd situation that at
> link-time -flto will effect nothing but colors of diagnostics
> (I would really like to have this solved for gcc 10 in some way)

the point is - if it can’t work, then it may as well be disallowed - and then the
LTO path knows it doesn’t need to do the tlink stuff.

(and tlink can remain for non-LTO frepo)

Iain

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 11:59                   ` Jakub Jelinek
@ 2019-06-21 14:04                     ` Martin Liška
  2019-06-21 14:13                       ` Jakub Jelinek
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-21 14:04 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Jonathan Wakely, Iain Sandoe, Richard Biener, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]

On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
>> 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.
> 
> IMHO for just deprecation of an option you don't want to remove it from the
> testsuite, just match the warning it will generate in those tests, and
> I'm not convinced you want to remove it from the documentation (rather than
> just saying in the documentation that the option is deprecated and might be
> removed in a later GCC version).

Agree with you. I'm sending updated version of the patch.
Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Martin

> 
> 	Jakub
> 


[-- Attachment #2: 0001-Deprecate-frepo-option.patch --]
[-- Type: text/x-patch, Size: 13739 bytes --]

From 2eeaa3bbe9cacf4d3d407797e38c00e062c6bfd5 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Fri, 21 Jun 2019 14:18:11 +0200
Subject: [PATCH] Deprecate -frepo option.

gcc/ChangeLog:

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

	* doc/extend.texi: Note that -frepo might
	be removed in the future.
	* doc/invoke.texi: Likewise.

gcc/c-family/ChangeLog:

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

	* c.opt: Deprecate -frepo.

gcc/testsuite/ChangeLog:

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

	* g++.dg/parse/repo1.C: Add new warning for the deprecated
	option -frepo.
	* g++.dg/rtti/repo1.C: Likewise.
	* g++.dg/template/repo1.C: Likewise.
	* g++.dg/template/repo10.C: Likewise.
	* g++.dg/template/repo11.C: Likewise.
	* g++.dg/template/repo2.C: Likewise.
	* g++.dg/template/repo3.C: Likewise.
	* g++.dg/template/repo4.C: Likewise.
	* g++.dg/template/repo5.C: Likewise.
	* g++.dg/template/repo6.C: Likewise.
	* g++.dg/template/repo7.C: Likewise.
	* g++.dg/template/repo8.C: Likewise.
	* g++.dg/template/repo9.C: Likewise.
	* g++.old-deja/g++.pt/instantiate4.C: Likewise.
	* g++.old-deja/g++.pt/instantiate6.C: Likewise.
	* g++.old-deja/g++.pt/repo1.C: Likewise.
	* g++.old-deja/g++.pt/repo2.C: Likewise.
	* g++.old-deja/g++.pt/repo3.C: Likewise.
	* g++.old-deja/g++.pt/repo4.C: Likewise.
---
 gcc/c-family/c.opt                               | 2 +-
 gcc/doc/extend.texi                              | 2 ++
 gcc/doc/invoke.texi                              | 2 ++
 gcc/testsuite/g++.dg/parse/repo1.C               | 1 +
 gcc/testsuite/g++.dg/rtti/repo1.C                | 1 +
 gcc/testsuite/g++.dg/template/repo1.C            | 1 +
 gcc/testsuite/g++.dg/template/repo10.C           | 1 +
 gcc/testsuite/g++.dg/template/repo11.C           | 1 +
 gcc/testsuite/g++.dg/template/repo2.C            | 1 +
 gcc/testsuite/g++.dg/template/repo3.C            | 1 +
 gcc/testsuite/g++.dg/template/repo4.C            | 1 +
 gcc/testsuite/g++.dg/template/repo5.C            | 1 +
 gcc/testsuite/g++.dg/template/repo6.C            | 1 +
 gcc/testsuite/g++.dg/template/repo7.C            | 1 +
 gcc/testsuite/g++.dg/template/repo8.C            | 1 +
 gcc/testsuite/g++.dg/template/repo9.C            | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C | 3 ++-
 gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo1.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo2.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo3.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo4.C        | 1 +
 22 files changed, 25 insertions(+), 2 deletions(-)

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..4495d2787e8 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -24510,6 +24510,8 @@ conflicts if multiple libraries try to provide the same instantiations.
 For greater control, use explicit instantiation as described in the next
 option.
 
+The option is deprecated and might be removed in a later GCC release.
+
 @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..75f772f1856 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -2722,6 +2722,8 @@ Enable automatic template instantiation at link time.  This option also
 implies @option{-fno-implicit-templates}.  @xref{Template
 Instantiation}, for more information.
 
+The option is deprecated and might be removed in a later GCC release.
+
 @item -fno-rtti
 @opindex fno-rtti
 @opindex frtti
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
index efadd58723e..b213d81f6d6 100644
--- a/gcc/testsuite/g++.dg/parse/repo1.C
+++ b/gcc/testsuite/g++.dg/parse/repo1.C
@@ -1,5 +1,6 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 extern "C" inline void f() {}
 
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
index f72a9730ab9..ea4947f65f2 100644
--- a/gcc/testsuite/g++.dg/rtti/repo1.C
+++ b/gcc/testsuite/g++.dg/rtti/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 #include <typeinfo>
 template<int>
diff --git a/gcc/testsuite/g++.dg/template/repo1.C b/gcc/testsuite/g++.dg/template/repo1.C
index 342993eca14..5ff786f77db 100644
--- a/gcc/testsuite/g++.dg/template/repo1.C
+++ b/gcc/testsuite/g++.dg/template/repo1.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 struct A {
   A();
diff --git a/gcc/testsuite/g++.dg/template/repo10.C b/gcc/testsuite/g++.dg/template/repo10.C
index c92f7a52b60..7aa705494e1 100644
--- a/gcc/testsuite/g++.dg/template/repo10.C
+++ b/gcc/testsuite/g++.dg/template/repo10.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template<typename T>
 struct Foo
diff --git a/gcc/testsuite/g++.dg/template/repo11.C b/gcc/testsuite/g++.dg/template/repo11.C
index 5cabfd452ed..5e074787f77 100644
--- a/gcc/testsuite/g++.dg/template/repo11.C
+++ b/gcc/testsuite/g++.dg/template/repo11.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <typename H> struct J { J(H) {} };
 template <unsigned long, typename...> struct K;
diff --git a/gcc/testsuite/g++.dg/template/repo2.C b/gcc/testsuite/g++.dg/template/repo2.C
index e3224155e97..f8ef41b80d9 100644
--- a/gcc/testsuite/g++.dg/template/repo2.C
+++ b/gcc/testsuite/g++.dg/template/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <int __inst>
 struct __Atomicity_lock
diff --git a/gcc/testsuite/g++.dg/template/repo3.C b/gcc/testsuite/g++.dg/template/repo3.C
index cfa38a9e435..fda3fe3b931 100644
--- a/gcc/testsuite/g++.dg/template/repo3.C
+++ b/gcc/testsuite/g++.dg/template/repo3.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo -DF='a'" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <typename A, typename B> void f () {}
 template <typename A, typename B> void g () { f<int,int>(); }
diff --git a/gcc/testsuite/g++.dg/template/repo4.C b/gcc/testsuite/g++.dg/template/repo4.C
index 64882a8c694..0a2976356c0 100644
--- a/gcc/testsuite/g++.dg/template/repo4.C
+++ b/gcc/testsuite/g++.dg/template/repo4.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 namespace { 
   struct Foo {}; 
diff --git a/gcc/testsuite/g++.dg/template/repo5.C b/gcc/testsuite/g++.dg/template/repo5.C
index e45ade7df48..1116b5b65fd 100644
--- a/gcc/testsuite/g++.dg/template/repo5.C
+++ b/gcc/testsuite/g++.dg/template/repo5.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template< typename T, T N > struct integral_c {
   static const T value = N;
diff --git a/gcc/testsuite/g++.dg/template/repo6.C b/gcc/testsuite/g++.dg/template/repo6.C
index 4b7178e2ad3..f043b24fb05 100644
--- a/gcc/testsuite/g++.dg/template/repo6.C
+++ b/gcc/testsuite/g++.dg/template/repo6.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template<typename T>
 class A
diff --git a/gcc/testsuite/g++.dg/template/repo7.C b/gcc/testsuite/g++.dg/template/repo7.C
index dafb3f5597c..f89beefba57 100644
--- a/gcc/testsuite/g++.dg/template/repo7.C
+++ b/gcc/testsuite/g++.dg/template/repo7.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
index c51592c9349..3082f27213f 100644
--- a/gcc/testsuite/g++.dg/template/repo8.C
+++ b/gcc/testsuite/g++.dg/template/repo8.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
index 7ddc6bf56d3..463429e57f7 100644
--- a/gcc/testsuite/g++.dg/template/repo9.C
+++ b/gcc/testsuite/g++.dg/template/repo9.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <typename C> struct A
 {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
index d7a8cab31c5..866f02ace20 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
@@ -1,7 +1,8 @@
 // { dg-do link }
-// { dg-options "-frepo -Werror" }
+// { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 
 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
index 6726b216673..309e8bde8f2 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 // Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
index bdfe306b4ad..7c9dd2d97cf 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 // Bug: g++ complains about duplicate explicit instantiations with -frepo.
 // From Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
index a8d8b1217a1..81cf2866a67 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 // Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
 // Contributed by Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
index 2f62139660e..42e3bea5cab 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 // Test that we properly generate the vtable and such for C.
 // Contributed by scott snyder <snyder@fnal.gov>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
index 84575cd9469..2d028d3b328 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "switch '-frepo' is no longer supported" "" { target *-*-* } 0 }
 
 template <class T>
 struct S {
-- 
2.21.0


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 14:04                     ` Martin Liška
@ 2019-06-21 14:13                       ` Jakub Jelinek
  2019-06-21 14:28                         ` Richard Biener
  0 siblings, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-06-21 14:13 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jonathan Wakely, Iain Sandoe, Richard Biener, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches

On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> > On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> >> 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.
> > 
> > IMHO for just deprecation of an option you don't want to remove it from the
> > testsuite, just match the warning it will generate in those tests, and
> > I'm not convinced you want to remove it from the documentation (rather than
> > just saying in the documentation that the option is deprecated and might be
> > removed in a later GCC version).
> 
> Agree with you. I'm sending updated version of the patch.
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

I'm also not convinced about the Deprecated flag, seems like that is a flag
that we use for options that have been already removed.
So, instead there should be some proper warning in the C++ FE for it,
or just Warn.

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 14:13                       ` Jakub Jelinek
@ 2019-06-21 14:28                         ` Richard Biener
  2019-06-27 12:30                           ` Martin Liška
  2019-07-08 12:04                           ` Martin Liška
  0 siblings, 2 replies; 65+ messages in thread
From: Richard Biener @ 2019-06-21 14:28 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Martin Liška, Jonathan Wakely, Iain Sandoe, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches

On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
> > On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> > > On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> > >> 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.
> > >
> > > IMHO for just deprecation of an option you don't want to remove it from the
> > > testsuite, just match the warning it will generate in those tests, and
> > > I'm not convinced you want to remove it from the documentation (rather than
> > > just saying in the documentation that the option is deprecated and might be
> > > removed in a later GCC version).
> >
> > Agree with you. I'm sending updated version of the patch.
> > Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> I'm also not convinced about the Deprecated flag, seems like that is a flag
> that we use for options that have been already removed.
> So, instead there should be some proper warning in the C++ FE for it,
> or just Warn.

In principle -frepo is a nice idea - does it live up to its promises?  That is,
does it actually work, for example when throwing it on the libstdc++
testsuite or a larger C++ project?  The option doesn't document
optimization issues but I assume template bodies are not available
for IPA optimizations unless -frepo is combined with LTO where the
template CU[s] then bring them in.

So I'm not sure - do we really want to remove this feature?

Richard.

>         Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 14:28                         ` Richard Biener
@ 2019-06-27 12:30                           ` Martin Liška
  2019-06-27 12:58                             ` Jonathan Wakely
  2019-07-08 12:04                           ` Martin Liška
  1 sibling, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-27 12:30 UTC (permalink / raw)
  To: Richard Biener, Jakub Jelinek
  Cc: Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn, Jan Hubicka,
	GCC Patches, Jason Merrill

On 6/21/19 4:28 PM, Richard Biener wrote:
> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
>>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
>>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
>>>>> 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.
>>>>
>>>> IMHO for just deprecation of an option you don't want to remove it from the
>>>> testsuite, just match the warning it will generate in those tests, and
>>>> I'm not convinced you want to remove it from the documentation (rather than
>>>> just saying in the documentation that the option is deprecated and might be
>>>> removed in a later GCC version).
>>>
>>> Agree with you. I'm sending updated version of the patch.
>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> I'm also not convinced about the Deprecated flag, seems like that is a flag
>> that we use for options that have been already removed.
>> So, instead there should be some proper warning in the C++ FE for it,
>> or just Warn.
> 
> In principle -frepo is a nice idea - does it live up to its promises?  That is,
> does it actually work, for example when throwing it on the libstdc++
> testsuite or a larger C++ project? 

@Jonathan, Jason: Do we know whether it really work?

> The option doesn't document
> optimization issues but I assume template bodies are not available
> for IPA optimizations unless -frepo is combined with LTO where the
> template CU[s] then bring them in.
> 
> So I'm not sure - do we really want to remove this feature?
> 
> Richard.
> 
>>         Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 12:30                           ` Martin Liška
@ 2019-06-27 12:58                             ` Jonathan Wakely
  2019-06-27 14:22                               ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-06-27 12:58 UTC (permalink / raw)
  To: Martin Liška
  Cc: Richard Biener, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On Thu, 27 Jun 2019 at 13:30, Martin Liška <mliska@suse.cz> wrote:
>
> On 6/21/19 4:28 PM, Richard Biener wrote:
> > On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
> >>
> >> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
> >>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> >>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> >>>>> 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.
> >>>>
> >>>> IMHO for just deprecation of an option you don't want to remove it from the
> >>>> testsuite, just match the warning it will generate in those tests, and
> >>>> I'm not convinced you want to remove it from the documentation (rather than
> >>>> just saying in the documentation that the option is deprecated and might be
> >>>> removed in a later GCC version).
> >>>
> >>> Agree with you. I'm sending updated version of the patch.
> >>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> I'm also not convinced about the Deprecated flag, seems like that is a flag
> >> that we use for options that have been already removed.
> >> So, instead there should be some proper warning in the C++ FE for it,
> >> or just Warn.
> >
> > In principle -frepo is a nice idea - does it live up to its promises?  That is,
> > does it actually work, for example when throwing it on the libstdc++
> > testsuite or a larger C++ project?
>
> @Jonathan, Jason: Do we know whether it really work?

I don't know. It's nearly 20 years since I've tried it, but apparently
a few people try using it:
https://stackoverflow.com/search?q=frepo+c%2B%2B

The first result was answered by me in 2012 saying nobody uses it:
https://stackoverflow.com/a/11832613/981959

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 12:58                             ` Jonathan Wakely
@ 2019-06-27 14:22                               ` Martin Liška
  2019-06-27 17:53                                 ` Jason Merrill
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-06-27 14:22 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Richard Biener, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 6/27/19 2:58 PM, Jonathan Wakely wrote:
> On Thu, 27 Jun 2019 at 13:30, Martin Liška <mliska@suse.cz> wrote:
>>
>> On 6/21/19 4:28 PM, Richard Biener wrote:
>>> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>>>
>>>> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
>>>>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
>>>>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
>>>>>>> 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.
>>>>>>
>>>>>> IMHO for just deprecation of an option you don't want to remove it from the
>>>>>> testsuite, just match the warning it will generate in those tests, and
>>>>>> I'm not convinced you want to remove it from the documentation (rather than
>>>>>> just saying in the documentation that the option is deprecated and might be
>>>>>> removed in a later GCC version).
>>>>>
>>>>> Agree with you. I'm sending updated version of the patch.
>>>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>>>
>>>> I'm also not convinced about the Deprecated flag, seems like that is a flag
>>>> that we use for options that have been already removed.
>>>> So, instead there should be some proper warning in the C++ FE for it,
>>>> or just Warn.
>>>
>>> In principle -frepo is a nice idea - does it live up to its promises?  That is,
>>> does it actually work, for example when throwing it on the libstdc++
>>> testsuite or a larger C++ project?
>>
>> @Jonathan, Jason: Do we know whether it really work?
> 
> I don't know. It's nearly 20 years since I've tried it, but apparently
> a few people try using it:
> https://stackoverflow.com/search?q=frepo+c%2B%2B
> 
> The first result was answered by me in 2012 saying nobody uses it:
> https://stackoverflow.com/a/11832613/981959
> 

Looks at this, it seems to me very legacy and I would recommend to remove it.

Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 14:22                               ` Martin Liška
@ 2019-06-27 17:53                                 ` Jason Merrill
  2019-06-27 18:21                                   ` Jan Hubicka
  0 siblings, 1 reply; 65+ messages in thread
From: Jason Merrill @ 2019-06-27 17:53 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jonathan Wakely, Richard Biener, Jakub Jelinek, Iain Sandoe, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches

On Thu, Jun 27, 2019 at 10:23 AM Martin Liška <mliska@suse.cz> wrote:
>
> On 6/27/19 2:58 PM, Jonathan Wakely wrote:
> > On Thu, 27 Jun 2019 at 13:30, Martin Liška <mliska@suse.cz> wrote:
> >>
> >> On 6/21/19 4:28 PM, Richard Biener wrote:
> >>> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
> >>>>
> >>>> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
> >>>>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> >>>>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> >>>>>>> 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.
> >>>>>>
> >>>>>> IMHO for just deprecation of an option you don't want to remove it from the
> >>>>>> testsuite, just match the warning it will generate in those tests, and
> >>>>>> I'm not convinced you want to remove it from the documentation (rather than
> >>>>>> just saying in the documentation that the option is deprecated and might be
> >>>>>> removed in a later GCC version).
> >>>>>
> >>>>> Agree with you. I'm sending updated version of the patch.
> >>>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>>>
> >>>> I'm also not convinced about the Deprecated flag, seems like that is a flag
> >>>> that we use for options that have been already removed.
> >>>> So, instead there should be some proper warning in the C++ FE for it,
> >>>> or just Warn.
> >>>
> >>> In principle -frepo is a nice idea - does it live up to its promises?  That is,
> >>> does it actually work, for example when throwing it on the libstdc++
> >>> testsuite or a larger C++ project?
> >>
> >> @Jonathan, Jason: Do we know whether it really work?
> >
> > I don't know. It's nearly 20 years since I've tried it, but apparently
> > a few people try using it:
> > https://stackoverflow.com/search?q=frepo+c%2B%2B
> >
> > The first result was answered by me in 2012 saying nobody uses it:
> > https://stackoverflow.com/a/11832613/981959
>
> Looks at this, it seems to me very legacy and I would recommend to remove it.

It's useful on targets without COMDAT support.  Are there any such
that we care about at this point?

If the problem is the combination with LTO, why not just prohibit that?

Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 17:53                                 ` Jason Merrill
@ 2019-06-27 18:21                                   ` Jan Hubicka
  2019-06-27 18:32                                     ` Iain Sandoe
  0 siblings, 1 reply; 65+ messages in thread
From: Jan Hubicka @ 2019-06-27 18:21 UTC (permalink / raw)
  To: Jason Merrill
  Cc: Martin Liška, Jonathan Wakely, Richard Biener,
	Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn, GCC Patches

> 
> It's useful on targets without COMDAT support.  Are there any such
> that we care about at this point?
> 
> If the problem is the combination with LTO, why not just prohibit that?

The problem is that at the collect2 time we want to decide whether to
hold stderr/stdout of the linker. The issue is that we do not know yet
if we are going to LTO (because that is decided by linker plugin) or
whether we do repo files (because we look for those only after linker
failure).

We can look for repo files first but that could take some time
especially for large programs (probably not too bad compared to actual
linking later) or we may require -frepo to be passed to collect2.

Honza
> 
> Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 18:21                                   ` Jan Hubicka
@ 2019-06-27 18:32                                     ` Iain Sandoe
  2019-06-27 18:41                                       ` Jan Hubicka
  0 siblings, 1 reply; 65+ messages in thread
From: Iain Sandoe @ 2019-06-27 18:32 UTC (permalink / raw)
  To: Jan Hubicka
  Cc: Jason Merrill, Martin Liška, Jonathan Wakely,
	Richard Biener, Jakub Jelinek, gcc, David Edelsohn, GCC Patches


> On 27 Jun 2019, at 19:21, Jan Hubicka <hubicka@ucw.cz> wrote:
> 
>> 
>> It's useful on targets without COMDAT support.  Are there any such
>> that we care about at this point?
>> 
>> If the problem is the combination with LTO, why not just prohibit that?
> 
> The problem is that at the collect2 time we want to decide whether to
> hold stderr/stdout of the linker. The issue is that we do not know yet
> if we are going to LTO (because that is decided by linker plugin) or
> whether we do repo files (because we look for those only after linker
> failure).

you could pre-scan for LTO, as is done for the collect2+non-plugin linker.
(similar to the comment below, that would take some time, but probably
small c.f the actual link).
Iain

> We can look for repo files first but that could take some time
> especially for large programs (probably not too bad compared to actual
> linking later) or we may require -frepo to be passed to collect2.
> 
> Honza
>> 
>> Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-27 18:32                                     ` Iain Sandoe
@ 2019-06-27 18:41                                       ` Jan Hubicka
  0 siblings, 0 replies; 65+ messages in thread
From: Jan Hubicka @ 2019-06-27 18:41 UTC (permalink / raw)
  To: Iain Sandoe
  Cc: Jason Merrill, Martin Liška, Jonathan Wakely,
	Richard Biener, Jakub Jelinek, gcc, David Edelsohn, GCC Patches

> 
> > On 27 Jun 2019, at 19:21, Jan Hubicka <hubicka@ucw.cz> wrote:
> > 
> >> 
> >> It's useful on targets without COMDAT support.  Are there any such
> >> that we care about at this point?
> >> 
> >> If the problem is the combination with LTO, why not just prohibit that?
> > 
> > The problem is that at the collect2 time we want to decide whether to
> > hold stderr/stdout of the linker. The issue is that we do not know yet
> > if we are going to LTO (because that is decided by linker plugin) or
> > whether we do repo files (because we look for those only after linker
> > failure).
> 
> you could pre-scan for LTO, as is done for the collect2+non-plugin linker.
> (similar to the comment below, that would take some time, but probably
> small c.f the actual link).

the collect2+non-plugin does not handle static archives so it would need
more work while I think we should kill that code (and make darwin to use
lld)

Honza

> Iain
> 
> > We can look for repo files first but that could take some time
> > especially for large programs (probably not too bad compared to actual
> > linking later) or we may require -frepo to be passed to collect2.
> > 
> > Honza
> >> 
> >> Jason
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-06-21 14:28                         ` Richard Biener
  2019-06-27 12:30                           ` Martin Liška
@ 2019-07-08 12:04                           ` Martin Liška
  2019-07-09 10:39                             ` Richard Biener
  1 sibling, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-07-08 12:04 UTC (permalink / raw)
  To: Richard Biener, Jakub Jelinek
  Cc: Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn, Jan Hubicka,
	GCC Patches

On 6/21/19 4:28 PM, Richard Biener wrote:
> On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
>>
>> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
>>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
>>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
>>>>> 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.
>>>>
>>>> IMHO for just deprecation of an option you don't want to remove it from the
>>>> testsuite, just match the warning it will generate in those tests, and
>>>> I'm not convinced you want to remove it from the documentation (rather than
>>>> just saying in the documentation that the option is deprecated and might be
>>>> removed in a later GCC version).
>>>
>>> Agree with you. I'm sending updated version of the patch.
>>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> I'm also not convinced about the Deprecated flag, seems like that is a flag
>> that we use for options that have been already removed.
>> So, instead there should be some proper warning in the C++ FE for it,
>> or just Warn.
> 
> In principle -frepo is a nice idea - does it live up to its promises?  That is,
> does it actually work, for example when throwing it on the libstdc++
> testsuite or a larger C++ project? 

I've just tested tramp3d, and it does not survive linking:

g++ tramp3d-v4.o
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
collect: recompiling tramp3d-v4.cpp
collect: relinking
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `RefCountedBlockPtr<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > >, false, RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > >::RefCountedBlockPtr(RefCountedBlockPtr<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > >, false, RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > > const&)':
<artificial>:(.text+0x4181b): undefined reference to `RefCountedPtr<RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > >::RefCountedPtr(RefCountedPtr<RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > > const&)'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_impl::~_Vector_impl()':
<artificial>:(.text+0xc1890): undefined reference to `std::allocator<Node<Range<3>, Interval<3> > >::~allocator()'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_base()':
<artificial>:(.text+0xc18aa): undefined reference to `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_impl::_Vector_impl()'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::vector<INode<3>, std::allocator<INode<3> > >::_S_use_relocate()':
<artificial>:(.text+0xc496f): undefined reference to `std::vector<INode<3>, std::allocator<INode<3> > >::_S_nothrow_relocate(std::integral_constant<bool, true>)'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::~_Vector_base()':
<artificial>:(.text+0xc4cc1): undefined reference to `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_M_deallocate(Node<Range<3>, Interval<3> >*, unsigned long)'
/usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `DataBlockPtr<double, false>::DataBlockPtr()':
<artificial>:(.text+0xc6f96): undefined reference to `RefCountedBlockPtr<double, false, DataBlockController<double> >::RefCountedBlockPtr()'
[... many other undefined references ...]

Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
apparently 17 is not enough to resolve all symbols. And it's really slow.

That said, I would recommend to remove it :)

Martin

> The option doesn't document
> optimization issues but I assume template bodies are not available
> for IPA optimizations unless -frepo is combined with LTO where the
> template CU[s] then bring them in.
> 
> So I'm not sure - do we really want to remove this feature?
> 
> Richard.
> 
>>         Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-08 12:04                           ` Martin Liška
@ 2019-07-09 10:39                             ` Richard Biener
  2019-07-09 11:41                               ` Nathan Sidwell
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-07-09 10:39 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill, Nathan Sidwell

On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>
> On 6/21/19 4:28 PM, Richard Biener wrote:
> > On Fri, Jun 21, 2019 at 4:13 PM Jakub Jelinek <jakub@redhat.com> wrote:
> >>
> >> On Fri, Jun 21, 2019 at 04:04:00PM +0200, Martin Liška wrote:
> >>> On 6/21/19 1:58 PM, Jakub Jelinek wrote:
> >>>> On Fri, Jun 21, 2019 at 01:52:09PM +0200, Martin Liška wrote:
> >>>>> 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.
> >>>>
> >>>> IMHO for just deprecation of an option you don't want to remove it from the
> >>>> testsuite, just match the warning it will generate in those tests, and
> >>>> I'm not convinced you want to remove it from the documentation (rather than
> >>>> just saying in the documentation that the option is deprecated and might be
> >>>> removed in a later GCC version).
> >>>
> >>> Agree with you. I'm sending updated version of the patch.
> >>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
> >>
> >> I'm also not convinced about the Deprecated flag, seems like that is a flag
> >> that we use for options that have been already removed.
> >> So, instead there should be some proper warning in the C++ FE for it,
> >> or just Warn.
> >
> > In principle -frepo is a nice idea - does it live up to its promises?  That is,
> > does it actually work, for example when throwing it on the libstdc++
> > testsuite or a larger C++ project?
>
> I've just tested tramp3d, and it does not survive linking:
>
> g++ tramp3d-v4.o
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> collect: recompiling tramp3d-v4.cpp
> collect: relinking
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `RefCountedBlockPtr<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > >, false, RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > >::RefCountedBlockPtr(RefCountedBlockPtr<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > >, false, RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > > const&)':
> <artificial>:(.text+0x4181b): undefined reference to `RefCountedPtr<RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > >::RefCountedPtr(RefCountedPtr<RefBlockController<FieldEngineBaseData<3, Vector<3, double, Full>, ViewEngine<3, IndexFunction<GenericURM<MeshTraits<3, double, UniformRectilinearTag, CartesianTag, 3> >::PositionsFunctor> > > > > const&)'
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_impl::~_Vector_impl()':
> <artificial>:(.text+0xc1890): undefined reference to `std::allocator<Node<Range<3>, Interval<3> > >::~allocator()'
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_base()':
> <artificial>:(.text+0xc18aa): undefined reference to `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_Vector_impl::_Vector_impl()'
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::vector<INode<3>, std::allocator<INode<3> > >::_S_use_relocate()':
> <artificial>:(.text+0xc496f): undefined reference to `std::vector<INode<3>, std::allocator<INode<3> > >::_S_nothrow_relocate(std::integral_constant<bool, true>)'
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::~_Vector_base()':
> <artificial>:(.text+0xc4cc1): undefined reference to `std::_Vector_base<Node<Range<3>, Interval<3> >, std::allocator<Node<Range<3>, Interval<3> > > >::_M_deallocate(Node<Range<3>, Interval<3> >*, unsigned long)'
> /usr/lib64/gcc/x86_64-suse-linux/9/../../../../x86_64-suse-linux/bin/ld: /tmp/ccEeuyj7.ltrans0.ltrans.o: in function `DataBlockPtr<double, false>::DataBlockPtr()':
> <artificial>:(.text+0xc6f96): undefined reference to `RefCountedBlockPtr<double, false, DataBlockController<double> >::RefCountedBlockPtr()'
> [... many other undefined references ...]
>
> Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
> apparently 17 is not enough to resolve all symbols. And it's really slow.

Ouch.

> That said, I would recommend to remove it :)

In the end it's up to the C++ FE maintainers but the above clearly
doesn't look promising
(not sure if it keeps re-compiling _all_ repo-triggered templates or
just incrementally adds
them to new object files).

Also the docs suggest that -frepo is the only way to get template
instantiation commoning
if the target object format doesn't support sth like linkonce or
comdats.  Not sure if we need
to care though.  I don't remember any bugs about -frepo in many last
years but that could
be because it's perfect (well, it is not as seen above, but...).

I'm not opposed to removing -frepo from GCC 10 but then I would start
noting it is obsolete
on the GCC 9 branch at least.

Jason/Nathan?

Thanks,
Richard.

> Martin
>
> > The option doesn't document
> > optimization issues but I assume template bodies are not available
> > for IPA optimizations unless -frepo is combined with LTO where the
> > template CU[s] then bring them in.
> >
> > So I'm not sure - do we really want to remove this feature?
> >
> > Richard.
> >
> >>         Jakub
>

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 10:39                             ` Richard Biener
@ 2019-07-09 11:41                               ` Nathan Sidwell
  2019-07-09 13:01                                 ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Nathan Sidwell @ 2019-07-09 11:41 UTC (permalink / raw)
  To: Richard Biener, Martin Liška
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 7/9/19 6:39 AM, Richard Biener wrote:
> On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>

>>
>> Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
>> apparently 17 is not enough to resolve all symbols. And it's really slow.
> 
> Ouch.

hm, 17 is a magic number.  in C++98 it was the maximum depth of template 
instantiations that implementations needed to support.  Portable code 
could not expect more.  So the worst case -frepo behaviour would be 17 
iterations.

That's not true any more, it's been 1024 since C++11.

Has a bug been filed about this frepo problem?  If not, it suggest those 
using frepo are not compiling modern C++.

>> That said, I would recommend to remove it :)
> 
> In the end it's up to the C++ FE maintainers but the above clearly
> doesn't look promising
> (not sure if it keeps re-compiling _all_ repo-triggered templates or
> just incrementally adds
> them to new object files).

> I'm not opposed to removing -frepo from GCC 10 but then I would start
> noting it is obsolete
> on the GCC 9 branch at least.

I concur.  frepo's serial reinvocation of the compiler is not compatible 
with modern C++ code bases.

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 11:41                               ` Nathan Sidwell
@ 2019-07-09 13:01                                 ` Martin Liška
  2019-07-09 17:48                                   ` Nathan Sidwell
  2019-09-04  8:13                                   ` [PATCH] Deprecate -frepo option Martin Liška
  0 siblings, 2 replies; 65+ messages in thread
From: Martin Liška @ 2019-07-09 13:01 UTC (permalink / raw)
  To: Nathan Sidwell, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

[-- Attachment #1: Type: text/plain, Size: 1511 bytes --]

On 7/9/19 1:41 PM, Nathan Sidwell wrote:
> On 7/9/19 6:39 AM, Richard Biener wrote:
>> On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>>
> 
>>>
>>> Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
>>> apparently 17 is not enough to resolve all symbols. And it's really slow.
>>
>> Ouch.
> 
> hm, 17 is a magic number.  in C++98 it was the maximum depth of template instantiations that implementations needed to support.  Portable code could not expect more.  So the worst case -frepo behaviour would be 17 iterations.
> 
> That's not true any more, it's been 1024 since C++11.
> 
> Has a bug been filed about this frepo problem? 

I create a new one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91125

> If not, it suggest those using frepo are not compiling modern C++.
> 
>>> That said, I would recommend to remove it :)
>>
>> In the end it's up to the C++ FE maintainers but the above clearly
>> doesn't look promising
>> (not sure if it keeps re-compiling _all_ repo-triggered templates or
>> just incrementally adds
>> them to new object files).
> 
>> I'm not opposed to removing -frepo from GCC 10 but then I would start
>> noting it is obsolete
>> on the GCC 9 branch at least.
> 
> I concur.  frepo's serial reinvocation of the compiler is not compatible with modern C++ code bases.

Great. Then I'm sending patch that does the functionality removal.

Ready to be installed after proper testing & bootstrap?

Martin

> 
> nathan
> 


[-- Attachment #2: 0001-Remove-support-for-repo-files-PR-c-91125.patch --]
[-- Type: text/x-patch, Size: 70310 bytes --]

From 06a298c3381c204b6ed6cf97b05940ebb8abcbde Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Tue, 9 Jul 2019 14:45:05 +0200
Subject: [PATCH] Remove support for repo files (PR c++/91125).

gcc/ChangeLog:

2019-07-09  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* Makefile.in: Remove tlink.o.
	* collect2.c (do_link): New function isolated
	from do_tlink.
	(main): Use.
	* collect2.h (do_tlink): Remove declaration of do_tlink.
	* doc/extend.texi: Remove documentation of -frepo.
	* doc/invoke.texi: Likewise.
	* doc/sourcebuild.texi: Remove cleanup-repo-files.
	* tlink.c: Remove.

gcc/c-family/ChangeLog:

2019-07-09  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* c-common.c: Remove definition of flag_use_repository.
	* c-common.h: Likewise.
	* c-opts.c (c_common_handle_option):
	Do not handle OPT_frepo option.
	* c.opt: Mark the option with Deprecated.

gcc/cp/ChangeLog:

2019-07-09  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* Make-lang.in: Remove repo.o.
	* config-lang.in: Likewise.
	* cp-tree.h (init_repo): Remove declarations
	of repo-related functions.
	(repo_emit_p): Likewise.
	(repo_export_class_p): Likewise.
	(finish_repo): Likewise.
	* decl2.c (import_export_class): Always
	set -1 value/
	(mark_needed): Remove -frepo from comment.
	(import_export_decl): Similarly here.
	(c_parse_final_cleanups): Remove call of finish_repo.
	* lex.c (cxx_init): Remove call to init_repo.
	* optimize.c (can_alias_cdtor): Remove dead condition.
	* pt.c (push_template_decl_real): Update comment.
	(instantiate_decl): Remove dead code used for -frepo.
	* repo.c: Remove.

gcc/testsuite/ChangeLog:

2019-07-09  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* 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 removal of repo files.
	* lib/gcc-dg.exp: Likewise.
	* lib/obj-c++.exp: Likewise.
---
 gcc/Makefile.in                               |   2 +-
 gcc/c-family/c-common.c                       |   5 -
 gcc/c-family/c-common.h                       |   5 -
 gcc/c-family/c-opts.c                         |   6 -
 gcc/c-family/c.opt                            |   4 +-
 gcc/collect2.c                                |  36 +-
 gcc/collect2.h                                |   4 +-
 gcc/cp/Make-lang.in                           |   2 +-
 gcc/cp/config-lang.in                         |   2 +-
 gcc/cp/cp-tree.h                              |   6 -
 gcc/cp/decl2.c                                |  37 +-
 gcc/cp/lex.c                                  |   2 -
 gcc/cp/optimize.c                             |   3 -
 gcc/cp/pt.c                                   |  18 +-
 gcc/cp/repo.c                                 | 374 --------
 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                     |   6 -
 gcc/testsuite/lib/gcc-dg.exp                  |  26 -
 gcc/testsuite/lib/obj-c++.exp                 |   6 -
 gcc/tlink.c                                   | 867 ------------------
 41 files changed, 43 insertions(+), 1855 deletions(-)
 delete mode 100644 gcc/cp/repo.c
 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
 delete mode 100644 gcc/tlink.c

diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 597dc01328b..99d88a46f1d 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2118,7 +2118,7 @@ gcc-ranlib.c: gcc-ar.c
 gcc-nm.c: gcc-ar.c
 	cp $^ $@
 
-COLLECT2_OBJS = collect2.o collect2-aix.o tlink.o vec.o ggc-none.o \
+COLLECT2_OBJS = collect2.o collect2-aix.o vec.o ggc-none.o \
   collect-utils.o file-find.o hash-table.o selftest.o
 COLLECT2_LIBS = @COLLECT2_LIBS@
 collect2$(exeext): $(COLLECT2_OBJS) $(LIBDEPS)
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index cb92710f2bc..df736775e61 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -249,11 +249,6 @@ const char *constant_string_class_name;
 
 int warn_abi_version = -1;
 
-/* Nonzero means generate separate instantiation control files and
-   juggle them at link time.  */
-
-int flag_use_repository;
-
 /* The C++ dialect being used.  Default set in c_common_post_options.  */
 
 enum cxx_dialect cxx_dialect = cxx_unset;
diff --git a/gcc/c-family/c-common.h b/gcc/c-family/c-common.h
index 5ac6e5eacf9..ca75e031494 100644
--- a/gcc/c-family/c-common.h
+++ b/gcc/c-family/c-common.h
@@ -695,11 +695,6 @@ extern int warn_abi_version;
    != (warn_abi_version == 0			\
        || warn_abi_version >= (N)))
 
-/* Nonzero means generate separate instantiation control files and
-   juggle them at link time.  */
-
-extern int flag_use_repository;
-
 /* The supported C++ dialects.  */
 
 enum cxx_dialect {
diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 188da437507..88c1c32be52 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -501,12 +501,6 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
 	cpp_opts->track_macro_expansion = 2;
       break;
 
-    case OPT_frepo:
-      flag_use_repository = value;
-      if (value)
-	flag_implicit_templates = 0;
-      break;
-
     case OPT_ftabstop_:
       /* It is documented that we silently ignore silly values.  */
       if (value >= 1 && value <= 100)
diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index 4c8b0026000..427c04664e7 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1744,8 +1744,8 @@ 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++
-Enable automatic template instantiation.
+C++ ObjC++ Deprecated
+Deprecated in GCC 10.  This switch has no effect.
 
 frtti
 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
diff --git a/gcc/collect2.c b/gcc/collect2.c
index e25e33962fb..497207281f3 100644
--- a/gcc/collect2.c
+++ b/gcc/collect2.c
@@ -825,6 +825,30 @@ maybe_run_lto_and_relink (char **lto_ld_argv, char **object_lst,
   else
     post_ld_pass (false); /* No LTO objects were found, no temp file.  */
 }
+/* Entry point for linker invoation.  Called from main in collect2.c.
+   LD_ARGV is an array of arguments for the linker.  */
+
+static void
+do_link (char **ld_argv)
+{
+  struct pex_obj *pex;
+  const char *prog = "ld";
+  pex = collect_execute (prog, ld_argv, NULL, NULL,
+			 PEX_LAST | PEX_SEARCH,
+			 HAVE_GNU_LD && at_file_supplied);
+  int ret = collect_wait (prog, pex);
+  if (ret)
+    {
+      error ("ld returned %d exit status", ret);
+      exit (ret);
+    }
+  else
+    {
+      /* We have just successfully produced an output file, so assume that we
+	 may unlink it if need be for now on.  */
+      may_unlink_output_file = true;
+    }
+}
 \f
 /* Main program.  */
 
@@ -1704,7 +1728,7 @@ main (int argc, char **argv)
        functions from precise cross reference insertions by the compiler.  */
 
     if (early_exit || ld1_filter != SCAN_NOTHING)
-      do_tlink (ld1_argv, object_lst);
+      do_link (ld1_argv);
 
     if (early_exit)
       {
@@ -1762,10 +1786,10 @@ main (int argc, char **argv)
 #endif
       )
     {
-      /* Do tlink without additional code generation now if we didn't
+      /* Do link without additional code generation now if we didn't
 	 do it earlier for scanning purposes.  */
       if (ld1_filter == SCAN_NOTHING)
-	do_tlink (ld1_argv, object_lst);
+	do_link (ld1_argv);
 
       if (lto_mode)
         maybe_run_lto_and_relink (ld1_argv, object_lst, object, false);
@@ -1868,13 +1892,13 @@ main (int argc, char **argv)
 
   fork_execute ("gcc",  c_argv, at_file_supplied);
 #ifdef COLLECT_EXPORT_LIST
-  /* On AIX we must call tlink because of possible templates resolution.  */
-  do_tlink (ld2_argv, object_lst);
+  /* On AIX we must call link because of possible templates resolution.  */
+  do_link (ld2_argv);
 
   if (lto_mode)
     maybe_run_lto_and_relink (ld2_argv, object_lst, object, false);
 #else
-  /* Otherwise, simply call ld because tlink is already done.  */
+  /* Otherwise, simply call ld because link is already done.  */
   if (lto_mode)
     maybe_run_lto_and_relink (ld2_argv, object_lst, object, true);
   else
diff --git a/gcc/collect2.h b/gcc/collect2.h
index 34d17c29db7..77bb645e6cd 100644
--- a/gcc/collect2.h
+++ b/gcc/collect2.h
@@ -1,4 +1,4 @@
-/* Header file for collect/tlink routines.
+/* Header file for collect routines.
    Copyright (C) 1998-2019 Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -20,8 +20,6 @@ along with GCC; see the file COPYING3.  If not see
 #ifndef GCC_COLLECT2_H
 #define GCC_COLLECT2_H
 
-extern void do_tlink (char **, char **);
-
 extern struct pex_obj *collect_execute (const char *, char **, const char *,
 					const char *, int flags);
 
diff --git a/gcc/cp/Make-lang.in b/gcc/cp/Make-lang.in
index 8fc1570659e..8430c4c4683 100644
--- a/gcc/cp/Make-lang.in
+++ b/gcc/cp/Make-lang.in
@@ -83,7 +83,7 @@ CXX_AND_OBJCXX_OBJS = \
 	cp/mangle.o cp/method.o \
 	cp/name-lookup.o cp/optimize.o \
 	cp/parser.o cp/pt.o cp/ptree.o \
-	cp/repo.o cp/rtti.o \
+	cp/rtti.o \
 	cp/search.o cp/semantics.o \
 	cp/tree.o cp/typeck.o cp/typeck2.o \
 	cp/vtable-class-hierarchy.o $(CXX_C_OBJS)
diff --git a/gcc/cp/config-lang.in b/gcc/cp/config-lang.in
index 4526d1a5cb4..6e5f04677d6 100644
--- a/gcc/cp/config-lang.in
+++ b/gcc/cp/config-lang.in
@@ -49,7 +49,7 @@ gtfiles="\
 \$(srcdir)/cp/mangle.c \$(srcdir)/cp/method.c \
 \$(srcdir)/cp/name-lookup.c \
 \$(srcdir)/cp/parser.c \$(srcdir)/cp/pt.c \
-\$(srcdir)/cp/repo.c \$(srcdir)/cp/rtti.c \
+\$(srcdir)/cp/rtti.c \
 \$(srcdir)/cp/semantics.c \
 \$(srcdir)/cp/tree.c \$(srcdir)/cp/typeck2.c \
 \$(srcdir)/cp/vtable-class-hierarchy.c \
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index e814bc973f8..6a34fb7e46c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -6880,12 +6880,6 @@ extern bool copy_guide_p			(const_tree);
 extern bool template_guide_p			(const_tree);
 extern void store_explicit_specifier		(tree, tree);
 
-/* in repo.c */
-extern void init_repo				(void);
-extern int repo_emit_p				(tree);
-extern bool repo_export_class_p			(const_tree);
-extern void finish_repo				(void);
-
 /* in rtti.c */
 /* A vector of all tinfo decls that haven't been emitted yet.  */
 extern GTY(()) vec<tree, va_gc> *unemitted_tinfo_decls;
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 3aba194d824..b4e3dc89272 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2071,7 +2071,7 @@ import_export_class (tree ctype)
        repository.  If the virtual table is assigned to this
        translation unit, then export the class; otherwise, import
        it.  */
-      import_export = repo_export_class_p (ctype) ? 1 : -1;
+      import_export = -1;
   else if (TYPE_POLYMORPHIC_P (ctype))
     {
       /* The ABI specifies that the virtual table and associated
@@ -2127,7 +2127,7 @@ mark_needed (tree decl)
       struct cgraph_node *node = cgraph_node::get_create (decl);
       node->forced_by_abi = true;
 
-      /* #pragma interface and -frepo code can call mark_needed for
+      /* #pragma interface can call mark_needed for
           maybe-in-charge 'tors; mark the clones as well.  */
       tree clone;
       FOR_EACH_CLONE (clone, decl)
@@ -2961,7 +2961,6 @@ tentative_decl_linkage (tree decl)
 void
 import_export_decl (tree decl)
 {
-  int emit_p;
   bool comdat_p;
   bool import_p;
   tree class_type = NULL_TREE;
@@ -2972,11 +2971,7 @@ import_export_decl (tree decl)
   /* We cannot determine what linkage to give to an entity with vague
      linkage until the end of the file.  For example, a virtual table
      for a class will be defined if and only if the key method is
-     defined in this translation unit.  As a further example, consider
-     that when compiling a translation unit that uses PCH file with
-     "-frepo" it would be incorrect to make decisions about what
-     entities to emit when building the PCH; those decisions must be
-     delayed until the repository information has been processed.  */
+     defined in this translation unit.  */
   gcc_assert (at_eof);
   /* Object file linkage for explicit instantiations is handled in
      mark_decl_instantiated.  For static variables in functions with
@@ -3022,27 +3017,7 @@ import_export_decl (tree decl)
      unit.  */
   import_p = false;
 
-  /* See if the repository tells us whether or not to emit DECL in
-     this translation unit.  */
-  emit_p = repo_emit_p (decl);
-  if (emit_p == 0)
-    import_p = true;
-  else if (emit_p == 1)
-    {
-      /* The repository indicates that this entity should be defined
-	 here.  Make sure the back end honors that request.  */
-      mark_needed (decl);
-      /* Output the definition as an ordinary strong definition.  */
-      DECL_EXTERNAL (decl) = 0;
-      DECL_INTERFACE_KNOWN (decl) = 1;
-      return;
-    }
-
-  if (import_p)
-    /* We have already decided what to do with this DECL; there is no
-       need to check anything further.  */
-    ;
-  else if (VAR_P (decl) && DECL_VTABLE_OR_VTT_P (decl))
+  if (VAR_P (decl) && DECL_VTABLE_OR_VTT_P (decl))
     {
       class_type = DECL_CONTEXT (decl);
       import_export_class (class_type);
@@ -3148,8 +3123,7 @@ import_export_decl (tree decl)
     {
       /* DECL is an implicit instantiation of a function or static
 	 data member.  */
-      if ((flag_implicit_templates
-	   && !flag_use_repository)
+      if (flag_implicit_templates
 	  || (flag_implicit_inline_templates
 	      && TREE_CODE (decl) == FUNCTION_DECL
 	      && DECL_DECLARED_INLINE_P (decl)))
@@ -5134,7 +5108,6 @@ c_parse_final_cleanups (void)
 
   perform_deferred_noexcept_checks ();
 
-  finish_repo ();
   fini_constexpr ();
 
   /* The entire file is now complete.  If requested, dump everything
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index 5bfb1e51408..acf39330651 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -330,8 +330,6 @@ cxx_init (void)
 
   init_cp_pragma ();
 
-  init_repo ();
-
   input_location = saved_loc;
   return true;
 }
diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c
index 0774857f503..994ee9148c0 100644
--- a/gcc/cp/optimize.c
+++ b/gcc/cp/optimize.c
@@ -223,9 +223,6 @@ can_alias_cdtor (tree fn)
   /* We can't use an alias if there are virtual bases.  */
   if (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (fn)))
     return false;
-  /* ??? Why not use aliases with -frepo?  */
-  if (flag_use_repository)
-    return false;
   gcc_assert (DECL_MAYBE_IN_CHARGE_CDTOR_P (fn));
   /* Don't use aliases for weak/linkonce definitions unless we can put both
      symbols in the same COMDAT group.  */
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index c5161a7782f..017abc32572 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5838,7 +5838,7 @@ push_template_decl_real (tree decl, bool is_friend)
       && TREE_PUBLIC (decl)
       && VAR_OR_FUNCTION_DECL_P (decl))
     /* Set DECL_COMDAT on template instantiations; if we force
-       them to be emitted by explicit instantiation or -frepo,
+       them to be emitted by explicit instantiation,
        mark_needed will tell cgraph to do the right thing.  */
     DECL_COMDAT (decl) = true;
 
@@ -24656,22 +24656,6 @@ instantiate_decl (tree d, bool defer_ok, bool expl_inst_class_mem_p)
 	add_pending_template (d);
       goto out;
     }
-  /* Tell the repository that D is available in this translation unit
-     -- and see if it is supposed to be instantiated here.  */
-  if (TREE_PUBLIC (d) && !DECL_REALLY_EXTERN (d) && !repo_emit_p (d))
-    {
-      /* In a PCH file, despite the fact that the repository hasn't
-	 requested instantiation in the PCH it is still possible that
-	 an instantiation will be required in a file that includes the
-	 PCH.  */
-      if (pch_file)
-	add_pending_template (d);
-      /* Instantiate inline functions so that the inliner can do its
-	 job, even though we'll not be emitting a copy of this
-	 function.  */
-      if (!(TREE_CODE (d) == FUNCTION_DECL && possibly_inlined_p (d)))
-	goto out;
-    }
 
   bool push_to_top, nested;
   tree fn_context;
diff --git a/gcc/cp/repo.c b/gcc/cp/repo.c
deleted file mode 100644
index 4c44a07f40c..00000000000
--- a/gcc/cp/repo.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* Code to maintain a C++ template repository.
-   Copyright (C) 1995-2019 Free Software Foundation, Inc.
-   Contributed by Jason Merrill (jason@cygnus.com)
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-/* My strategy here is as follows:
-
-   Everything should be emitted in a translation unit where it is used.
-   The results of the automatic process should be easily reproducible with
-   explicit code.  */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "cp-tree.h"
-#include "stringpool.h"
-#include "toplev.h"
-
-static const char *extract_string (const char **);
-static const char *get_base_filename (const char *);
-static FILE *open_repo_file (const char *);
-static char *afgets (FILE *);
-static FILE *reopen_repo_file_for_write (void);
-
-static GTY(()) vec<tree, va_gc> *pending_repo;
-static char *repo_name;
-
-static const char *old_args, *old_dir, *old_main;
-
-static struct obstack temporary_obstack;
-static bool temporary_obstack_initialized_p;
-
-/* Parse a reasonable subset of shell quoting syntax.  */
-
-static const char *
-extract_string (const char **pp)
-{
-  const char *p = *pp;
-  int backquote = 0;
-  int inside = 0;
-
-  for (;;)
-    {
-      char c = *p;
-      if (c == '\0')
-	break;
-      ++p;
-      if (backquote)
-	{
-	  obstack_1grow (&temporary_obstack, c);
-	  backquote = 0;
-	}
-      else if (! inside && c == ' ')
-	break;
-      else if (! inside && c == '\\')
-	backquote = 1;
-      else if (c == '\'')
-	inside = !inside;
-      else
-	obstack_1grow (&temporary_obstack, c);
-    }
-
-  obstack_1grow (&temporary_obstack, '\0');
-  *pp = p;
-  return (char *) obstack_finish (&temporary_obstack);
-}
-
-static const char *
-get_base_filename (const char *filename)
-{
-  const char *p = getenv ("COLLECT_GCC_OPTIONS");
-  const char *output = NULL;
-  int compiling = 0;
-
-  while (p && *p)
-    {
-      const char *q = extract_string (&p);
-
-      if (strcmp (q, "-o") == 0)
-	{
-	  if (flag_compare_debug)
-	    /* Just in case aux_base_name was based on a name with two
-	       or more '.'s, add an arbitrary extension that will be
-	       stripped by the caller.  */
-	    output = concat (aux_base_name, ".o", NULL);
-	  else
-	    output = extract_string (&p);
-	}
-      else if (strcmp (q, "-c") == 0)
-	compiling = 1;
-    }
-
-  if (compiling && output)
-    return output;
-
-  if (p && ! compiling)
-    {
-      warning (0, "%<-frepo%> must be used with %<-c%>");
-      flag_use_repository = 0;
-      return NULL;
-    }
-
-  return lbasename (filename);
-}
-
-static FILE *
-open_repo_file (const char *filename)
-{
-  const char *p;
-  const char *s = get_base_filename (filename);
-
-  if (s == NULL)
-    return NULL;
-
-  p = lbasename (s);
-  p = strrchr (p, '.');
-  if (! p)
-    p = s + strlen (s);
-
-  repo_name = XNEWVEC (char, p - s + 5);
-  memcpy (repo_name, s, p - s);
-  memcpy (repo_name + (p - s), ".rpo", 5);
-
-  return fopen (repo_name, "r");
-}
-
-static char *
-afgets (FILE *stream)
-{
-  int c;
-  while ((c = getc (stream)) != EOF && c != '\n')
-    obstack_1grow (&temporary_obstack, c);
-  if (obstack_object_size (&temporary_obstack) == 0)
-    return NULL;
-  obstack_1grow (&temporary_obstack, '\0');
-  return (char *) obstack_finish (&temporary_obstack);
-}
-
-void
-init_repo (void)
-{
-  char *buf;
-  const char *p;
-  FILE *repo_file;
-
-  if (! flag_use_repository)
-    return;
-
-  /* When a PCH file is loaded, the entire identifier table is
-     replaced, with the result that IDENTIFIER_REPO_CHOSEN is cleared.
-     So, we have to reread the repository file.  */
-  lang_post_pch_load = init_repo;
-
-  if (!temporary_obstack_initialized_p)
-    gcc_obstack_init (&temporary_obstack);
-
-  repo_file = open_repo_file (main_input_filename);
-
-  if (repo_file == 0)
-    return;
-
-  while ((buf = afgets (repo_file)))
-    {
-      switch (buf[0])
-	{
-	case 'A':
-	  old_args = ggc_strdup (buf + 2);
-	  break;
-	case 'D':
-	  old_dir = ggc_strdup (buf + 2);
-	  break;
-	case 'M':
-	  old_main = ggc_strdup (buf + 2);
-	  break;
-	case 'O':
-	  /* A symbol that we were able to define the last time this
-	     file was compiled.  */
-	  break;
-	case 'C':
-	  /* A symbol that the prelinker has requested that we
-	     define.  */
-	  {
-	    tree id = get_identifier (buf + 2);
-	    IDENTIFIER_REPO_CHOSEN (id) = 1;
-	  }
-	  break;
-	default:
-	  error ("mysterious repository information in %s", repo_name);
-	}
-      obstack_free (&temporary_obstack, buf);
-    }
-  fclose (repo_file);
-
-  if (old_args && !get_random_seed (true)
-      && (p = strstr (old_args, "'-frandom-seed=")))
-    set_random_seed (extract_string (&p) + strlen ("-frandom-seed="));
-}
-
-static FILE *
-reopen_repo_file_for_write (void)
-{
-  FILE *repo_file = fopen (repo_name, "w");
-
-  if (repo_file == 0)
-    {
-      error ("cannot create repository information file %qs", repo_name);
-      flag_use_repository = 0;
-    }
-
-  return repo_file;
-}
-
-/* Emit any pending repos.  */
-
-void
-finish_repo (void)
-{
-  tree val;
-  char *dir, *args;
-  FILE *repo_file;
-  unsigned ix;
-
-  if (!flag_use_repository || flag_compare_debug)
-    return;
-
-  if (seen_error ())
-    return;
-
-  repo_file = reopen_repo_file_for_write ();
-  if (repo_file == 0)
-    goto out;
-
-  fprintf (repo_file, "M %s\n", main_input_filename);
-  dir = getpwd ();
-  fprintf (repo_file, "D %s\n", dir);
-  args = getenv ("COLLECT_GCC_OPTIONS");
-  if (args)
-    {
-      fprintf (repo_file, "A %s", args);
-      /* If -frandom-seed is not among the ARGS, then add the value
-	 that we chose.  That will ensure that the names of types from
-	 anonymous namespaces will get the same mangling when this
-	 file is recompiled.  */
-      if (!strstr (args, "'-frandom-seed="))
-	fprintf (repo_file, " '-frandom-seed=" HOST_WIDE_INT_PRINT_HEX_PURE "'", 
-		 get_random_seed (false));
-      fprintf (repo_file, "\n");
-    }
-
-  FOR_EACH_VEC_SAFE_ELT_REVERSE (pending_repo, ix, val)
-    {
-      tree name = DECL_ASSEMBLER_NAME (val);
-      char type = IDENTIFIER_REPO_CHOSEN (name) ? 'C' : 'O';
-      fprintf (repo_file, "%c %s\n", type, IDENTIFIER_POINTER (name));
-    }
-
- out:
-  if (repo_file)
-    fclose (repo_file);
-}
-
-/* DECL is a FUNCTION_DECL or VAR_DECL with vague linkage whose
-   definition is available in this translation unit.  Returns 0 if
-   this definition should not be emitted in this translation unit
-   because it will be emitted elsewhere.  Returns 1 if the repository
-   file indicates that that DECL should be emitted in this translation
-   unit, or 2 if the repository file is not in use.  */
-
-int
-repo_emit_p (tree decl)
-{
-  int ret = 0;
-  gcc_assert (TREE_PUBLIC (decl));
-  gcc_assert (VAR_OR_FUNCTION_DECL_P (decl));
-  gcc_assert (!DECL_REALLY_EXTERN (decl)
-	      /* A clone might not have its linkage flags updated yet
-		 because we call import_export_decl before
-		 maybe_clone_body.  */
-	      || DECL_ABSTRACT_ORIGIN (decl));
-
-  /* When not using the repository, emit everything.  */
-  if (!flag_use_repository)
-    return 2;
-
-  /* Only template instantiations are managed by the repository.  This
-     is an artificial restriction; the code in the prelinker and here
-     will work fine if all entities with vague linkage are managed by
-     the repository.  */
-  if (VAR_P (decl))
-    {
-      tree type = NULL_TREE;
-      if (DECL_VTABLE_OR_VTT_P (decl))
-	type = DECL_CONTEXT (decl);
-      else if (DECL_TINFO_P (decl))
-	type = TREE_TYPE (DECL_NAME (decl));
-      if (!DECL_TEMPLATE_INSTANTIATION (decl)
-	  && (!TYPE_LANG_SPECIFIC (type)
-	      || !CLASSTYPE_TEMPLATE_INSTANTIATION (type)))
-	return 2;
-      /* Const static data members initialized by constant expressions must
-	 be processed where needed so that their definitions are
-	 available.  Still record them into *.rpo files, so if they
-	 weren't actually emitted and collect2 requests them, they can
-	 be provided.  */
-      if (decl_maybe_constant_var_p (decl)
-	  && DECL_CLASS_SCOPE_P (decl))
-	ret = 2;
-    }
-  else if (!DECL_TEMPLATE_INSTANTIATION (decl))
-    return 2;
-
-  if (DECL_EXPLICIT_INSTANTIATION (decl))
-    return 2;
-
-  /* For constructors and destructors, the repository contains
-     information about the clones -- not the original function --
-     because only the clones are emitted in the object file.  */
-  if (DECL_MAYBE_IN_CHARGE_CDTOR_P (decl))
-    {
-      int emit_p = 0;
-      tree clone;
-      /* There is no early exit from this loop because we want to
-	 ensure that all of the clones are marked as available in this
-	 object file.  */
-      FOR_EACH_CLONE (clone, decl)
-	/* The only possible results from the recursive call to
-	   repo_emit_p are 0 or 1.  */
-	if (repo_emit_p (clone))
-	  emit_p = 1;
-      return emit_p;
-    }
-
-  /* Keep track of all available entities.  */
-  if (!DECL_REPO_AVAILABLE_P (decl))
-    {
-      DECL_REPO_AVAILABLE_P (decl) = 1;
-      vec_safe_push (pending_repo, decl);
-    }
-
-  return IDENTIFIER_REPO_CHOSEN (DECL_ASSEMBLER_NAME (decl)) ? 1 : ret;
-}
-
-/* Returns true iff the prelinker has explicitly marked CLASS_TYPE for
-   export from this translation unit.  */
-
-bool
-repo_export_class_p (const_tree class_type)
-{
-  if (!flag_use_repository)
-    return false;
-  if (!CLASSTYPE_VTABLES (class_type))
-    return false;
-  /* If the virtual table has been assigned to this translation unit,
-     export the class.  */
-  return (IDENTIFIER_REPO_CHOSEN
-	  (DECL_ASSEMBLER_NAME (CLASSTYPE_VTABLES (class_type))));
-}
-
-#include "gt-cp-repo.h"
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 061607411eb..e92151407fc 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -24488,31 +24488,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 0c20cb6814e..f991070ccad 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -222,7 +222,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
@@ -2729,12 +2729,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 6a665154833..cca5a518571 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -2786,9 +2786,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 <oneill@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 <s3824888@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 <jason@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 <jason@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 <snyder@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..bccabbc84d7 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -317,12 +317,6 @@ proc g++_target_compile { source dest type 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
     # appended here to multilib_flags as it can be overridden by the latter
     # if it was added earlier. After the target_compile, multilib_flags is
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index e23b63cf3d1..6979dc9eb5d 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"
@@ -732,24 +724,6 @@ proc cleanup-coverage-files { } {
     }
 }
 
-# Remove compiler-generated files from -repo for the current test.
-proc cleanup-repo-files { } {
-    global additional_sources_used
-    set testcase [testname-for-summary]
-    # The name might include a list of options; extract the file name.
-    set testcase [lindex $testcase 0]
-    remove-build-file "[file rootname [file tail $testcase]].o"
-    remove-build-file "[file rootname [file tail $testcase]].rpo"
-
-    # Clean up files for additional source files.
-    if [info exists additional_sources_used] {
-	foreach srcfile $additional_sources_used {
-	    remove-build-file "[file rootname [file tail $srcfile]].o"
-	    remove-build-file "[file rootname [file tail $srcfile]].rpo"
-	}
-    }
-}
-
 # Remove a final insns dump file for the current test.
 proc cleanup-final-insns-dump { } {
     set testcase [testname-for-summary]
diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp
index c32f2070f36..7e7bd3cbe65 100644
--- a/gcc/testsuite/lib/obj-c++.exp
+++ b/gcc/testsuite/lib/obj-c++.exp
@@ -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]
diff --git a/gcc/tlink.c b/gcc/tlink.c
deleted file mode 100644
index 485000b5466..00000000000
--- a/gcc/tlink.c
+++ /dev/null
@@ -1,867 +0,0 @@
-/* Scan linker error messages for missing template instantiations and provide
-   them.
-
-   Copyright (C) 1995-2019 Free Software Foundation, Inc.
-   Contributed by Jason Merrill (jason@cygnus.com).
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify it under
-the terms of the GNU General Public License as published by the Free
-Software Foundation; either version 3, or (at your option) any later
-version.
-
-GCC is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY; without even the implied warranty of MERCHANTABILITY or
-FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
-for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "tm.h"
-#include "intl.h"
-#include "obstack.h"
-#include "demangle.h"
-#include "collect2.h"
-#include "collect-utils.h"
-#include "filenames.h"
-#include "diagnostic-core.h"
-
-/* TARGET_64BIT may be defined to use driver specific functionality. */
-#undef TARGET_64BIT
-#define TARGET_64BIT TARGET_64BIT_DEFAULT
-
-#define MAX_ITERATIONS 17
-
-/* Defined in the automatically-generated underscore.c.  */
-extern int prepends_underscore;
-
-static int tlink_verbose;
-
-static char *initial_cwd;
-\f
-/* Hash table boilerplate for working with htab_t.  We have hash tables
-   for symbol names, file names, and demangled symbols.  */
-
-typedef struct symbol_hash_entry
-{
-  const char *key;
-  struct file_hash_entry *file;
-  int chosen;
-  int tweaking;
-  int tweaked;
-} symbol;
-
-typedef struct file_hash_entry
-{
-  const char *key;
-  const char *args;
-  const char *dir;
-  const char *main;
-  int tweaking;
-} file;
-
-typedef const char *str;
-
-typedef struct demangled_hash_entry
-{
-  const char *key;
-  vec<str> mangled;
-} demangled;
-
-/* Hash and comparison functions for these hash tables.  */
-
-static int hash_string_eq (const void *, const void *);
-static hashval_t hash_string_hash (const void *);
-
-static int
-hash_string_eq (const void *s1_p, const void *s2_p)
-{
-  const char *const *s1 = (const char *const *) s1_p;
-  const char *s2 = (const char *) s2_p;
-  return strcmp (*s1, s2) == 0;
-}
-
-static hashval_t
-hash_string_hash (const void *s_p)
-{
-  const char *const *s = (const char *const *) s_p;
-  return (*htab_hash_string) (*s);
-}
-
-static htab_t symbol_table;
-
-static struct symbol_hash_entry * symbol_hash_lookup (const char *, int);
-static struct file_hash_entry * file_hash_lookup (const char *);
-static struct demangled_hash_entry *demangled_hash_lookup (const char *, int);
-static void symbol_push (symbol *);
-static symbol * symbol_pop (void);
-static void file_push (file *);
-static file * file_pop (void);
-static char * frob_extension (const char *, const char *);
-static char * obstack_fgets (FILE *, struct obstack *);
-static char * tfgets (FILE *);
-static char * pfgets (FILE *);
-static void freadsym (FILE *, file *, int);
-static void read_repo_file (file *);
-static void maybe_tweak (char *, file *);
-static int recompile_files (void);
-static int read_repo_files (char **);
-static void demangle_new_symbols (void);
-static int scan_linker_output (const char *);
-
-/* Look up an entry in the symbol hash table.  */
-
-static struct symbol_hash_entry *
-symbol_hash_lookup (const char *string, int create)
-{
-  void **e;
-  e = htab_find_slot_with_hash (symbol_table, string,
-				(*htab_hash_string) (string),
-				create ? INSERT : NO_INSERT);
-  if (e == NULL)
-    return NULL;
-  if (*e == NULL)
-    {
-      struct symbol_hash_entry *v;
-      *e = v = XCNEW (struct symbol_hash_entry);
-      v->key = xstrdup (string);
-    }
-  return (struct symbol_hash_entry *) *e;
-}
-
-static htab_t file_table;
-
-/* Look up an entry in the file hash table.  */
-
-static struct file_hash_entry *
-file_hash_lookup (const char *string)
-{
-  void **e;
-  e = htab_find_slot_with_hash (file_table, string,
-				(*htab_hash_string) (string),
-				INSERT);
-  if (*e == NULL)
-    {
-      struct file_hash_entry *v;
-      *e = v = XCNEW (struct file_hash_entry);
-      v->key = xstrdup (string);
-    }
-  return (struct file_hash_entry *) *e;
-}
-
-static htab_t demangled_table;
-
-/* Look up an entry in the demangled name hash table.  */
-
-static struct demangled_hash_entry *
-demangled_hash_lookup (const char *string, int create)
-{
-  void **e;
-  e = htab_find_slot_with_hash (demangled_table, string,
-				(*htab_hash_string) (string),
-				create ? INSERT : NO_INSERT);
-  if (e == NULL)
-    return NULL;
-  if (*e == NULL)
-    {
-      struct demangled_hash_entry *v;
-      *e = v = XCNEW (struct demangled_hash_entry);
-      v->key = xstrdup (string);
-    }
-  return (struct demangled_hash_entry *) *e;
-}
-\f
-/* Stack code.  */
-
-struct symbol_stack_entry
-{
-  symbol *value;
-  struct symbol_stack_entry *next;
-};
-struct obstack symbol_stack_obstack;
-struct symbol_stack_entry *symbol_stack;
-
-struct file_stack_entry
-{
-  file *value;
-  struct file_stack_entry *next;
-};
-struct obstack file_stack_obstack;
-struct file_stack_entry *file_stack;
-
-static void
-symbol_push (symbol *p)
-{
-  struct symbol_stack_entry *ep
-    = XOBNEW (&symbol_stack_obstack, struct symbol_stack_entry);
-  ep->value = p;
-  ep->next = symbol_stack;
-  symbol_stack = ep;
-}
-
-static symbol *
-symbol_pop (void)
-{
-  struct symbol_stack_entry *ep = symbol_stack;
-  symbol *p;
-  if (ep == NULL)
-    return NULL;
-  p = ep->value;
-  symbol_stack = ep->next;
-  obstack_free (&symbol_stack_obstack, ep);
-  return p;
-}
-
-static void
-file_push (file *p)
-{
-  struct file_stack_entry *ep;
-
-  if (p->tweaking)
-    return;
-
-  ep = XOBNEW (&file_stack_obstack, struct file_stack_entry);
-  ep->value = p;
-  ep->next = file_stack;
-  file_stack = ep;
-  p->tweaking = 1;
-}
-
-static file *
-file_pop (void)
-{
-  struct file_stack_entry *ep = file_stack;
-  file *p;
-  if (ep == NULL)
-    return NULL;
-  p = ep->value;
-  file_stack = ep->next;
-  obstack_free (&file_stack_obstack, ep);
-  p->tweaking = 0;
-  return p;
-}
-\f
-/* Other machinery.  */
-
-/* Initialize the tlink machinery.  Called from do_tlink.  */
-
-static void
-tlink_init (void)
-{
-  const char *p;
-
-  symbol_table = htab_create (500, hash_string_hash, hash_string_eq,
-			      NULL);
-  file_table = htab_create (500, hash_string_hash, hash_string_eq,
-			    NULL);
-  demangled_table = htab_create (500, hash_string_hash, hash_string_eq,
-				 NULL);
-
-  obstack_begin (&symbol_stack_obstack, 0);
-  obstack_begin (&file_stack_obstack, 0);
-
-  p = getenv ("TLINK_VERBOSE");
-  if (p)
-    tlink_verbose = atoi (p);
-  else
-    {
-      tlink_verbose = 1;
-      if (verbose)
-	tlink_verbose = 2;
-      if (debug)
-	tlink_verbose = 3;
-    }
-
-  initial_cwd = getpwd ();
-}
-
-static int
-tlink_execute (const char *prog, char **argv, const char *outname,
-	       const char *errname, bool use_atfile)
-{
-  struct pex_obj *pex;
-
-  pex = collect_execute (prog, argv, outname, errname,
-			 PEX_LAST | PEX_SEARCH, use_atfile);
-  return collect_wait (prog, pex);
-}
-
-static char *
-frob_extension (const char *s, const char *ext)
-{
-  const char *p;
-
-  p = strrchr (lbasename (s), '.');
-  if (! p)
-    p = s + strlen (s);
-
-  obstack_grow (&temporary_obstack, s, p - s);
-  return (char *) obstack_copy0 (&temporary_obstack, ext, strlen (ext));
-}
-
-static char *
-obstack_fgets (FILE *stream, struct obstack *ob)
-{
-  int c;
-  while ((c = getc (stream)) != EOF && c != '\n')
-    obstack_1grow (ob, c);
-  if (obstack_object_size (ob) == 0)
-    return NULL;
-  obstack_1grow (ob, '\0');
-  return XOBFINISH (ob, char *);
-}
-
-static char *
-tfgets (FILE *stream)
-{
-  return obstack_fgets (stream, &temporary_obstack);
-}
-
-static char *
-pfgets (FILE *stream)
-{
-  return xstrdup (tfgets (stream));
-}
-\f
-/* Real tlink code.  */
-
-/* Subroutine of read_repo_file.  We are reading the repo file for file F,
-   which is coming in on STREAM, and the symbol that comes next in STREAM
-   is offered, chosen or provided if CHOSEN is 0, 1 or 2, respectively.
-
-   XXX "provided" is unimplemented, both here and in the compiler.  */
-
-static void
-freadsym (FILE *stream, file *f, int chosen)
-{
-  symbol *sym;
-
-  {
-    const char *name = tfgets (stream);
-    sym = symbol_hash_lookup (name, true);
-  }
-
-  if (sym->file == NULL)
-    {
-      /* We didn't have this symbol already, so we choose this file.  */
-
-      symbol_push (sym);
-      sym->file = f;
-      sym->chosen = chosen;
-    }
-  else if (chosen)
-    {
-      /* We want this file; cast aside any pretender.  */
-
-      if (sym->chosen && sym->file != f)
-	{
-	  if (sym->chosen == 1)
-	    file_push (sym->file);
-	  else
-	    {
-	      file_push (f);
-	      f = sym->file;
-	      chosen = sym->chosen;
-	    }
-	}
-      sym->file = f;
-      sym->chosen = chosen;
-    }
-}
-
-/* Read in the repo file denoted by F, and record all its information.  */
-
-static void
-read_repo_file (file *f)
-{
-  char c;
-  FILE *stream = fopen (f->key, "r");
-
-  if (tlink_verbose >= 2)
-    fprintf (stderr, _("collect: reading %s\n"), f->key);
-
-  while (fscanf (stream, "%c ", &c) == 1)
-    {
-      switch (c)
-	{
-	case 'A':
-	  f->args = pfgets (stream);
-	  break;
-	case 'D':
-	  f->dir = pfgets (stream);
-	  break;
-	case 'M':
-	  f->main = pfgets (stream);
-	  break;
-	case 'P':
-	  freadsym (stream, f, 2);
-	  break;
-	case 'C':
-	  freadsym (stream, f, 1);
-	  break;
-	case 'O':
-	  freadsym (stream, f, 0);
-	  break;
-	}
-      obstack_free (&temporary_obstack, temporary_firstobj);
-    }
-  fclose (stream);
-  if (f->args == NULL)
-    f->args = getenv ("COLLECT_GCC_OPTIONS");
-  if (f->dir == NULL)
-    f->dir = ".";
-}
-
-/* We might want to modify LINE, which is a symbol line from file F.  We do
-   this if either we saw an error message referring to the symbol in
-   question, or we have already allocated the symbol to another file and
-   this one wants to emit it as well.  */
-
-static void
-maybe_tweak (char *line, file *f)
-{
-  symbol *sym = symbol_hash_lookup (line + 2, false);
-
-  if ((sym->file == f && sym->tweaking)
-      || (sym->file != f && line[0] == 'C'))
-    {
-      sym->tweaking = 0;
-      sym->tweaked = 1;
-
-      if (line[0] == 'O')
-	{
-	  line[0] = 'C';
-	  sym->chosen = 1;
-	}
-      else
-	{
-	  line[0] = 'O';
-	  sym->chosen = 0;
-	}
-    }
-}
-
-/* Update the repo files for each of the object files we have adjusted and
-   recompile.  */
-
-static int
-recompile_files (void)
-{
-  file *f;
-
-  putenv (xstrdup ("COMPILER_PATH="));
-  putenv (xstrdup ("LIBRARY_PATH="));
-
-  while ((f = file_pop ()) != NULL)
-    {
-      char *line;
-      const char *p, *q;
-      char **argv;
-      struct obstack arg_stack;
-      FILE *stream = fopen (f->key, "r");
-      const char *const outname = frob_extension (f->key, ".rnw");
-      FILE *output = fopen (outname, "w");
-
-      while ((line = tfgets (stream)) != NULL)
-	{
-	  switch (line[0])
-	    {
-	    case 'C':
-	    case 'O':
-	      maybe_tweak (line, f);
-	    }
-	  fprintf (output, "%s\n", line);
-	}
-      fclose (stream);
-      fclose (output);
-      /* On Windows "rename" returns -1 and sets ERRNO to EACCESS if
-	 the new file name already exists.  Therefore, we explicitly
-	 remove the old file first.  */
-      if (remove (f->key) == -1)
-	fatal_error (input_location,
-		     "removing repository file %qs: %m", f->key);
-      if (rename (outname, f->key) == -1)
-	fatal_error (input_location, "renaming repository file from "
-		     "%qs to %qs: %m", outname, f->key);
-
-      if (!f->args)
-	{
-	  error ("repository file %qs does not contain command-line "
-		 "arguments", f->key);
-	  return 0;
-	}
-
-      /* Build a null-terminated argv array suitable for
-	 tlink_execute().  Manipulate arguments on the arg_stack while
-	 building argv on the temporary_obstack.  */
-
-      obstack_init (&arg_stack);
-      obstack_ptr_grow (&temporary_obstack, c_file_name);
-
-      for (p = f->args; *p != '\0'; p = q + 1)
-	{
-	  /* Arguments are delimited by single-quotes.  Find the
-	     opening quote.  */
-	  p = strchr (p, '\'');
-	  if (!p)
-	    goto done;
-
-	  /* Find the closing quote.  */
-	  q = strchr (p + 1, '\'');
-	  if (!q)
-	    goto done;
-
-	  obstack_grow (&arg_stack, p + 1, q - (p + 1));
-
-	  /* Replace '\'' with '.  This is how set_collect_gcc_options
-	     encodes a single-quote.  */
-	  while (q[1] == '\\' && q[2] == '\'' && q[3] == '\'')
-	    {
-	      const char *r;
-
-	      r = strchr (q + 4, '\'');
-	      if (!r)
-		goto done;
-
-	      obstack_grow (&arg_stack, q + 3, r - (q + 3));
-	      q = r;
-	    }
-
-	  obstack_1grow (&arg_stack, '\0');
-	  obstack_ptr_grow (&temporary_obstack, obstack_finish (&arg_stack));
-	}
-    done:
-      obstack_ptr_grow (&temporary_obstack, f->main);
-      obstack_ptr_grow (&temporary_obstack, NULL);
-      argv = XOBFINISH (&temporary_obstack, char **);
-
-      if (tlink_verbose)
-	fprintf (stderr, _("collect: recompiling %s\n"), f->main);
-
-      if (chdir (f->dir) != 0
-	  || tlink_execute (c_file_name, argv, NULL, NULL, false) != 0
-	  || chdir (initial_cwd) != 0)
-	return 0;
-
-      read_repo_file (f);
-
-      obstack_free (&arg_stack, NULL);
-      obstack_free (&temporary_obstack, temporary_firstobj);
-    }
-  return 1;
-}
-
-/* The first phase of processing: determine which object files have
-   .rpo files associated with them, and read in the information.  */
-
-static int
-read_repo_files (char **object_lst)
-{
-  char **object = object_lst;
-
-  for (; *object; object++)
-    {
-      const char *p;
-      file *f;
-
-      /* Don't bother trying for ld flags.  */
-      if (*object[0] == '-')
-	continue;
-
-      p = frob_extension (*object, ".rpo");
-
-      if (! file_exists (p))
-	continue;
-
-      f = file_hash_lookup (p);
-
-      read_repo_file (f);
-    }
-
-  if (file_stack != NULL && ! recompile_files ())
-    return 0;
-
-  return (symbol_stack != NULL);
-}
-
-/* Add the demangled forms of any new symbols to the hash table.  */
-
-static void
-demangle_new_symbols (void)
-{
-  symbol *sym;
-
-  while ((sym = symbol_pop ()) != NULL)
-    {
-      demangled *dem;
-      const char *p = cplus_demangle (sym->key, DMGL_PARAMS | DMGL_ANSI);
-
-      if (! p)
-	continue;
-
-      dem = demangled_hash_lookup (p, true);
-      dem->mangled.safe_push (sym->key);
-    }
-}
-
-/* We want to tweak symbol SYM.  Return true if all is well, false on
-   error.  */
-
-static bool
-start_tweaking (symbol *sym)
-{
-  if (sym && sym->tweaked)
-    {
-      error ("%qs was assigned to %qs, but was not defined "
-	     "during recompilation, or vice versa",
-	     sym->key, sym->file->key);
-      return 0;
-    }
-  if (sym && !sym->tweaking)
-    {
-      if (tlink_verbose >= 2)
-	fprintf (stderr, _("collect: tweaking %s in %s\n"),
-		 sym->key, sym->file->key);
-      sym->tweaking = 1;
-      file_push (sym->file);
-    }
-  return true;
-}
-
-/* Step through the output of the linker, in the file named FNAME, and
-   adjust the settings for each symbol encountered.  */
-
-static int
-scan_linker_output (const char *fname)
-{
-  FILE *stream = fopen (fname, "r");
-  char *line;
-  int skip_next_in_line = 0;
-
-  while ((line = tfgets (stream)) != NULL)
-    {
-      char *p = line, *q;
-      symbol *sym;
-      demangled *dem = 0;
-      int end;
-      int ok = 0;
-      unsigned ix;
-      str s;
-
-      /* On darwin9, we might have to skip " in " lines as well.  */
-      if (skip_next_in_line
-	  && strstr (p, " in "))
-	  continue;
-      skip_next_in_line = 0;
-
-      while (*p && ISSPACE ((unsigned char) *p))
-	++p;
-
-      if (! *p)
-	continue;
-
-      for (q = p; *q && ! ISSPACE ((unsigned char) *q); ++q)
-	;
-
-      /* Try the first word on the line.  */
-      if (*p == '.')
-	++p;
-      if (!strncmp (p, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)))
-	p += strlen (USER_LABEL_PREFIX);
-
-      end = ! *q;
-      *q = 0;
-      sym = symbol_hash_lookup (p, false);
-
-      /* Some SVR4 linkers produce messages like
-	 ld: 0711-317 ERROR: Undefined symbol: .g__t3foo1Zi
-	 */
-      if (! sym && ! end && strstr (q + 1, "Undefined symbol: "))
-	{
-	  char *p = strrchr (q + 1, ' ');
-	  p++;
-	  if (*p == '.')
-	    p++;
-	  if (!strncmp (p, USER_LABEL_PREFIX, strlen (USER_LABEL_PREFIX)))
-	    p += strlen (USER_LABEL_PREFIX);
-	  sym = symbol_hash_lookup (p, false);
-	}
-
-      if (! sym && ! end)
-	/* Try a mangled name in quotes.  */
-	{
-	  char *oldq = q + 1;
-	  q = 0;
-
-	  /* On darwin9, we look for "foo" referenced from:\n\(.* in .*\n\)*  */
-	  if (strcmp (oldq, "referenced from:") == 0)
-	    {
-	      /* We have to remember that we found a symbol to tweak.  */
-	      ok = 1;
-
-	      /* We actually want to start from the first word on the
-		 line.  */
-	      oldq = p;
-
-	      /* Since the format is multiline, we have to skip
-		 following lines with " in ".  */
-	      skip_next_in_line = 1;
-	    }
-
-	  /* First try `GNU style'.  */
-	  p = strchr (oldq, '`');
-	  if (p)
-	    p++, q = strchr (p, '\'');
-	  /* Then try "double quotes".  */
-	  else if (p = strchr (oldq, '"'), p)
-	    p++, q = strchr (p, '"');
-	  /* Then try 'single quotes'.  */
-	  else if (p = strchr (oldq, '\''), p)
-	    p++, q = strchr (p, '\'');
-	  else {
-	    /* Then try entire line.  */
-	    q = strchr (oldq, 0);
-	    if (q != oldq)
-	      p = (char *)oldq;
-	  }
-
-	  if (p)
-	    {
-	      /* Don't let the strstr's below see the demangled name; we
-		 might get spurious matches.  */
-	      p[-1] = '\0';
-
-	      /* powerpc64-linux references .foo when calling function foo.  */
-	      if (*p == '.')
-		p++;
-	    }
-
-	  /* We need to check for certain error keywords here, or we would
-	     mistakenly use GNU ld's "In function `foo':" message.  */
-	  if (q && (ok
-		    || strstr (oldq, "ndefined")
-		    || strstr (oldq, "nresolved")
-		    || strstr (oldq, "nsatisfied")
-		    || strstr (oldq, "ultiple")))
-	    {
-	      *q = 0;
-	      dem = demangled_hash_lookup (p, false);
-	      if (!dem)
-		{
-		  if (!strncmp (p, USER_LABEL_PREFIX,
-				strlen (USER_LABEL_PREFIX)))
-		    p += strlen (USER_LABEL_PREFIX);
-		  sym = symbol_hash_lookup (p, false);
-		}
-	    }
-	}
-
-      if (dem)
-	{
-	  /* We found a demangled name.  If this is the name of a
-	     constructor or destructor, there can be several mangled names
-	     that match it, so choose or unchoose all of them.  If some are
-	     chosen and some not, leave the later ones that don't match
-	     alone for now; either this will cause the link to succeed, or
-	     on the next attempt we will switch all of them the other way
-	     and that will cause it to succeed.  */
-	  int chosen = 0;
-	  int len = dem->mangled.length ();
-	  ok = true;
-	  FOR_EACH_VEC_ELT (dem->mangled, ix, s)
-	    {
-	      sym = symbol_hash_lookup (s, false);
-	      if (ix == 0)
-		chosen = sym->chosen;
-	      else if (sym->chosen != chosen)
-		/* Mismatch.  */
-		continue;
-	      /* Avoid an error about re-tweaking when we guess wrong in
-		 the case of mismatch.  */
-	      if (len > 1)
-		sym->tweaked = false;
-	      ok = start_tweaking (sym);
-	    }
-	}
-      else
-	ok = start_tweaking (sym);
-
-      obstack_free (&temporary_obstack, temporary_firstobj);
-
-      if (!ok)
-	{
-	  fclose (stream);
-	  return 0;
-	}
-    }
-
-  fclose (stream);
-  return (file_stack != NULL);
-}
-
-/* Entry point for tlink.  Called from main in collect2.c.
-
-   Iteratively try to provide definitions for all the unresolved symbols
-   mentioned in the linker error messages.
-
-   LD_ARGV is an array of arguments for the linker.
-   OBJECT_LST is an array of object files that we may be able to recompile
-     to provide missing definitions.  Currently ignored.  */
-
-void
-do_tlink (char **ld_argv, char **object_lst ATTRIBUTE_UNUSED)
-{
-  int ret = tlink_execute ("ld", ld_argv, ldout, lderrout,
-			   HAVE_GNU_LD && at_file_supplied);
-
-  tlink_init ();
-
-  if (ret)
-    {
-      int i = 0;
-
-      /* Until collect does a better job of figuring out which are object
-	 files, assume that everything on the command line could be.  */
-      if (read_repo_files (ld_argv))
-	while (ret && i++ < MAX_ITERATIONS)
-	  {
-	    if (tlink_verbose >= 3)
-	      {
-		dump_ld_file (ldout, stdout);
-		dump_ld_file (lderrout, stderr);
-	      }
-	    demangle_new_symbols ();
-	    if (! scan_linker_output (ldout)
-		&& ! scan_linker_output (lderrout))
-	      break;
-	    if (! recompile_files ())
-	      break;
-	    if (tlink_verbose)
-	      fprintf (stderr, _("collect: relinking\n"));
-	    ret = tlink_execute ("ld", ld_argv, ldout, lderrout,
-				 HAVE_GNU_LD && at_file_supplied);
-	  }
-    }
-
-  dump_ld_file (ldout, stdout);
-  unlink (ldout);
-  dump_ld_file (lderrout, stderr);
-  unlink (lderrout);
-  if (ret)
-    {
-      error ("ld returned %d exit status", ret);
-      exit (ret);
-    }
-  else
-    {
-      /* We have just successfully produced an output file, so assume that we
-	 may unlink it if need be for now on.  */ 
-      may_unlink_output_file = true;
-    }
-}
-- 
2.22.0


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 13:01                                 ` Martin Liška
@ 2019-07-09 17:48                                   ` Nathan Sidwell
  2019-07-09 21:14                                     ` Jason Merrill
  2019-09-04  8:13                                   ` [PATCH] Deprecate -frepo option Martin Liška
  1 sibling, 1 reply; 65+ messages in thread
From: Nathan Sidwell @ 2019-07-09 17:48 UTC (permalink / raw)
  To: Martin Liška, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 7/9/19 9:00 AM, Martin Liška wrote:
> On 7/9/19 1:41 PM, Nathan Sidwell wrote:
>> On 7/9/19 6:39 AM, Richard Biener wrote:
>>> On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>>>
>>
>>>>
>>>> Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
>>>> apparently 17 is not enough to resolve all symbols. And it's really slow.
>>>
>>> Ouch.
>>
>> hm, 17 is a magic number.  in C++98 it was the maximum depth of template instantiations that implementations needed to support.  Portable code could not expect more.  So the worst case -frepo behaviour would be 17 iterations.
>>
>> That's not true any more, it's been 1024 since C++11.
>>
>> Has a bug been filed about this frepo problem?
> 
> I create a new one:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91125
> 
>> If not, it suggest those using frepo are not compiling modern C++.
>>
>>>> That said, I would recommend to remove it :)
>>>
>>> In the end it's up to the C++ FE maintainers but the above clearly
>>> doesn't look promising
>>> (not sure if it keeps re-compiling _all_ repo-triggered templates or
>>> just incrementally adds
>>> them to new object files).
>>
>>> I'm not opposed to removing -frepo from GCC 10 but then I would start
>>> noting it is obsolete
>>> on the GCC 9 branch at least.
>>
>> I concur.  frepo's serial reinvocation of the compiler is not compatible with modern C++ code bases.
> 
> Great. Then I'm sending patch that does the functionality removal.
> 
> Ready to be installed after proper testing & bootstrap?

I'd like Jason to render an opinion, and we should mark it obsolete in 
the gcc 9 branch (how much runway would that give people?)

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 17:48                                   ` Nathan Sidwell
@ 2019-07-09 21:14                                     ` Jason Merrill
  2019-07-10 11:28                                       ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jason Merrill @ 2019-07-09 21:14 UTC (permalink / raw)
  To: Nathan Sidwell, Martin Liška, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches

On 7/9/19 1:48 PM, Nathan Sidwell wrote:
> On 7/9/19 9:00 AM, Martin Liška wrote:
>> On 7/9/19 1:41 PM, Nathan Sidwell wrote:
>>> On 7/9/19 6:39 AM, Richard Biener wrote:
>>>> On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>>>>
>>>
>>>>>
>>>>> Same happens also for GCC7. It does 17 iteration (#define 
>>>>> MAX_ITERATIONS 17) and
>>>>> apparently 17 is not enough to resolve all symbols. And it's really 
>>>>> slow.
>>>>
>>>> Ouch.
>>>
>>> hm, 17 is a magic number.  in C++98 it was the maximum depth of 
>>> template instantiations that implementations needed to support.  
>>> Portable code could not expect more.  So the worst case -frepo 
>>> behaviour would be 17 iterations.
>>>
>>> That's not true any more, it's been 1024 since C++11.
>>>
>>> Has a bug been filed about this frepo problem?
>>
>> I create a new one:
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91125
>>
>>> If not, it suggest those using frepo are not compiling modern C++.
>>>
>>>>> That said, I would recommend to remove it :)
>>>>
>>>> In the end it's up to the C++ FE maintainers but the above clearly
>>>> doesn't look promising
>>>> (not sure if it keeps re-compiling _all_ repo-triggered templates or
>>>> just incrementally adds
>>>> them to new object files).
>>>
>>>> I'm not opposed to removing -frepo from GCC 10 but then I would start
>>>> noting it is obsolete
>>>> on the GCC 9 branch at least.
>>>
>>> I concur.  frepo's serial reinvocation of the compiler is not 
>>> compatible with modern C++ code bases.
>>
>> Great. Then I'm sending patch that does the functionality removal.
>>
>> Ready to be installed after proper testing & bootstrap?
> 
> I'd like Jason to render an opinion, and we should mark it obsolete in 
> the gcc 9 branch (how much runway would that give people?)

I haven't noticed any responses to my earlier question: Are there any 
targets without COMDAT support that we still care about?

But given the observation above about the 17 limit, even if there are 
such targets it wouldn't be very useful for modern code.  And if people 
want to compile old code for old platforms, they might as well continue 
to use an old compiler.

So I'm OK with deprecating with a warning for the next GCC 9 release, to 
see if anyone complains, and removing in 10.

Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 21:14                                     ` Jason Merrill
@ 2019-07-10 11:28                                       ` Martin Liška
  2019-07-10 12:48                                         ` Nathan Sidwell
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-07-10 11:28 UTC (permalink / raw)
  To: Jason Merrill, Nathan Sidwell, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 2532 bytes --]

On 7/9/19 11:14 PM, Jason Merrill wrote:
> On 7/9/19 1:48 PM, Nathan Sidwell wrote:
>> On 7/9/19 9:00 AM, Martin Liška wrote:
>>> On 7/9/19 1:41 PM, Nathan Sidwell wrote:
>>>> On 7/9/19 6:39 AM, Richard Biener wrote:
>>>>> On Mon, Jul 8, 2019 at 2:04 PM Martin Liška <mliska@suse.cz> wrote:
>>>>>>
>>>>
>>>>>>
>>>>>> Same happens also for GCC7. It does 17 iteration (#define MAX_ITERATIONS 17) and
>>>>>> apparently 17 is not enough to resolve all symbols. And it's really slow.
>>>>>
>>>>> Ouch.
>>>>
>>>> hm, 17 is a magic number.  in C++98 it was the maximum depth of template instantiations that implementations needed to support.  Portable code could not expect more.  So the worst case -frepo behaviour would be 17 iterations.
>>>>
>>>> That's not true any more, it's been 1024 since C++11.
>>>>
>>>> Has a bug been filed about this frepo problem?
>>>
>>> I create a new one:
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91125
>>>
>>>> If not, it suggest those using frepo are not compiling modern C++.
>>>>
>>>>>> That said, I would recommend to remove it :)
>>>>>
>>>>> In the end it's up to the C++ FE maintainers but the above clearly
>>>>> doesn't look promising
>>>>> (not sure if it keeps re-compiling _all_ repo-triggered templates or
>>>>> just incrementally adds
>>>>> them to new object files).
>>>>
>>>>> I'm not opposed to removing -frepo from GCC 10 but then I would start
>>>>> noting it is obsolete
>>>>> on the GCC 9 branch at least.
>>>>
>>>> I concur.  frepo's serial reinvocation of the compiler is not compatible with modern C++ code bases.
>>>
>>> Great. Then I'm sending patch that does the functionality removal.
>>>
>>> Ready to be installed after proper testing & bootstrap?
>>
>> I'd like Jason to render an opinion, and we should mark it obsolete in the gcc 9 branch (how much runway would that give people?)
> 
> I haven't noticed any responses to my earlier question: Are there any targets without COMDAT support that we still care about?
> 
> But given the observation above about the 17 limit, even if there are such targets it wouldn't be very useful for modern code.  And if people want to compile old code for old platforms, they might as well continue to use an old compiler.
> 
> So I'm OK with deprecating with a warning for the next GCC 9 release, to see if anyone complains, and removing in 10.

Great, thank you.

There's a patch for deprecating of the option in GCC 9 changes.

May I install the patch right now or should I wait?

Thanks,
Martin

> 
> Jason


[-- Attachment #2: deprecate-frepo-in-9-changes.patch --]
[-- Type: text/x-patch, Size: 544 bytes --]

diff --git a/htdocs/gcc-9/changes.html b/htdocs/gcc-9/changes.html
index bf9f6db..bec4754 100644
--- a/htdocs/gcc-9/changes.html
+++ b/htdocs/gcc-9/changes.html
@@ -57,6 +57,11 @@ You may also want to check out our
       announcement</a>.</li>
     </ul>
   </li>
+  <li>
+      The automatic template instantiation at link time (<a href="https://gcc.gnu.org/onlinedocs/gcc-9.1.0/gcc/C_002b_002b-Dialect-Options.html#index-frepo"><code>-frepo</code></a>) has been deprecated and
+    will be removed in a future release.
+  </li>
+
 </ul>
 
 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-10 11:28                                       ` Martin Liška
@ 2019-07-10 12:48                                         ` Nathan Sidwell
  2019-07-10 12:53                                           ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Nathan Sidwell @ 2019-07-10 12:48 UTC (permalink / raw)
  To: Martin Liška, Jason Merrill, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches

On 7/10/19 7:28 AM, Martin Liška wrote:

> Great, thank you.
> 
> There's a patch for deprecating of the option in GCC 9 changes.
> 
> May I install the patch right now or should I wait?
>

I think there needs to be a code patch so that use of the option gives a 
warning.

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-10 12:48                                         ` Nathan Sidwell
@ 2019-07-10 12:53                                           ` Martin Liška
  2019-07-10 12:56                                             ` Nathan Sidwell
  2019-07-10 12:58                                             ` Jakub Jelinek
  0 siblings, 2 replies; 65+ messages in thread
From: Martin Liška @ 2019-07-10 12:53 UTC (permalink / raw)
  To: Nathan Sidwell, Jason Merrill, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches

On 7/10/19 2:48 PM, Nathan Sidwell wrote:
> On 7/10/19 7:28 AM, Martin Liška wrote:
> 
>> Great, thank you.
>>
>> There's a patch for deprecating of the option in GCC 9 changes.
>>
>> May I install the patch right now or should I wait?
>>
> 
> I think there needs to be a code patch so that use of the option gives a warning.
> 
> nathan
> 
That's done by 'Deprecated' keyword put on frepo in *.opt file:

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

I've already used the same mechanism for other deprecated options e.g.:

$ ./gcc/xgcc -Bgcc -mmpx /tmp/main.c
xgcc: warning: switch ‘-mmpx’ is no longer supported

Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-10 12:53                                           ` Martin Liška
@ 2019-07-10 12:56                                             ` Nathan Sidwell
  2019-07-10 12:58                                             ` Jakub Jelinek
  1 sibling, 0 replies; 65+ messages in thread
From: Nathan Sidwell @ 2019-07-10 12:56 UTC (permalink / raw)
  To: Martin Liška, Jason Merrill, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches

On 7/10/19 8:53 AM, Martin Liška wrote:

>> nathan
>>
> That's done by 'Deprecated' keyword put on frepo in *.opt file:
> 
> $ ./gcc/xgcc -Bgcc -frepo /tmp/main.c
> xgcc: warning: switch ‘-frepo’ is no longer supported
> 
> I've already used the same mechanism for other deprecated options e.g.:
> 
> $ ./gcc/xgcc -Bgcc -mmpx /tmp/main.c
> xgcc: warning: switch ‘-mmpx’ is no longer supported

Great!  I must have missed that patch.  All good to go for gcc-9 deprecation

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-10 12:53                                           ` Martin Liška
  2019-07-10 12:56                                             ` Nathan Sidwell
@ 2019-07-10 12:58                                             ` Jakub Jelinek
  2019-07-11  6:48                                               ` [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125) Martin Liška
  1 sibling, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-07-10 12:58 UTC (permalink / raw)
  To: Martin Liška
  Cc: Nathan Sidwell, Jason Merrill, Richard Biener, Jonathan Wakely,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches

On Wed, Jul 10, 2019 at 02:53:35PM +0200, Martin Liška wrote:
> On 7/10/19 2:48 PM, Nathan Sidwell wrote:
> > On 7/10/19 7:28 AM, Martin Liška wrote:
> > 
> >> Great, thank you.
> >>
> >> There's a patch for deprecating of the option in GCC 9 changes.
> >>
> >> May I install the patch right now or should I wait?
> >>
> > 
> > I think there needs to be a code patch so that use of the option gives a warning.
> > 
> > nathan
> > 
> That's done by 'Deprecated' keyword put on frepo in *.opt file:
> 
> $ ./gcc/xgcc -Bgcc -frepo /tmp/main.c
> xgcc: warning: switch ‘-frepo’ is no longer supported
> 
> I've already used the same mechanism for other deprecated options e.g.:
> 
> $ ./gcc/xgcc -Bgcc -mmpx /tmp/main.c
> xgcc: warning: switch ‘-mmpx’ is no longer supported

That doesn't seem to be correct for GCC 9 and -frepo though, the option will
be still supported, but deprecated and to be removed in the next release.
I think the Deprecated *.opt keyword is misnamed.

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).
  2019-07-10 12:58                                             ` Jakub Jelinek
@ 2019-07-11  6:48                                               ` Martin Liška
  2019-07-11  7:02                                                 ` Jakub Jelinek
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-07-11  6:48 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Nathan Sidwell, Jason Merrill, Richard Biener, Jonathan Wakely,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 196 bytes --]

Hi.

This is a patch for GCC9 branch that warns when a user
tries to use the option.

Patch can bootstrap on x86_64-linux-gnu and survives regression tests.

Ready to be installed?
Thanks,
Martin

[-- Attachment #2: 0001-Deprecate-frepo-on-gcc-9-branch-PR-c-91125.patch --]
[-- Type: text/x-patch, Size: 12875 bytes --]

From 6dcfb47ca7f7674c2913ba45e85f11426311bb4e Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 10 Jul 2019 15:20:28 +0200
Subject: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).

gcc/c-family/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* c-opts.c (c_common_handle_option): Warn the -frepo
	will be removed in the future.

gcc/testsuite/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* g++.dg/parse/repo1.C: Add scan for the new warning.
	* g++.dg/rtti/repo1.C: Likewise.
	* g++.dg/template/repo1.C: Likewise.
	* g++.dg/template/repo10.C: Likewise.
	* g++.dg/template/repo11.C: Likewise.
	* g++.dg/template/repo2.C: Likewise.
	* g++.dg/template/repo3.C: Likewise.
	* g++.dg/template/repo4.C: Likewise.
	* g++.dg/template/repo5.C: Likewise.
	* g++.dg/template/repo6.C: Likewise.
	* g++.dg/template/repo7.C: Likewise.
	* g++.dg/template/repo8.C: Likewise.
	* g++.dg/template/repo9.C: Likewise.
	* g++.old-deja/g++.pt/instantiate4.C: Likewise.
	* g++.old-deja/g++.pt/instantiate6.C: Likewise.
	* g++.old-deja/g++.pt/repo1.C: Likewise.
	* g++.old-deja/g++.pt/repo2.C: Likewise.
	* g++.old-deja/g++.pt/repo3.C: Likewise.
	* g++.old-deja/g++.pt/repo4.C: Likewise.
---
 gcc/c-family/c-opts.c                            | 2 ++
 gcc/testsuite/g++.dg/parse/repo1.C               | 1 +
 gcc/testsuite/g++.dg/rtti/repo1.C                | 1 +
 gcc/testsuite/g++.dg/template/repo1.C            | 1 +
 gcc/testsuite/g++.dg/template/repo10.C           | 1 +
 gcc/testsuite/g++.dg/template/repo11.C           | 1 +
 gcc/testsuite/g++.dg/template/repo2.C            | 1 +
 gcc/testsuite/g++.dg/template/repo3.C            | 1 +
 gcc/testsuite/g++.dg/template/repo4.C            | 1 +
 gcc/testsuite/g++.dg/template/repo5.C            | 1 +
 gcc/testsuite/g++.dg/template/repo6.C            | 1 +
 gcc/testsuite/g++.dg/template/repo7.C            | 1 +
 gcc/testsuite/g++.dg/template/repo8.C            | 1 +
 gcc/testsuite/g++.dg/template/repo9.C            | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo1.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo2.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo3.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo4.C        | 1 +
 20 files changed, 21 insertions(+)

diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 454cfa0ee3e..d0ea93af57e 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
       flag_use_repository = value;
       if (value)
 	flag_implicit_templates = 0;
+      warning (0, "%<-frepo%> is deprecated and will be removed "
+	       "in a future release");
       break;
 
     case OPT_ftabstop_:
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
index efadd58723e..dacf59a494b 100644
--- a/gcc/testsuite/g++.dg/parse/repo1.C
+++ b/gcc/testsuite/g++.dg/parse/repo1.C
@@ -1,5 +1,6 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 extern "C" inline void f() {}
 
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
index f72a9730ab9..36a8f086763 100644
--- a/gcc/testsuite/g++.dg/rtti/repo1.C
+++ b/gcc/testsuite/g++.dg/rtti/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 #include <typeinfo>
 template<int>
diff --git a/gcc/testsuite/g++.dg/template/repo1.C b/gcc/testsuite/g++.dg/template/repo1.C
index 342993eca14..fe18c467cf4 100644
--- a/gcc/testsuite/g++.dg/template/repo1.C
+++ b/gcc/testsuite/g++.dg/template/repo1.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A {
   A();
diff --git a/gcc/testsuite/g++.dg/template/repo10.C b/gcc/testsuite/g++.dg/template/repo10.C
index c92f7a52b60..42497a2810a 100644
--- a/gcc/testsuite/g++.dg/template/repo10.C
+++ b/gcc/testsuite/g++.dg/template/repo10.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 struct Foo
diff --git a/gcc/testsuite/g++.dg/template/repo11.C b/gcc/testsuite/g++.dg/template/repo11.C
index 5cabfd452ed..54edad05f9e 100644
--- a/gcc/testsuite/g++.dg/template/repo11.C
+++ b/gcc/testsuite/g++.dg/template/repo11.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename H> struct J { J(H) {} };
 template <unsigned long, typename...> struct K;
diff --git a/gcc/testsuite/g++.dg/template/repo2.C b/gcc/testsuite/g++.dg/template/repo2.C
index e3224155e97..8e875ede03f 100644
--- a/gcc/testsuite/g++.dg/template/repo2.C
+++ b/gcc/testsuite/g++.dg/template/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <int __inst>
 struct __Atomicity_lock
diff --git a/gcc/testsuite/g++.dg/template/repo3.C b/gcc/testsuite/g++.dg/template/repo3.C
index cfa38a9e435..365bb285e4e 100644
--- a/gcc/testsuite/g++.dg/template/repo3.C
+++ b/gcc/testsuite/g++.dg/template/repo3.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo -DF='a'" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename A, typename B> void f () {}
 template <typename A, typename B> void g () { f<int,int>(); }
diff --git a/gcc/testsuite/g++.dg/template/repo4.C b/gcc/testsuite/g++.dg/template/repo4.C
index 64882a8c694..5a2ccd800fc 100644
--- a/gcc/testsuite/g++.dg/template/repo4.C
+++ b/gcc/testsuite/g++.dg/template/repo4.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 namespace { 
   struct Foo {}; 
diff --git a/gcc/testsuite/g++.dg/template/repo5.C b/gcc/testsuite/g++.dg/template/repo5.C
index e45ade7df48..527cf961adb 100644
--- a/gcc/testsuite/g++.dg/template/repo5.C
+++ b/gcc/testsuite/g++.dg/template/repo5.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template< typename T, T N > struct integral_c {
   static const T value = N;
diff --git a/gcc/testsuite/g++.dg/template/repo6.C b/gcc/testsuite/g++.dg/template/repo6.C
index 4b7178e2ad3..4778313eb59 100644
--- a/gcc/testsuite/g++.dg/template/repo6.C
+++ b/gcc/testsuite/g++.dg/template/repo6.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 class A
diff --git a/gcc/testsuite/g++.dg/template/repo7.C b/gcc/testsuite/g++.dg/template/repo7.C
index dafb3f5597c..15af3476d10 100644
--- a/gcc/testsuite/g++.dg/template/repo7.C
+++ b/gcc/testsuite/g++.dg/template/repo7.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
index c51592c9349..96d34993b0a 100644
--- a/gcc/testsuite/g++.dg/template/repo8.C
+++ b/gcc/testsuite/g++.dg/template/repo8.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
index 7ddc6bf56d3..69e3ee474d4 100644
--- a/gcc/testsuite/g++.dg/template/repo9.C
+++ b/gcc/testsuite/g++.dg/template/repo9.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename C> struct A
 {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
index d7a8cab31c5..97838689d38 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo -Werror" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-error "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 
 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
index 6726b216673..2c7eb2cc7eb 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
index bdfe306b4ad..57b2dafc614 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Bug: g++ complains about duplicate explicit instantiations with -frepo.
 // From Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
index a8d8b1217a1..1b96155f9b3 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
 // Contributed by Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
index 2f62139660e..69b765fdf2a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that we properly generate the vtable and such for C.
 // Contributed by scott snyder <snyder@fnal.gov>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
index 84575cd9469..c239a409255 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <class T>
 struct S {
-- 
2.22.0


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).
  2019-07-11  6:48                                               ` [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125) Martin Liška
@ 2019-07-11  7:02                                                 ` Jakub Jelinek
  2019-07-11 17:26                                                   ` Jason Merrill
  0 siblings, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-07-11  7:02 UTC (permalink / raw)
  To: Martin Liška
  Cc: Nathan Sidwell, Jason Merrill, Richard Biener, Jonathan Wakely,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches

On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote:
> --- a/gcc/c-family/c-opts.c
> +++ b/gcc/c-family/c-opts.c
> @@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
>        flag_use_repository = value;
>        if (value)
>  	flag_implicit_templates = 0;
> +      warning (0, "%<-frepo%> is deprecated and will be removed "
> +	       "in a future release");
>        break;

Maybe just warn when value is true, or do we want to warn for -fno-repo too?

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).
  2019-07-11  7:02                                                 ` Jakub Jelinek
@ 2019-07-11 17:26                                                   ` Jason Merrill
  2019-07-12 12:44                                                     ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jason Merrill @ 2019-07-11 17:26 UTC (permalink / raw)
  To: Jakub Jelinek, Martin Liška
  Cc: Nathan Sidwell, Richard Biener, Jonathan Wakely, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches

On 7/11/19 3:02 AM, Jakub Jelinek wrote:
> On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote:
>> --- a/gcc/c-family/c-opts.c
>> +++ b/gcc/c-family/c-opts.c
>> @@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
>>         flag_use_repository = value;
>>         if (value)
>>   	flag_implicit_templates = 0;
>> +      warning (0, "%<-frepo%> is deprecated and will be removed "
>> +	       "in a future release");
>>         break;

Is there a reason not to condition this on OPT_Wdeprecated (which 
defaults to on)?

Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).
  2019-07-11 17:26                                                   ` Jason Merrill
@ 2019-07-12 12:44                                                     ` Martin Liška
  2019-07-12 14:25                                                       ` Jason Merrill
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-07-12 12:44 UTC (permalink / raw)
  To: Jason Merrill, Jakub Jelinek
  Cc: Nathan Sidwell, Richard Biener, Jonathan Wakely, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches

[-- Attachment #1: Type: text/plain, Size: 870 bytes --]

On 7/11/19 7:25 PM, Jason Merrill wrote:
> On 7/11/19 3:02 AM, Jakub Jelinek wrote:
>> On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote:
>>> --- a/gcc/c-family/c-opts.c
>>> +++ b/gcc/c-family/c-opts.c
>>> @@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
>>>         flag_use_repository = value;
>>>         if (value)
>>>       flag_implicit_templates = 0;
>>> +      warning (0, "%<-frepo%> is deprecated and will be removed "
>>> +           "in a future release");
>>>         break;
> 
> Is there a reason not to condition this on OPT_Wdeprecated (which defaults to on)?
> 
> Jason
> 

Works for me.
I'm sending updated version of the patch.

Ready for gcc9 branch?
Thanks,
Martin

[-- Attachment #2: 0001-Deprecate-frepo-on-gcc-9-branch-PR-c-91125.patch --]
[-- Type: text/x-patch, Size: 12965 bytes --]

From 5831c94a026794dc21ccbdbd8ea7a2732e3f3741 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Wed, 10 Jul 2019 15:20:28 +0200
Subject: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).

gcc/c-family/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* c-opts.c (c_common_handle_option): Warn the -frepo
	will be removed in the future.

gcc/testsuite/ChangeLog:

2019-07-10  Martin Liska  <mliska@suse.cz>

	PR c++/91125
	* g++.dg/parse/repo1.C: Add scan for the new warning.
	* g++.dg/rtti/repo1.C: Likewise.
	* g++.dg/template/repo1.C: Likewise.
	* g++.dg/template/repo10.C: Likewise.
	* g++.dg/template/repo11.C: Likewise.
	* g++.dg/template/repo2.C: Likewise.
	* g++.dg/template/repo3.C: Likewise.
	* g++.dg/template/repo4.C: Likewise.
	* g++.dg/template/repo5.C: Likewise.
	* g++.dg/template/repo6.C: Likewise.
	* g++.dg/template/repo7.C: Likewise.
	* g++.dg/template/repo8.C: Likewise.
	* g++.dg/template/repo9.C: Likewise.
	* g++.old-deja/g++.pt/instantiate4.C: Likewise.
	* g++.old-deja/g++.pt/instantiate6.C: Likewise.
	* g++.old-deja/g++.pt/repo1.C: Likewise.
	* g++.old-deja/g++.pt/repo2.C: Likewise.
	* g++.old-deja/g++.pt/repo3.C: Likewise.
	* g++.old-deja/g++.pt/repo4.C: Likewise.
---
 gcc/c-family/c-opts.c                            | 6 +++++-
 gcc/testsuite/g++.dg/parse/repo1.C               | 1 +
 gcc/testsuite/g++.dg/rtti/repo1.C                | 1 +
 gcc/testsuite/g++.dg/template/repo1.C            | 1 +
 gcc/testsuite/g++.dg/template/repo10.C           | 1 +
 gcc/testsuite/g++.dg/template/repo11.C           | 1 +
 gcc/testsuite/g++.dg/template/repo2.C            | 1 +
 gcc/testsuite/g++.dg/template/repo3.C            | 1 +
 gcc/testsuite/g++.dg/template/repo4.C            | 1 +
 gcc/testsuite/g++.dg/template/repo5.C            | 1 +
 gcc/testsuite/g++.dg/template/repo6.C            | 1 +
 gcc/testsuite/g++.dg/template/repo7.C            | 1 +
 gcc/testsuite/g++.dg/template/repo8.C            | 1 +
 gcc/testsuite/g++.dg/template/repo9.C            | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo1.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo2.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo3.C        | 1 +
 gcc/testsuite/g++.old-deja/g++.pt/repo4.C        | 1 +
 20 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/gcc/c-family/c-opts.c b/gcc/c-family/c-opts.c
index 454cfa0ee3e..51ac3916fe6 100644
--- a/gcc/c-family/c-opts.c
+++ b/gcc/c-family/c-opts.c
@@ -500,7 +500,11 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
     case OPT_frepo:
       flag_use_repository = value;
       if (value)
-	flag_implicit_templates = 0;
+	{
+	  flag_implicit_templates = 0;
+	  warning (OPT_Wdeprecated, "%<-frepo%> is deprecated and will "
+		   "be removed in a future release");
+	}
       break;
 
     case OPT_ftabstop_:
diff --git a/gcc/testsuite/g++.dg/parse/repo1.C b/gcc/testsuite/g++.dg/parse/repo1.C
index efadd58723e..dacf59a494b 100644
--- a/gcc/testsuite/g++.dg/parse/repo1.C
+++ b/gcc/testsuite/g++.dg/parse/repo1.C
@@ -1,5 +1,6 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 extern "C" inline void f() {}
 
diff --git a/gcc/testsuite/g++.dg/rtti/repo1.C b/gcc/testsuite/g++.dg/rtti/repo1.C
index f72a9730ab9..36a8f086763 100644
--- a/gcc/testsuite/g++.dg/rtti/repo1.C
+++ b/gcc/testsuite/g++.dg/rtti/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 #include <typeinfo>
 template<int>
diff --git a/gcc/testsuite/g++.dg/template/repo1.C b/gcc/testsuite/g++.dg/template/repo1.C
index 342993eca14..fe18c467cf4 100644
--- a/gcc/testsuite/g++.dg/template/repo1.C
+++ b/gcc/testsuite/g++.dg/template/repo1.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A {
   A();
diff --git a/gcc/testsuite/g++.dg/template/repo10.C b/gcc/testsuite/g++.dg/template/repo10.C
index c92f7a52b60..42497a2810a 100644
--- a/gcc/testsuite/g++.dg/template/repo10.C
+++ b/gcc/testsuite/g++.dg/template/repo10.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 struct Foo
diff --git a/gcc/testsuite/g++.dg/template/repo11.C b/gcc/testsuite/g++.dg/template/repo11.C
index 5cabfd452ed..54edad05f9e 100644
--- a/gcc/testsuite/g++.dg/template/repo11.C
+++ b/gcc/testsuite/g++.dg/template/repo11.C
@@ -3,6 +3,7 @@
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
 // { dg-final cleanup-repo-files }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename H> struct J { J(H) {} };
 template <unsigned long, typename...> struct K;
diff --git a/gcc/testsuite/g++.dg/template/repo2.C b/gcc/testsuite/g++.dg/template/repo2.C
index e3224155e97..8e875ede03f 100644
--- a/gcc/testsuite/g++.dg/template/repo2.C
+++ b/gcc/testsuite/g++.dg/template/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <int __inst>
 struct __Atomicity_lock
diff --git a/gcc/testsuite/g++.dg/template/repo3.C b/gcc/testsuite/g++.dg/template/repo3.C
index cfa38a9e435..365bb285e4e 100644
--- a/gcc/testsuite/g++.dg/template/repo3.C
+++ b/gcc/testsuite/g++.dg/template/repo3.C
@@ -1,6 +1,7 @@
 // { dg-options "-frepo -DF='a'" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename A, typename B> void f () {}
 template <typename A, typename B> void g () { f<int,int>(); }
diff --git a/gcc/testsuite/g++.dg/template/repo4.C b/gcc/testsuite/g++.dg/template/repo4.C
index 64882a8c694..5a2ccd800fc 100644
--- a/gcc/testsuite/g++.dg/template/repo4.C
+++ b/gcc/testsuite/g++.dg/template/repo4.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 namespace { 
   struct Foo {}; 
diff --git a/gcc/testsuite/g++.dg/template/repo5.C b/gcc/testsuite/g++.dg/template/repo5.C
index e45ade7df48..527cf961adb 100644
--- a/gcc/testsuite/g++.dg/template/repo5.C
+++ b/gcc/testsuite/g++.dg/template/repo5.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template< typename T, T N > struct integral_c {
   static const T value = N;
diff --git a/gcc/testsuite/g++.dg/template/repo6.C b/gcc/testsuite/g++.dg/template/repo6.C
index 4b7178e2ad3..4778313eb59 100644
--- a/gcc/testsuite/g++.dg/template/repo6.C
+++ b/gcc/testsuite/g++.dg/template/repo6.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template<typename T>
 class A
diff --git a/gcc/testsuite/g++.dg/template/repo7.C b/gcc/testsuite/g++.dg/template/repo7.C
index dafb3f5597c..15af3476d10 100644
--- a/gcc/testsuite/g++.dg/template/repo7.C
+++ b/gcc/testsuite/g++.dg/template/repo7.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo8.C b/gcc/testsuite/g++.dg/template/repo8.C
index c51592c9349..96d34993b0a 100644
--- a/gcc/testsuite/g++.dg/template/repo8.C
+++ b/gcc/testsuite/g++.dg/template/repo8.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 struct A
 {
diff --git a/gcc/testsuite/g++.dg/template/repo9.C b/gcc/testsuite/g++.dg/template/repo9.C
index 7ddc6bf56d3..69e3ee474d4 100644
--- a/gcc/testsuite/g++.dg/template/repo9.C
+++ b/gcc/testsuite/g++.dg/template/repo9.C
@@ -3,6 +3,7 @@
 // { dg-final { cleanup-repo-files } }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <typename C> struct A
 {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
index d7a8cab31c5..97838689d38 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo -Werror" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-error "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 
 // Submitted by Melissa O'Neill <oneill@cs.sfu.ca>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
index 6726b216673..2c7eb2cc7eb 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/instantiate6.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Simplified from testcase by Erez Louidor Lior <s3824888@techst02.technion.ac.il>
 
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
index bdfe306b4ad..57b2dafc614 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo1.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Bug: g++ complains about duplicate explicit instantiations with -frepo.
 // From Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
index a8d8b1217a1..1b96155f9b3 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo2.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that collect2 isn't confused by GNU ld's "In function `foo':" message.
 // Contributed by Jason Merrill <jason@cygnus.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
index 2f62139660e..69b765fdf2a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo3.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 // Test that we properly generate the vtable and such for C.
 // Contributed by scott snyder <snyder@fnal.gov>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
index 84575cd9469..c239a409255 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/repo4.C
@@ -2,6 +2,7 @@
 // { dg-options "-frepo" }
 // { dg-require-host-local "" }
 // { dg-skip-if "dkms are not final links" { vxworks_kernel } }
+// { dg-warning "is deprecated and will be removed in a future release" "" { target *-*-* } 0 }
 
 template <class T>
 struct S {
-- 
2.22.0


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125).
  2019-07-12 12:44                                                     ` Martin Liška
@ 2019-07-12 14:25                                                       ` Jason Merrill
  0 siblings, 0 replies; 65+ messages in thread
From: Jason Merrill @ 2019-07-12 14:25 UTC (permalink / raw)
  To: Martin Liška, Jakub Jelinek
  Cc: Nathan Sidwell, Richard Biener, Jonathan Wakely, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches

On 7/12/19 8:44 AM, Martin Liška wrote:
> On 7/11/19 7:25 PM, Jason Merrill wrote:
>> On 7/11/19 3:02 AM, Jakub Jelinek wrote:
>>> On Thu, Jul 11, 2019 at 08:48:52AM +0200, Martin Liška wrote:
>>>> --- a/gcc/c-family/c-opts.c
>>>> +++ b/gcc/c-family/c-opts.c
>>>> @@ -501,6 +501,8 @@ c_common_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
>>>>          flag_use_repository = value;
>>>>          if (value)
>>>>        flag_implicit_templates = 0;
>>>> +      warning (0, "%<-frepo%> is deprecated and will be removed "
>>>> +           "in a future release");
>>>>          break;
>>
>> Is there a reason not to condition this on OPT_Wdeprecated (which defaults to on)?
> 
> Works for me.
> I'm sending updated version of the patch.
> 
> Ready for gcc9 branch?

LGTM.

Jason

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-07-09 13:01                                 ` Martin Liška
  2019-07-09 17:48                                   ` Nathan Sidwell
@ 2019-09-04  8:13                                   ` Martin Liška
  2019-09-04  9:22                                     ` Jonathan Wakely
  1 sibling, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-04  8:13 UTC (permalink / raw)
  To: Nathan Sidwell, Richard Biener
  Cc: Jakub Jelinek, Jonathan Wakely, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 7/9/19 3:00 PM, Martin Liška wrote:
> Great. Then I'm sending patch that does the functionality removal.

Hi.

The GCC 9.2.0 is released and the version contains a deprecation
warning for -frepo.

Is it the right time now to remove it from trunk?
Thanks,
Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-04  8:13                                   ` [PATCH] Deprecate -frepo option Martin Liška
@ 2019-09-04  9:22                                     ` Jonathan Wakely
  2019-09-04 11:20                                       ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-09-04  9:22 UTC (permalink / raw)
  To: Martin Liška
  Cc: Nathan Sidwell, Richard Biener, Jakub Jelinek, Iain Sandoe, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On Wed, 4 Sep 2019 at 09:13, Martin Liška wrote:
>
> On 7/9/19 3:00 PM, Martin Liška wrote:
> > Great. Then I'm sending patch that does the functionality removal.
>
> Hi.
>
> The GCC 9.2.0 is released and the version contains a deprecation
> warning for -frepo.
>
> Is it the right time now to remove it from trunk?

If users upgrade to 9.2 in 6 months, see the new warning, and tell us
they're using the feature, will it be possible to re-enable it?

The point of the warning was to see if users complain. Three weeks
isn't a very long time to see if users are going to complain :-)

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-04  9:22                                     ` Jonathan Wakely
@ 2019-09-04 11:20                                       ` Martin Liška
  2019-09-04 12:57                                         ` Nathan Sidwell
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-04 11:20 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Nathan Sidwell, Richard Biener, Jakub Jelinek, Iain Sandoe, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On 9/4/19 11:22 AM, Jonathan Wakely wrote:
> On Wed, 4 Sep 2019 at 09:13, Martin Liška wrote:
>>
>> On 7/9/19 3:00 PM, Martin Liška wrote:
>>> Great. Then I'm sending patch that does the functionality removal.
>>
>> Hi.
>>
>> The GCC 9.2.0 is released and the version contains a deprecation
>> warning for -frepo.
>>
>> Is it the right time now to remove it from trunk?
> 
> If users upgrade to 9.2 in 6 months, see the new warning, and tell us
> they're using the feature, will it be possible to re-enable it?

Sure, we'll just revert the patch.

> 
> The point of the warning was to see if users complain. Three weeks
> isn't a very long time to see if users are going to complain :-)
> 

I see :) That said, I'm going to install the patch close to the end
of stage1.

Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-04 11:20                                       ` Martin Liška
@ 2019-09-04 12:57                                         ` Nathan Sidwell
  2019-09-05 10:01                                           ` Richard Biener
  0 siblings, 1 reply; 65+ messages in thread
From: Nathan Sidwell @ 2019-09-04 12:57 UTC (permalink / raw)
  To: Martin Liška, Jonathan Wakely
  Cc: Richard Biener, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/4/19 7:20 AM, Martin Liška wrote:
> On 9/4/19 11:22 AM, Jonathan Wakely wrote:


>> The point of the warning was to see if users complain. Three weeks
>> isn't a very long time to see if users are going to complain :-)
>>
> 
> I see :) That said, I'm going to install the patch close to the end
> of stage1.

I think it'd be ok to install it during stage3 (perhaps early feb?). 
More chance of people speaking up.

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-04 12:57                                         ` Nathan Sidwell
@ 2019-09-05 10:01                                           ` Richard Biener
  2019-09-05 10:03                                             ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-09-05 10:01 UTC (permalink / raw)
  To: Nathan Sidwell
  Cc: Martin Liška, Jonathan Wakely, Jakub Jelinek, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On Wed, Sep 4, 2019 at 2:57 PM Nathan Sidwell <nathan@acm.org> wrote:
>
> On 9/4/19 7:20 AM, Martin Liška wrote:
> > On 9/4/19 11:22 AM, Jonathan Wakely wrote:
>
>
> >> The point of the warning was to see if users complain. Three weeks
> >> isn't a very long time to see if users are going to complain :-)
> >>
> >
> > I see :) That said, I'm going to install the patch close to the end
> > of stage1.
>
> I think it'd be ok to install it during stage3 (perhaps early feb?).
> More chance of people speaking up.

I just checked and trunk doesn't spit out a warning for me so this
needs people to use 9.2+ to notice.

Richard.

> nathan
>
> --
> Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 10:01                                           ` Richard Biener
@ 2019-09-05 10:03                                             ` Martin Liška
  2019-09-05 11:02                                               ` Nathan Sidwell
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-05 10:03 UTC (permalink / raw)
  To: Richard Biener, Nathan Sidwell
  Cc: Jonathan Wakely, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/5/19 12:01 PM, Richard Biener wrote:
> On Wed, Sep 4, 2019 at 2:57 PM Nathan Sidwell <nathan@acm.org> wrote:
>>
>> On 9/4/19 7:20 AM, Martin Liška wrote:
>>> On 9/4/19 11:22 AM, Jonathan Wakely wrote:
>>
>>
>>>> The point of the warning was to see if users complain. Three weeks
>>>> isn't a very long time to see if users are going to complain :-)
>>>>
>>>
>>> I see :) That said, I'm going to install the patch close to the end
>>> of stage1.
>>
>> I think it'd be ok to install it during stage3 (perhaps early feb?).
>> More chance of people speaking up.
> 
> I just checked and trunk doesn't spit out a warning for me so this
> needs people to use 9.2+ to notice.

Yep, it's intentional. Only GCC 9 branch prints the warning:

$ gcc-9 -frepo main.cpp
cc1plus: warning: ‘-frepo’ is deprecated and will be removed in a future release [-Wdeprecated]

As we plan to remove it for trunk, it does not make sense to print the warning for trunk.

Martin

> 
> Richard.
> 
>> nathan
>>
>> --
>> Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 10:03                                             ` Martin Liška
@ 2019-09-05 11:02                                               ` Nathan Sidwell
  2019-09-05 11:09                                                 ` Richard Biener
  0 siblings, 1 reply; 65+ messages in thread
From: Nathan Sidwell @ 2019-09-05 11:02 UTC (permalink / raw)
  To: Martin Liška, Richard Biener
  Cc: Jonathan Wakely, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/5/19 6:03 AM, Martin Liška wrote:
> On 9/5/19 12:01 PM, Richard Biener wrote:
>> On Wed, Sep 4, 2019 at 2:57 PM Nathan Sidwell <nathan@acm.org> wrote:
>>>
>>> On 9/4/19 7:20 AM, Martin Liška wrote:
>>>> On 9/4/19 11:22 AM, Jonathan Wakely wrote:
>>>
>>>
>>>>> The point of the warning was to see if users complain. Three weeks
>>>>> isn't a very long time to see if users are going to complain :-)
>>>>>
>>>>
>>>> I see :) That said, I'm going to install the patch close to the end
>>>> of stage1.
>>>
>>> I think it'd be ok to install it during stage3 (perhaps early feb?).
>>> More chance of people speaking up.
>>
>> I just checked and trunk doesn't spit out a warning for me so this
>> needs people to use 9.2+ to notice.
> 
> Yep, it's intentional. Only GCC 9 branch prints the warning:
> 
> $ gcc-9 -frepo main.cpp
> cc1plus: warning: ‘-frepo’ is deprecated and will be removed in a future release [-Wdeprecated]
> 
> As we plan to remove it for trunk, it does not make sense to print the warning for trunk.

IMHO it very much makes sense for trunk to warn.

old-gcc:  deprecated
trunk: not deprectated
conclusion: it is no longer deprecated

nathan

-- 
Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 11:02                                               ` Nathan Sidwell
@ 2019-09-05 11:09                                                 ` Richard Biener
  2019-09-05 11:22                                                   ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-09-05 11:09 UTC (permalink / raw)
  To: Nathan Sidwell
  Cc: Martin Liška, Jonathan Wakely, Jakub Jelinek, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On Thu, Sep 5, 2019 at 1:02 PM Nathan Sidwell <nathan@acm.org> wrote:
>
> On 9/5/19 6:03 AM, Martin Liška wrote:
> > On 9/5/19 12:01 PM, Richard Biener wrote:
> >> On Wed, Sep 4, 2019 at 2:57 PM Nathan Sidwell <nathan@acm.org> wrote:
> >>>
> >>> On 9/4/19 7:20 AM, Martin Liška wrote:
> >>>> On 9/4/19 11:22 AM, Jonathan Wakely wrote:
> >>>
> >>>
> >>>>> The point of the warning was to see if users complain. Three weeks
> >>>>> isn't a very long time to see if users are going to complain :-)
> >>>>>
> >>>>
> >>>> I see :) That said, I'm going to install the patch close to the end
> >>>> of stage1.
> >>>
> >>> I think it'd be ok to install it during stage3 (perhaps early feb?).
> >>> More chance of people speaking up.
> >>
> >> I just checked and trunk doesn't spit out a warning for me so this
> >> needs people to use 9.2+ to notice.
> >
> > Yep, it's intentional. Only GCC 9 branch prints the warning:
> >
> > $ gcc-9 -frepo main.cpp
> > cc1plus: warning: ‘-frepo’ is deprecated and will be removed in a future release [-Wdeprecated]
> >
> > As we plan to remove it for trunk, it does not make sense to print the warning for trunk.
>
> IMHO it very much makes sense for trunk to warn.
>
> old-gcc:  deprecated
> trunk: not deprectated
> conclusion: it is no longer deprecated

Once we remove -frepo it will be an option we simply ignore - correct?  Then
people won't notice it isn't used anymore (unless it fixes the build
for them...).

OTOH we figured -frepo is broken beyond repair so unless somebody steps
up to actually _fix_ its issues I'm not sure what we should do when some
people come around and say they use the option?

So, let's just remove it now?

Richard.

> nathan
>
> --
> Nathan Sidwell

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 11:09                                                 ` Richard Biener
@ 2019-09-05 11:22                                                   ` Martin Liška
  2019-09-05 12:06                                                     ` Jonathan Wakely
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-05 11:22 UTC (permalink / raw)
  To: Richard Biener, Nathan Sidwell
  Cc: Jonathan Wakely, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/5/19 1:09 PM, Richard Biener wrote:
> So, let's just remove it now?

I'm all for that. May I install the patch?

Martin

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 11:22                                                   ` Martin Liška
@ 2019-09-05 12:06                                                     ` Jonathan Wakely
  2019-09-05 12:31                                                       ` Richard Biener
  0 siblings, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-09-05 12:06 UTC (permalink / raw)
  To: Martin Liška
  Cc: Richard Biener, Nathan Sidwell, Jakub Jelinek, Iain Sandoe, gcc,
	David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On Thu, 5 Sep 2019 at 12:21, Martin Liška <mliska@suse.cz> wrote:
>
> On 9/5/19 1:09 PM, Richard Biener wrote:
> > So, let's just remove it now?
>
> I'm all for that. May I install the patch?

To be clear, I wasn't objecting to installing the patch now, just
asking whether it would be possible to revert it later if needed. If
installing it is a prerequisite for major changes that will happen
soon, then reverting it would be difficult. If that's not the case, it
seems fine to remove -frepo now.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 12:06                                                     ` Jonathan Wakely
@ 2019-09-05 12:31                                                       ` Richard Biener
  2019-09-05 12:51                                                         ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Richard Biener @ 2019-09-05 12:31 UTC (permalink / raw)
  To: Jonathan Wakely
  Cc: Martin Liška, Nathan Sidwell, Jakub Jelinek, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On Thu, Sep 5, 2019 at 2:06 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>
> On Thu, 5 Sep 2019 at 12:21, Martin Liška <mliska@suse.cz> wrote:
> >
> > On 9/5/19 1:09 PM, Richard Biener wrote:
> > > So, let's just remove it now?
> >
> > I'm all for that. May I install the patch?
>
> To be clear, I wasn't objecting to installing the patch now, just
> asking whether it would be possible to revert it later if needed. If
> installing it is a prerequisite for major changes that will happen
> soon, then reverting it would be difficult. If that's not the case, it
> seems fine to remove -frepo now.

Since -frepo is broken and the way it works cannot be fixed for
modern C++ code-bases there's no point in preserving it, no?
Maybe I misunderstood people though.

Richard.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 12:31                                                       ` Richard Biener
@ 2019-09-05 12:51                                                         ` Martin Liška
  2019-09-06  6:58                                                           ` Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-05 12:51 UTC (permalink / raw)
  To: Richard Biener, Jonathan Wakely
  Cc: Nathan Sidwell, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/5/19 2:31 PM, Richard Biener wrote:
> On Thu, Sep 5, 2019 at 2:06 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>
>> On Thu, 5 Sep 2019 at 12:21, Martin Liška <mliska@suse.cz> wrote:
>>>
>>> On 9/5/19 1:09 PM, Richard Biener wrote:
>>>> So, let's just remove it now?
>>>
>>> I'm all for that. May I install the patch?
>>
>> To be clear, I wasn't objecting to installing the patch now, just
>> asking whether it would be possible to revert it later if needed. If
>> installing it is a prerequisite for major changes that will happen
>> soon, then reverting it would be difficult. If that's not the case, it
>> seems fine to remove -frepo now.

No, I'm not planning to work any changes that will depend on the removal.

> 
> Since -frepo is broken and the way it works cannot be fixed for
> modern C++ code-bases there's no point in preserving it, no?

You are right how I do understand that.

That said, I hope the community is fine that I'll install the patch?

Martin

> Maybe I misunderstood people though.
> 
> Richard.
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-05 12:51                                                         ` Martin Liška
@ 2019-09-06  6:58                                                           ` Martin Liška
  2019-09-06 14:48                                                             ` Marek Polacek
  0 siblings, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-06  6:58 UTC (permalink / raw)
  To: Richard Biener, Jonathan Wakely
  Cc: Nathan Sidwell, Jakub Jelinek, Iain Sandoe, gcc, David Edelsohn,
	Jan Hubicka, GCC Patches, Jason Merrill

On 9/5/19 2:51 PM, Martin Liška wrote:
> On 9/5/19 2:31 PM, Richard Biener wrote:
>> On Thu, Sep 5, 2019 at 2:06 PM Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
>>>
>>> On Thu, 5 Sep 2019 at 12:21, Martin Liška <mliska@suse.cz> wrote:
>>>>
>>>> On 9/5/19 1:09 PM, Richard Biener wrote:
>>>>> So, let's just remove it now?
>>>>
>>>> I'm all for that. May I install the patch?
>>>
>>> To be clear, I wasn't objecting to installing the patch now, just
>>> asking whether it would be possible to revert it later if needed. If
>>> installing it is a prerequisite for major changes that will happen
>>> soon, then reverting it would be difficult. If that's not the case, it
>>> seems fine to remove -frepo now.
> 
> No, I'm not planning to work any changes that will depend on the removal.
> 
>>
>> Since -frepo is broken and the way it works cannot be fixed for
>> modern C++ code-bases there's no point in preserving it, no?
> 
> You are right how I do understand that.
> 
> That said, I hope the community is fine that I'll install the patch?

Ok, hopefully nobody is strongly against. I've just retested the
patch and installed it as r275450.

Martin

> 
> Martin
> 
>> Maybe I misunderstood people though.
>>
>> Richard.
>>
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-06  6:58                                                           ` Martin Liška
@ 2019-09-06 14:48                                                             ` Marek Polacek
  2019-09-06 14:56                                                               ` Jakub Jelinek
  0 siblings, 1 reply; 65+ messages in thread
From: Marek Polacek @ 2019-09-06 14:48 UTC (permalink / raw)
  To: Martin Liška
  Cc: Richard Biener, Jonathan Wakely, Nathan Sidwell, Jakub Jelinek,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
> Ok, hopefully nobody is strongly against. I've just retested the
> patch and installed it as r275450.

--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -1763,8 +1763,8 @@ 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++
-Enable automatic template instantiation.
+C++ ObjC++ Deprecated
+Deprecated in GCC 10.  This switch has no effect.

But it's not just deprecated, it's removed now, so shouldn't this be Ignored?

Also, https://gcc.gnu.org/gcc-10/changes.html should be updated, both in
Caveats and the C++ section.  But I can do that.

Marek

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-06 14:48                                                             ` Marek Polacek
@ 2019-09-06 14:56                                                               ` Jakub Jelinek
  2019-09-06 16:03                                                                 ` Martin Liška
  2019-09-09 11:02                                                                 ` Martin Liška
  0 siblings, 2 replies; 65+ messages in thread
From: Jakub Jelinek @ 2019-09-06 14:56 UTC (permalink / raw)
  To: Marek Polacek
  Cc: Martin Liška, Richard Biener, Jonathan Wakely,
	Nathan Sidwell, Iain Sandoe, gcc, David Edelsohn, Jan Hubicka,
	GCC Patches, Jason Merrill

On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
> > Ok, hopefully nobody is strongly against. I've just retested the
> > patch and installed it as r275450.
> 
> --- a/gcc/c-family/c.opt
> +++ b/gcc/c-family/c.opt
> @@ -1763,8 +1763,8 @@ 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++
> -Enable automatic template instantiation.
> +C++ ObjC++ Deprecated
> +Deprecated in GCC 10.  This switch has no effect.

The Deprecated keyword is just misnamed, I believe it does the same thing as
Ignore, except that it also prints a warning that the switch is no longer
supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).
The description should be just This switch has no effect. or
Does nothing.  Preserved for backward compatibility.

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-06 14:56                                                               ` Jakub Jelinek
@ 2019-09-06 16:03                                                                 ` Martin Liška
  2019-09-09 11:02                                                                 ` Martin Liška
  1 sibling, 0 replies; 65+ messages in thread
From: Martin Liška @ 2019-09-06 16:03 UTC (permalink / raw)
  To: Jakub Jelinek, Marek Polacek
  Cc: Richard Biener, Jonathan Wakely, Nathan Sidwell, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On 9/6/19 4:56 PM, Jakub Jelinek wrote:
> On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
>> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
>>> Ok, hopefully nobody is strongly against. I've just retested the
>>> patch and installed it as r275450.
>>
>> --- a/gcc/c-family/c.opt
>> +++ b/gcc/c-family/c.opt
>> @@ -1763,8 +1763,8 @@ 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++
>> -Enable automatic template instantiation.
>> +C++ ObjC++ Deprecated
>> +Deprecated in GCC 10.  This switch has no effect.
> 
> The Deprecated keyword is just misnamed, I believe it does the same thing as
> Ignore, except that it also prints a warning that the switch is no longer
> supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).

Exactly. I'll double check it.

> The description should be just This switch has no effect. or
> Does nothing.  Preserved for backward compatibility.

Yep, I'll update the comment.

@Marek:

> Also, https://gcc.gnu.org/gcc-10/changes.html should be updated, both in
> Caveats and the C++ section.  But I can do that.

I'll do it once we'll be close to release of GCC 10. I've got quite some changes
that I haven't mentioned in yet in changes or porting_to.

Martin

> 
> 	Jakub
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-06 14:56                                                               ` Jakub Jelinek
  2019-09-06 16:03                                                                 ` Martin Liška
@ 2019-09-09 11:02                                                                 ` Martin Liška
  2019-09-09 11:08                                                                   ` Jakub Jelinek
  1 sibling, 1 reply; 65+ messages in thread
From: Martin Liška @ 2019-09-09 11:02 UTC (permalink / raw)
  To: Jakub Jelinek, Marek Polacek
  Cc: Richard Biener, Jonathan Wakely, Nathan Sidwell, Iain Sandoe,
	gcc, David Edelsohn, Jan Hubicka, GCC Patches, Jason Merrill

On 9/6/19 4:56 PM, Jakub Jelinek wrote:
> On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
>> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
>>> Ok, hopefully nobody is strongly against. I've just retested the
>>> patch and installed it as r275450.
>>
>> --- a/gcc/c-family/c.opt
>> +++ b/gcc/c-family/c.opt
>> @@ -1763,8 +1763,8 @@ 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++
>> -Enable automatic template instantiation.
>> +C++ ObjC++ Deprecated
>> +Deprecated in GCC 10.  This switch has no effect.
> 
> The Deprecated keyword is just misnamed, I believe it does the same thing as
> Ignore, except that it also prints a warning that the switch is no longer
> supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).
> The description should be just This switch has no effect. or
> Does nothing.  Preserved for backward compatibility.

I verified the description and it's fine to me:

frepo
C++ ObjC++ Deprecated
Deprecated in GCC 10.  This switch has no effect.

> 
> 	Jakub
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Deprecate -frepo option.
  2019-09-09 11:02                                                                 ` Martin Liška
@ 2019-09-09 11:08                                                                   ` Jakub Jelinek
  2019-09-09 11:25                                                                     ` [PATCH] Update comment of removed options Martin Liška
  0 siblings, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-09-09 11:08 UTC (permalink / raw)
  To: Martin Liška
  Cc: Marek Polacek, Richard Biener, Jonathan Wakely, Nathan Sidwell,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

On Mon, Sep 09, 2019 at 01:02:32PM +0200, Martin Liška wrote:
> On 9/6/19 4:56 PM, Jakub Jelinek wrote:
> > On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
> >> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
> >>> Ok, hopefully nobody is strongly against. I've just retested the
> >>> patch and installed it as r275450.
> >>
> >> --- a/gcc/c-family/c.opt
> >> +++ b/gcc/c-family/c.opt
> >> @@ -1763,8 +1763,8 @@ 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++
> >> -Enable automatic template instantiation.
> >> +C++ ObjC++ Deprecated
> >> +Deprecated in GCC 10.  This switch has no effect.
> > 
> > The Deprecated keyword is just misnamed, I believe it does the same thing as
> > Ignore, except that it also prints a warning that the switch is no longer
> > supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).
> > The description should be just This switch has no effect. or
> > Does nothing.  Preserved for backward compatibility.
> 
> I verified the description and it's fine to me:
> 
> frepo
> C++ ObjC++ Deprecated
> Deprecated in GCC 10.  This switch has no effect.

This first part looks wrong to me.
"deprecated
(computing) Obsolescent; said of a construct in a computing language considered old,
and planned to be phased out, but still available for use."
That is not the case here in GCC 10, the feature has been removed, it has
been deprecated in GCC 9.N for N >= 2 only.

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* [PATCH] Update comment of removed options.
  2019-09-09 11:08                                                                   ` Jakub Jelinek
@ 2019-09-09 11:25                                                                     ` Martin Liška
  2019-09-09 11:35                                                                       ` Jonathan Wakely
  2019-09-09 11:39                                                                       ` Jakub Jelinek
  0 siblings, 2 replies; 65+ messages in thread
From: Martin Liška @ 2019-09-09 11:25 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Marek Polacek, Richard Biener, Jonathan Wakely, Nathan Sidwell,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

[-- Attachment #1: Type: text/plain, Size: 1709 bytes --]

On 9/9/19 1:08 PM, Jakub Jelinek wrote:
> On Mon, Sep 09, 2019 at 01:02:32PM +0200, Martin Liška wrote:
>> On 9/6/19 4:56 PM, Jakub Jelinek wrote:
>>> On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
>>>> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
>>>>> Ok, hopefully nobody is strongly against. I've just retested the
>>>>> patch and installed it as r275450.
>>>>
>>>> --- a/gcc/c-family/c.opt
>>>> +++ b/gcc/c-family/c.opt
>>>> @@ -1763,8 +1763,8 @@ 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++
>>>> -Enable automatic template instantiation.
>>>> +C++ ObjC++ Deprecated
>>>> +Deprecated in GCC 10.  This switch has no effect.
>>>
>>> The Deprecated keyword is just misnamed, I believe it does the same thing as
>>> Ignore, except that it also prints a warning that the switch is no longer
>>> supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).
>>> The description should be just This switch has no effect. or
>>> Does nothing.  Preserved for backward compatibility.
>>
>> I verified the description and it's fine to me:
>>
>> frepo
>> C++ ObjC++ Deprecated
>> Deprecated in GCC 10.  This switch has no effect.
> 
> This first part looks wrong to me.
> "deprecated
> (computing) Obsolescent; said of a construct in a computing language considered old,
> and planned to be phased out, but still available for use."

You are right. What about the suggested patch?

Martin

> That is not the case here in GCC 10, the feature has been removed, it has
> been deprecated in GCC 9.N for N >= 2 only.
> 
> 	Jakub
> 


[-- Attachment #2: 0001-Update-comment-of-removed-options.patch --]
[-- Type: text/x-patch, Size: 5653 bytes --]

From ece8a83bdf6c2504bfe57dd033f6876cf2ffb9a2 Mon Sep 17 00:00:00 2001
From: Martin Liska <mliska@suse.cz>
Date: Mon, 9 Sep 2019 13:22:51 +0200
Subject: [PATCH] Update comment of removed options.

gcc/ChangeLog:

2019-09-09  Martin Liska  <mliska@suse.cz>

	* config/i386/i386.opt: Update comment of removed
	options that are preserved only for backward
	compatibility.

gcc/c-family/ChangeLog:

2019-09-09  Martin Liska  <mliska@suse.cz>

	* c.opt: Update comment of removed
	options that are preserved only for backward
	compatibility.
---
 gcc/c-family/c.opt       | 46 ++++++++++++++++++++--------------------
 gcc/config/i386/i386.opt |  4 ++--
 2 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
index ec546663029..c5804470d47 100644
--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -429,7 +429,7 @@ Warn about subscripts whose type is \"char\".
 
 Wchkp
 C ObjC C++ ObjC++ Warning Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 Wclobbered
 C ObjC C++ ObjC++ Var(warn_clobbered) Warning EnabledBy(Wextra)
@@ -1338,90 +1338,90 @@ and character literals.
 
 fcheck-pointer-bounds
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-check-incomplete-type
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-zero-input-bounds-for-main
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-first-field-has-own-bounds
 C ObjC C++ ObjC++ LTO Deprecated RejectNegative
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-narrow-bounds
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-narrow-to-innermost-array
 C ObjC C++ ObjC++ LTO Deprecated RejectNegative
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-flexible-struct-trailing-arrays
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-optimize
 C ObjC C++ ObjC++ LTO Deprecated
 
 fchkp-use-fast-string-functions
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-use-nochk-string-functions
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-use-static-bounds
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-use-static-const-bounds
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-treat-zero-dynamic-size-as-infinite
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-check-read
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-check-write
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-store-bounds
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-instrument-calls
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-instrument-marked-only
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fchkp-use-wrappers
 C ObjC C++ ObjC++ LTO Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 static-libmpx
 Driver Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 static-libmpxwrappers
 Driver Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 fcilkplus
 C ObjC C++ ObjC++ LTO Undocumented Ignore
-Deprecated in GCC 8.  This switch has no effect.
+Removed in GCC 8.  This switch has no effect.
 
 fconcepts
 C++ ObjC++ Var(flag_concepts)
@@ -1764,7 +1764,7 @@ Used in Fix-and-Continue mode to indicate that object files may be swapped in at
 
 frepo
 C++ ObjC++ Deprecated
-Deprecated in GCC 10.  This switch has no effect.
+Removed in GCC 10.  This switch has no effect.
 
 frtti
 C++ ObjC++ Optimization Var(flag_rtti) Init(1)
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 599e799ea5e..5d47212ae72 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -968,7 +968,7 @@ Support RTM built-in functions and code generation.
 
 mmpx
 Target Deprecated
-Deprecated in GCC 9.  This switch has no effect.
+Removed in GCC 9.  This switch has no effect.
 
 mmwaitx
 Target Report Mask(ISA_MWAITX) Var(ix86_isa_flags2) Save
@@ -1113,4 +1113,4 @@ AVX512BF16 built-in functions and code generation.
 
 menqcmd
 Target Report Mask(ISA_ENQCMD) Var(ix86_isa_flags2) Save
-Support ENQCMD built-in functions and code generation.
\ No newline at end of file
+Support ENQCMD built-in functions and code generation.
-- 
2.23.0


^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Update comment of removed options.
  2019-09-09 11:25                                                                     ` [PATCH] Update comment of removed options Martin Liška
@ 2019-09-09 11:35                                                                       ` Jonathan Wakely
  2019-09-09 12:44                                                                         ` Theodore Papadopoulo
  2019-09-09 11:39                                                                       ` Jakub Jelinek
  1 sibling, 1 reply; 65+ messages in thread
From: Jonathan Wakely @ 2019-09-09 11:35 UTC (permalink / raw)
  To: Martin Liška
  Cc: Jakub Jelinek, Marek Polacek, Richard Biener, Nathan Sidwell,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

On Mon, 9 Sep 2019 at 12:24, Martin Liška <mliska@suse.cz> wrote:
>
> On 9/9/19 1:08 PM, Jakub Jelinek wrote:
> > On Mon, Sep 09, 2019 at 01:02:32PM +0200, Martin Liška wrote:
> >> On 9/6/19 4:56 PM, Jakub Jelinek wrote:
> >>> On Fri, Sep 06, 2019 at 10:48:53AM -0400, Marek Polacek wrote:
> >>>> On Fri, Sep 06, 2019 at 08:58:48AM +0200, Martin Liška wrote:
> >>>>> Ok, hopefully nobody is strongly against. I've just retested the
> >>>>> patch and installed it as r275450.
> >>>>
> >>>> --- a/gcc/c-family/c.opt
> >>>> +++ b/gcc/c-family/c.opt
> >>>> @@ -1763,8 +1763,8 @@ 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++
> >>>> -Enable automatic template instantiation.
> >>>> +C++ ObjC++ Deprecated
> >>>> +Deprecated in GCC 10.  This switch has no effect.
> >>>
> >>> The Deprecated keyword is just misnamed, I believe it does the same thing as
> >>> Ignore, except that it also prints a warning that the switch is no longer
> >>> supported, so kind like Ignore Warn(switch %<-frepo%> is no longer supported).
> >>> The description should be just This switch has no effect. or
> >>> Does nothing.  Preserved for backward compatibility.
> >>
> >> I verified the description and it's fine to me:
> >>
> >> frepo
> >> C++ ObjC++ Deprecated
> >> Deprecated in GCC 10.  This switch has no effect.
> >
> > This first part looks wrong to me.
> > "deprecated
> > (computing) Obsolescent; said of a construct in a computing language considered old,
> > and planned to be phased out, but still available for use."

I agree with this definition. If it's deprecated it still needs to be
available for use.

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Update comment of removed options.
  2019-09-09 11:25                                                                     ` [PATCH] Update comment of removed options Martin Liška
  2019-09-09 11:35                                                                       ` Jonathan Wakely
@ 2019-09-09 11:39                                                                       ` Jakub Jelinek
  2019-09-09 11:46                                                                         ` Martin Liška
  1 sibling, 1 reply; 65+ messages in thread
From: Jakub Jelinek @ 2019-09-09 11:39 UTC (permalink / raw)
  To: Martin Liška
  Cc: Marek Polacek, Richard Biener, Jonathan Wakely, Nathan Sidwell,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

On Mon, Sep 09, 2019 at 01:24:53PM +0200, Martin Liška wrote:
> You are right. What about the suggested patch?

Can you please quickly (say with svn blame) double check whether the
descriptions weren't actually right but misleading (an option could
be deprecated in N and removed in N+1 or so, so see if it has been actually
removed in the GCC release mentioned in there, rather than deprecated and
removed later)?

Ok with that.  Perhaps it would be desirable to also rename the Deprecated
keyword in *.opt to Removed and adjust documentation, but that can be
handled separately.

	Jakub

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Update comment of removed options.
  2019-09-09 11:39                                                                       ` Jakub Jelinek
@ 2019-09-09 11:46                                                                         ` Martin Liška
  0 siblings, 0 replies; 65+ messages in thread
From: Martin Liška @ 2019-09-09 11:46 UTC (permalink / raw)
  To: Jakub Jelinek
  Cc: Marek Polacek, Richard Biener, Jonathan Wakely, Nathan Sidwell,
	Iain Sandoe, gcc, David Edelsohn, Jan Hubicka, GCC Patches,
	Jason Merrill

On 9/9/19 1:39 PM, Jakub Jelinek wrote:
> On Mon, Sep 09, 2019 at 01:24:53PM +0200, Martin Liška wrote:
>> You are right. What about the suggested patch?
> 
> Can you please quickly (say with svn blame) double check whether the
> descriptions weren't actually right but misleading (an option could
> be deprecated in N and removed in N+1 or so, so see if it has been actually
> removed in the GCC release mentioned in there, rather than deprecated and
> removed later)?

Yes, majority of the changes are MPX-related options. There were really removed in GCC 9.x.
Then there's fcilkplus (really removed in GCC 8.x) and last one is -frepo, which I've just
removed (thus GCC 10).

Martin

> 
> Ok with that.  Perhaps it would be desirable to also rename the Deprecated
> keyword in *.opt to Removed and adjust documentation, but that can be
> handled separately.
> 
> 	Jakub
> 

^ permalink raw reply	[flat|nested] 65+ messages in thread

* Re: [PATCH] Update comment of removed options.
  2019-09-09 11:35                                                                       ` Jonathan Wakely
@ 2019-09-09 12:44                                                                         ` Theodore Papadopoulo
  0 siblings, 0 replies; 65+ messages in thread
From: Theodore Papadopoulo @ 2019-09-09 12:44 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On 9/9/19 1:34 PM, Jonathan Wakely wrote:

>>>> frepo
>>>> C++ ObjC++ Deprecated
>>>> Deprecated in GCC 10.  This switch has no effect.
>>>
>>> This first part looks wrong to me.
>>> "deprecated
>>> (computing) Obsolescent; said of a construct in a computing language considered old,
>>> and planned to be phased out, but still available for use."
> 
> I agree with this definition. If it's deprecated it still needs to be
> available for use.
> 

Pedantically, the flag is deprecated but the functionality is removed.
If the intent, is to remove the flag after a while, it might be nice to
say that the use of the flag is deprecated...

	

[-- Attachment #2: 0x12BF16AD4F273D5D.asc --]
[-- Type: application/pgp-keys, Size: 14023 bytes --]

^ permalink raw reply	[flat|nested] 65+ messages in thread

end of thread, other threads:[~2019-09-09 12:44 UTC | newest]

Thread overview: 65+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-20 14:05 Dropping support of repo files (tlink) Martin Liška
2019-06-20 14:21 ` David Edelsohn
2019-06-20 14:27   ` Iain Sandoe
2019-06-20 15:10   ` Martin Liška
2019-06-20 19:53     ` Richard Biener
2019-06-21 10:22       ` Martin Liška
2019-06-21 10:28         ` Jonathan Wakely
2019-06-21 10:35           ` Iain Sandoe
2019-06-21 10:40             ` Martin Liška
2019-06-21 11:47               ` Jonathan Wakely
2019-06-21 11:52                 ` [PATCH] Deprecate -frepo option Martin Liška
2019-06-21 11:59                   ` Jakub Jelinek
2019-06-21 14:04                     ` Martin Liška
2019-06-21 14:13                       ` Jakub Jelinek
2019-06-21 14:28                         ` Richard Biener
2019-06-27 12:30                           ` Martin Liška
2019-06-27 12:58                             ` Jonathan Wakely
2019-06-27 14:22                               ` Martin Liška
2019-06-27 17:53                                 ` Jason Merrill
2019-06-27 18:21                                   ` Jan Hubicka
2019-06-27 18:32                                     ` Iain Sandoe
2019-06-27 18:41                                       ` Jan Hubicka
2019-07-08 12:04                           ` Martin Liška
2019-07-09 10:39                             ` Richard Biener
2019-07-09 11:41                               ` Nathan Sidwell
2019-07-09 13:01                                 ` Martin Liška
2019-07-09 17:48                                   ` Nathan Sidwell
2019-07-09 21:14                                     ` Jason Merrill
2019-07-10 11:28                                       ` Martin Liška
2019-07-10 12:48                                         ` Nathan Sidwell
2019-07-10 12:53                                           ` Martin Liška
2019-07-10 12:56                                             ` Nathan Sidwell
2019-07-10 12:58                                             ` Jakub Jelinek
2019-07-11  6:48                                               ` [PATCH] Deprecate -frepo on gcc-9 branch (PR c++/91125) Martin Liška
2019-07-11  7:02                                                 ` Jakub Jelinek
2019-07-11 17:26                                                   ` Jason Merrill
2019-07-12 12:44                                                     ` Martin Liška
2019-07-12 14:25                                                       ` Jason Merrill
2019-09-04  8:13                                   ` [PATCH] Deprecate -frepo option Martin Liška
2019-09-04  9:22                                     ` Jonathan Wakely
2019-09-04 11:20                                       ` Martin Liška
2019-09-04 12:57                                         ` Nathan Sidwell
2019-09-05 10:01                                           ` Richard Biener
2019-09-05 10:03                                             ` Martin Liška
2019-09-05 11:02                                               ` Nathan Sidwell
2019-09-05 11:09                                                 ` Richard Biener
2019-09-05 11:22                                                   ` Martin Liška
2019-09-05 12:06                                                     ` Jonathan Wakely
2019-09-05 12:31                                                       ` Richard Biener
2019-09-05 12:51                                                         ` Martin Liška
2019-09-06  6:58                                                           ` Martin Liška
2019-09-06 14:48                                                             ` Marek Polacek
2019-09-06 14:56                                                               ` Jakub Jelinek
2019-09-06 16:03                                                                 ` Martin Liška
2019-09-09 11:02                                                                 ` Martin Liška
2019-09-09 11:08                                                                   ` Jakub Jelinek
2019-09-09 11:25                                                                     ` [PATCH] Update comment of removed options Martin Liška
2019-09-09 11:35                                                                       ` Jonathan Wakely
2019-09-09 12:44                                                                         ` Theodore Papadopoulo
2019-09-09 11:39                                                                       ` Jakub Jelinek
2019-09-09 11:46                                                                         ` Martin Liška
2019-06-21 11:50               ` Dropping support of repo files (tlink) Iain Sandoe
2019-06-21 12:37                 ` Richard Biener
2019-06-21 12:50                   ` Jan Hubicka
2019-06-21 13:08                     ` Iain Sandoe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).