This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/23345] New: Assembler message: symbol is already defined


$ cat > bug.cc << EOF
> struct cl_heap {
>   int refcount;
> };
> 
> class cl_gcpointer {
> public:
>   cl_heap* heappointer;
>   cl_gcpointer (const char * s);
>   ~cl_gcpointer ()
>   {
>     if (--heappointer->refcount == 0)
>       delete heappointer;
>   }
> };
> 
> struct cl_symbol {
> public:
>   cl_symbol (const cl_gcpointer&);
> };
> 
> cl_symbol cl_univpoly_varname_key = (cl_symbol)"variable name";
> 
> struct cl_module_destroyer { 
>   inline cl_module_destroyer () 
>   { 
>     __asm__("\nthis_symbol_is_defined_once_or_twice:"); 
>   } 
> }; 
> EOF
$ g++ -O -c fatal.cc
$ g++ -O2 -c fatal.cc
/tmp/ccDX2LCa.s: Assembler messages:
/tmp/ccDX2LCa.s:152: Error: symbol `this_symbol_is_defined_once_or_twice' is
already defined

This does not happen on a ia32 platform. The bug above was distilled from CLN. 
It is responsible for the package failing to build on Debian/sid
<http://buildd.debian.org/fetch.php?&pkg=cln&ver=1.1.9-4&arch=ia64&stamp=1123630039&file=log&as=raw>.
 It appears to happen on m68k, too:
<http://buildd.debian.org/fetch.php?&pkg=cln&ver=1.1.9-4&arch=m68k&stamp=1123757682&file=log&as=raw>.

-- 
           Summary: Assembler message: symbol is already defined
           Product: gcc
           Version: 4.0.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kreckel at ginac dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: ia64-linux-gnu
  GCC host triplet: ia64-linux-gnu
GCC target triplet: ia64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23345


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]