Bug 23104 - [4.3/4.4/4.5/4.6 Regression] C does not reject the same function in two different TUs with -combine
Summary: [4.3/4.4/4.5/4.6 Regression] C does not reject the same function in two diffe...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.1.0
: P4 normal
Target Milestone: 4.3.6
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: accepts-invalid, ice-on-invalid-code, patch
: 24446 (view as bug list)
Depends on:
Blocks: 21975 22052
  Show dependency treegraph
 
Reported: 2005-07-27 22:06 UTC by Andrew Pinski
Modified: 2010-09-17 09:06 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-09-17 19:35:55


Attachments
patch which reverts back to the pre 4.0 and also should not regression on 22052 (763 bytes, patch)
2005-09-16 18:51 UTC, Andrew Pinski
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2005-07-27 22:06:30 UTC
Compile the following sources with -combine:
---- file1.c ----
int f(void) {}
---- end ----
---- file2.c ----
int f(void) {}
---- end ----

We used to reject this in 4.0.0.
This was caused by:
2005-06-28  Eric Christopher  <echristo@redhat.com>

        PR c/22052
        PR c/21975
        * c-decl.c (diagnose_mismatched_decls): Define DECL_EXTERN_INLINE.
        Use. Fix detection of invalid extern inline redefinition.
Comment 1 Serge Belyshev 2005-07-27 22:14:17 UTC
Confirmed.
Comment 2 Andrew Pinski 2005-09-16 17:55:27 UTC
I am going to fix this since PR 22052 was really caused by me.
Comment 3 Andrew Pinski 2005-09-16 18:51:37 UTC
Created attachment 9744 [details]
patch which reverts back to the pre 4.0 and also should not regression on 22052

I still need to test it.
Comment 4 Andrew Pinski 2005-09-17 20:25:08 UTC
Patch posted:
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01070.html
Comment 5 Andrew Pinski 2005-10-12 00:56:40 UTC
Hmm, the 4.0 patch was approved, I wonder if I could get away with applying this as obvious as it just gets us the same code as the 4.0 branch.
Comment 6 Andrew Pinski 2005-10-20 23:51:35 UTC
*** Bug 24446 has been marked as a duplicate of this bug. ***
Comment 7 Mark Mitchell 2005-10-31 04:18:16 UTC
Downgraded to P4.  If we can fix this great; otherwise, we'll look at it again for 4.2.
Comment 8 Andrew Pinski 2005-10-31 04:19:34 UTC
(In reply to comment #7)
> Downgraded to P4.  If we can fix this great; otherwise, we'll look at it 
> again for 4.2.

It is not like I did not post a patch.
Comment 9 Mark Mitchell 2006-05-25 02:35:17 UTC
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
Comment 10 Steven Bosscher 2007-12-18 20:06:11 UTC
As of today this is an ICE at least on Cygwin.  cc1 segfaults during inlining.
Comment 11 Joseph S. Myers 2008-07-04 19:58:22 UTC
Closing 4.1 branch.
Comment 12 nightstrike 2008-07-14 17:09:57 UTC
On 4.2.4 and 4.3.1, I get this:

$  cat > a.c
int f(void) {}

$  cat > b.c
int f(void) {}

$ /opt/cfarm/release/4.3.1/bin/gcc -combine a.c b.c
a.c:2: error: redefinition of 'f'
a.c:1: error: previous definition of 'f' was here
Comment 13 Joseph S. Myers 2009-03-31 18:52:54 UTC
Closing 4.2 branch.
Comment 14 Richard Biener 2009-08-04 12:26:28 UTC
GCC 4.3.4 is being released, adjusting target milestone.
Comment 15 Richard Biener 2010-05-22 18:10:32 UTC
GCC 4.3.5 is being released, adjusting target milestone.
Comment 16 Andrew Pinski 2010-07-24 21:05:27 UTC
No longer going to work on this one.
Comment 17 Steven Bosscher 2010-07-24 21:22:45 UTC
IMA (-combine) => WONTFIX?
Comment 18 Richard Biener 2010-09-17 09:06:12 UTC
-combine has been removed from GCC 4.6 in favor of LTO, closing as WONTFIX.