[Bug tree-optimization/17766] [4.0 Regression] cc1 hangs in with -O3, works with -O2

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Oct 7 20:41:00 GMT 2004


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-07 20:41 -------
A little more reduced:
struct msghdr
{
  struct cmsghdr *msg_control;
  int msg_controllen;
};
struct cmsghdr
{
  int cmsg_len, cmsg_level, cmsg_type;
};
static struct cmsghdr *__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) ;

static __inline struct cmsghdr *
__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
{
 if (__cmsg->cmsg_len < 1)
    return 0;
  if (__cmsg > __mhdr->msg_control || __cmsg->cmsg_len > 0)
    return 0;
  return __cmsg;
}

void SLPMDNSXcastRecvMessage(struct msghdr mhdr, struct cmsghdr *cmsg)
{  
  for (cmsg = (mhdr.msg_controllen >= 1 ? mhdr.msg_control : 0 );
       cmsg;
       __cmsg_nxthdr (&mhdr, cmsg))
    if (cmsg->cmsg_level == 0 && cmsg->cmsg_type == 2)
      break;
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list