• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XCode 2.2.1 / gcc 4.0 Peephole Bug


  • Subject: Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
  • From: Olivier Tristan <email@hidden>
  • Date: Wed, 19 Apr 2006 10:56:42 +0200

Ben Weiss wrote:
All right, so I tried it in assembly, and ran into another bug (I think):

Given the function:

static int duplicatelabelbug(register vector unsigned short a, register vector unsigned short b) {
register vector unsigned short vmask;
asm { vcmpgtuh. vmask, a, b; beq cr6, mylabel; };
asm { vcmpgtuh. vmask, b, a; beq cr6, mylabel; }; // <-- duplicate label??
return 0;
mylabel: return 1; // <-- label only defined once, here!
}


XCode 2.2.1 / gcc 4.0 generates: "error: duplicate label 'LASM$mylabel' " even though the label "mylabel" is only defined once. (CodeWarrior handles this code just fine.) Is this a gcc bug?

Hi,

It seems that this function is inlined so it duplicates the label. You should use gcc local label
However I never used those.


http://developer.apple.com/documentation/DeveloperTools/gcc-4.0.1/gcc/Local-Labels.html

Hope this helps.

--
Olivier Tristan
Ultimate Sound Bank

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
      • From: Ben Weiss <email@hidden>
    • Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
      • From: Ben Weiss <email@hidden>
References: 
 >Undefined constants from pch (From: Steve Mills <email@hidden>)
 >XCode 2.2.1 / gcc 4.0 Peephole Bug (From: Ben Weiss <email@hidden>)
 >Re: XCode 2.2.1 / gcc 4.0 Peephole Bug (From: Ben Weiss <email@hidden>)

  • Prev by Date: Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
  • Next by Date: Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
  • Previous by thread: Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
  • Next by thread: Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
  • Index(es):
    • Date
    • Thread