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]

Bug in tidy_fallthru_edges ?


Hello,

the following routine from glibc gets miscompiled on S/390:

  int __swapcontext (ucontext_t *oucp, ucontext_t *ucp)
  {
    __getcontext (oucp);
    oucp->uc_mcontext.gregs[14] = &&fake_return;

    __setcontext (ucp);

  fake_return:
    return 0;
  }

What happens is that 'tidy_fallthru_edges' simply removes the
'fake_return' label, because it apparently considers the 'return 0'
statement only reachable via fall-through from the main body,
without taking into account that there is a named label,
which is actually used somewhere ...

Any ideas how to fix this?



Mit freundlichen Gruessen / Best Regards

Ulrich Weigand

--
  Dr. Ulrich Weigand
  Linux for S/390 Design & Development
  IBM Deutschland Entwicklung GmbH, Schoenaicher Str. 220, 71032 Boeblingen
  Phone: +49-7031/16-3727   ---   Email: Ulrich.Weigand@de.ibm.com


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