This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

3.3 error when inlining


Hello,

when compiling the reduced testcase below with -O3 on gcc 3.3, I'm getting
the following error message:

scopebug.i: In function `outer':
scopebug.i:13: error: jump to `label' invalidly jumps into binding contour

With -O2, the testcase compiles fine.  CVS head compiles it without error
either with -O2 or -O3.

>From my reading of the standard, the testcase should be correct C,
so I guess the 3.3 inliner may get confused about scopes ...

static void
inner (int len)
{
  {
    char buf[len];

    if (0)
      {
        label:
          return;
      }

    goto label;
  }
}

void
outer (int len)
{
  inner (len);
}

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]