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

           Summary: "Error: symbol `again' is already defined" error
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: cachefl...@gmail.com


function containing assembler code with intel syntax failed to compile if
optimization flag is set (-O2/-O3) on compiler.

  int test()
  {
    asm(
        "again:"
        "mov edx,dword ptr [esi];"
         ... blalblbalbl ...
       );
  }
  int main(int argc,char **argv)
  {
    test();
  }


if changed to:
  inline int test()
  {......
does not work either.

by changing function to:
  static int test()
  { ..........
works!!!


Here is the compile command:
gcc -pg -masm=intel main.c -march=core2 -mfpmath=sse -mtune=pentium -O3

bug?

Reply via email to