public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/21728] New: Nonlocal gotos between nested functions cause undefined labels in assembler output
@ 2005-05-23 22:29 hebisch at math dot uni dot wroc dot pl
  2005-05-23 22:57 ` [Bug middle-end/21728] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: hebisch at math dot uni dot wroc dot pl @ 2005-05-23 22:29 UTC (permalink / raw)
  To: gcc-bugs

The following program:
void f(void)
{
  void p(void)
  {
  __label__ l1;
  void q(void)
  {
    goto l1;
  }

  l1:;
  }
  p();
}
int
main (void)
{
  f();
  return 0;
}
compiled using the following command line:
../gcc-lin/gcc/xgcc -B../gcc-lin/gcc/ c_jump2.c
gives me:
/tmp/ccSrSccf.o: In function `q.1137':
/tmp/ccSrSccf.o(.text+0x2d): undefined reference to `.L7'
collect2: ld returned 1 exit status

Output of ../gcc-lin/gcc/xgcc -B../gcc-lin/gcc/ -v:
Reading specs from ../gcc-lin/gcc/specs
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0.0/configure --enable-languages=c
Thread model: posix
gcc version 4.0.0

The program works when I use `-O2' or `-O3' option (apparently
it works in unit at a time mode and does not work in function at
a time mode). 

The problem affects GNU Pascal, I found the above C program trying
to find out why I get the above error from Pascal programs.

-- 
           Summary: Nonlocal gotos between nested functions cause undefined
                    labels in assembler output
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hebisch at math dot uni dot wroc dot pl
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2005-08-25 23:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-23 22:29 [Bug middle-end/21728] New: Nonlocal gotos between nested functions cause undefined labels in assembler output hebisch at math dot uni dot wroc dot pl
2005-05-23 22:57 ` [Bug middle-end/21728] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-06-01  0:26 ` pinskia at gcc dot gnu dot org
2005-06-07  7:53 ` steven at gcc dot gnu dot org
2005-06-07 20:11 ` [Bug middle-end/21728] [4.0/4.1 Regression] Nonlocal goto from an unused nested function pinskia at gcc dot gnu dot org
2005-06-11 15:23 ` pinskia at gcc dot gnu dot org
2005-07-06 16:16 ` mmitchel at gcc dot gnu dot org
2005-08-05 21:21 ` rth at gcc dot gnu dot org
2005-08-05 23:02 ` cvs-commit at gcc dot gnu dot org
2005-08-05 23:02 ` cvs-commit at gcc dot gnu dot org
2005-08-05 23:08 ` rth at gcc dot gnu dot org
2005-08-05 23:13 ` rth at gcc dot gnu dot org
2005-08-25 23:15 ` pinskia at gcc dot gnu dot org

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).