This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/35034] assembler errors when building gcc/unwind-*.c at -O0 or -O1
- From: "aldot at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2008 14:47:44 -0000
- Subject: [Bug c/35034] assembler errors when building gcc/unwind-*.c at -O0 or -O1
- References: <bug-35034-11811@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from aldot at gcc dot gnu dot org 2008-01-31 14:47 -------
Smaller testcase:
-----------------------------------
$ cat pr35034-1.c
/* PR 35034 - fails to mangle function names for different TUs. */
/* { dg-do compile } */
/* { dg-options "-combine -O0" } */
/* { dg-additional-sources pr35034-2.c } */
typedef int int_t;
static void
size_of_encoded_value (void)
{
};
extern int pthread_once (int_t *__once_control,
void (*__init_routine) (void));
static __typeof(pthread_once) __gthrw_pthread_once __attribute__
((__weakref__("pthread_once")));
-----------------------------------
$ cat pr35034-2.c
void size_of_encoded_value (void)
{
};
-----------------------------------
Gives with current trunk:
$ gcc-4.3-HEAD pr35034-1.c pr35034-2.c -O0 -c -o foo.o -combine -pipe
{standard input}: Assembler messages:
{standard input}:12: Error: symbol `size_of_encoded_value' is already defined
$ gcc-4.3-HEAD pr35034-1.c pr35034-2.c -O0 -S -o - -combine -pipe
.file "pr35034-1.c"
.text
.type size_of_encoded_value, @function
size_of_encoded_value:
pushl %ebp
movl %esp, %ebp
popl %ebp
ret
.size size_of_encoded_value, .-size_of_encoded_value
.globl size_of_encoded_value
.type size_of_encoded_value, @function
size_of_encoded_value:
pushl %ebp
movl %esp, %ebp
popl %ebp
ret
.size size_of_encoded_value, .-size_of_encoded_value
.weakref __gthrw_pthread_once,pthread_once
.ident "GCC: (GNU) 4.3.0 20080131 (experimental)"
.section .note.GNU-stack,"",@progbits
--
aldot at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |build, wrong-code
Known to fail| |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35034