public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/233: loop unrolling generates duplicate assmebler labels -> gas rejects code
@ 2002-08-24 21:26 Loren Osborn
0 siblings, 0 replies; only message in thread
From: Loren Osborn @ 2002-08-24 21:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c/233; it has been noted by GNATS.
From: Loren Osborn <linux_dr@yahoo.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org,
ingo.oeser@informatik.tu-chemnitz.de, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:
Subject: Re: c/233: loop unrolling generates duplicate assmebler labels ->
gas rejects code
Date: 24 Aug 2002 15:43:41 -0700
--=-Wm9YqzxtNJeSXNQmOgXk
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
I found a similar bug to PR233, and was disappointed to see that PR233 was
closed, appearantly just because the URL to the test case became a broken link.
I think I have found a manifistaion of the same bug, although it doesn't
involve unrolling loops. It involves inlining of functions with
inline-assembler lables in it...
I have included a minimal test case (I normally would not attach a file when
there were so many reciepients of an email, but as PR233 was closed because of
a broken link, I feel it's apropriate)...
to reproduce the error invoke:
gcc -O3 -c -o InlineLableBug.o InlineLableBug.c
I am using gcc 3.1.1 on Mandrake Linux 8.1...
As far as I am aware, the code itself (while not technically vailid ANSI C,
because ANSI C doesn't explicitly allow inline assembler) should be valid in
gcc.
Please help.
Thanks in advance,
-Loren Osborn
Software Engineer
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=233
--=-Wm9YqzxtNJeSXNQmOgXk
Content-Type: text/x-csrc
Content-Disposition: attachment; filename=InlineLableBug.c
Content-ID: <1030228090.7833.44.camel@goofy.localnet>
Content-Transfer-Encoding: 7bit
static inline void DoNothing()
{
__asm__ (
"jmp leave_fn\n\t"
"nop \n"
"leave_fn:\n\t"
: // No Input Regs
: // No Output Regs
);
}
static void DoNothingOne()
{
DoNothing();
}
static void DoNothingTwo()
{
DoNothing();
}
static void DoNothingThree()
{
DoNothing();
}
typedef void(*CVoidFunc)();
extern CVoidFunc FuncArray[];
extern void InitFuncArray();
#define NULL 0
extern CVoidFunc FuncArray[4];
void InitFuncArray()
{
FuncArray[0] = DoNothingOne;
FuncArray[1] = DoNothingTwo;
FuncArray[2] = DoNothingThree;
FuncArray[3] = NULL;
}
--=-Wm9YqzxtNJeSXNQmOgXk--
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-08-25 1:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-24 21:26 c/233: loop unrolling generates duplicate assmebler labels -> gas rejects code Loren Osborn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).