User account creation filtered due to spam.

Bug 17167 - [3.4 Regression] FATAL:Symbol L_foo$stub already defined.
Summary: [3.4 Regression] FATAL:Symbol L_foo$stub already defined.
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.4.1
: P2 normal
Target Milestone: 3.4.3
Assignee: Andrew Pinski
Keywords: patch, wrong-code
Depends on:
Reported: 2004-08-24 14:17 UTC by Kate Minola
Modified: 2004-09-11 20:33 UTC (History)
1 user (show)

See Also:
Target: *-darwin*
Known to work: 3.3.3 4.0.0
Known to fail: 3.4.0
Last reconfirmed: 2004-08-24 15:17:58


Note You need to log in before you can comment on or make changes to this bug.
Description Kate Minola 2004-08-24 14:17:44 UTC
% uname -a
Darwin varro 7.5.0 Darwin Kernel Version 7.5.0: Thu Aug  5 19:26:16 PDT 2004; 
root:xnu/xnu-517.7.21.obj~3/RELEASE_PPC  Power Macintosh powerpc
% gcc -v
Reading specs from /private/var/automount/usr/local/gcc-3.4.1/powerpc-
Configured with: ../gcc-3.4.1/configure --enable-languages=c --
Thread model: posix
gcc version 3.4.1
% cat foo.c
/* On powerpc-apple-darwin7.5.0 gcc-3.4.1 gives

% gcc -c foo.c
/var/tmp//ccdpYiCe.s:24:FATAL:Symbol L_foo$stub already defined.

This is a regression from gcc-3.3.3.  It does not seem
to happen on other architectures that I have tried.

It seems to be fixed in gcc-3.5-20040530.

int foo(a)
  int a;
    int    foo();  /* if you remove this line, the bug disappears */

    return 0;

Comment 1 Andrew Pinski 2004-08-24 15:17:58 UTC
Testing a patch.

The patch which fixed on the mainline which I am back porting:
Comment 2 Andrew Pinski 2004-08-24 21:00:37 UTC
Patch here: <>.
Comment 3 Mark Mitchell 2004-08-29 19:09:50 UTC
Postponed until GCC 3.4.3.
Comment 4 CVS Commits 2004-09-11 20:32:31 UTC
Subject: Bug 17167

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	2004-09-11 20:32:24

Modified files:
	gcc/config     : darwin-protos.h darwin.c darwin.h 
	gcc            : ChangeLog 

Log message:
	2004-09-11  Andrew Pinski  <>
	PR target/17167
	backport from the mainline:
	2004-02-28  Andrew Pinski  <>
	* config/darwin.h (machopic_finish): Output stub even if
	the symbol is already defined.
	2004-02-27  Dale Johannesen  <>
	* config/darwin.c (machopic_output_possible_stub_label):
	config/darwin-protos.h:  Ditto.
	config/darwin.h:  Remove call to it.


Comment 5 Andrew Pinski 2004-09-11 20:33:33 UTC