Re: XCode 2.2.1 / gcc 4.0 Peephole Bug
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