public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/14327] New: -O0 -fdefer-pop generates wrong code
@ 2004-02-27 23:59 jfran at clip dot dia dot fi dot upm dot es
  2004-02-28  0:06 ` [Bug target/14327] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jfran at clip dot dia dot fi dot upm dot es @ 2004-02-27 23:59 UTC (permalink / raw)
  To: gcc-bugs

The following program is not compiled correctly 
and produces a segmentation fault if compiled with
-O0 -fderef-pop. The code is compiled correctly
with -fno-defer-pop, or using a version =<3.2


// 

int code[]={0,0,0,0,1};

void foo(int x) {
  volatile int b;
  b = 0xffffffff;
}

void bar(int *pc) {
  static const void *l[] = {&&lab0, &&end};

  foo(0);
  goto *l[*pc];
 lab0:
  foo(0);
  pc++;
  goto *l[*pc];
 end:
  return;
}

int main() {
  bar(code);
  return 0;
}

-- 
           Summary: -O0 -fdefer-pop generates wrong code
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P1
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jfran at clip dot dia dot fi dot upm dot es
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2004-03-04  7:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-27 23:59 [Bug c/14327] New: -O0 -fdefer-pop generates wrong code jfran at clip dot dia dot fi dot upm dot es
2004-02-28  0:06 ` [Bug target/14327] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-02-28  1:28 ` jfran at clip dot dia dot fi dot upm dot es
2004-03-02  9:53 ` steven at gcc dot gnu dot org
2004-03-02 23:51 ` rth at gcc dot gnu dot org
2004-03-03  0:18 ` [Bug middle-end/14327] " cvs-commit at gcc dot gnu dot org
2004-03-03  0:34 ` cvs-commit at gcc dot gnu dot org
2004-03-03  0:39 ` cvs-commit at gcc dot gnu dot org
2004-03-03  0:53 ` rth at gcc dot gnu dot org
2004-03-04  7:50 ` cvs-commit 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).