From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29374 invoked by alias); 25 Aug 2002 01:06:55 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 28328 invoked by uid 71); 25 Aug 2002 01:06:03 -0000 Date: Sat, 24 Aug 2002 21:26:00 -0000 Message-ID: <20020825010603.28322.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Loren Osborn Subject: Re: c/233: loop unrolling generates duplicate assmebler labels -> gas rejects code Reply-To: Loren Osborn X-SW-Source: 2002-08/txt/msg00528.txt.bz2 List-Id: The following reply was made to PR c/233; it has been noted by GNATS. From: Loren Osborn 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--