re PR tree-optimization/44043 (sorry, unimplemented: inlining failed in call to ...
authorRichard Guenther <rguenther@suse.de>
Sun, 9 May 2010 14:13:25 +0000 (14:13 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Sun, 9 May 2010 14:13:25 +0000 (14:13 +0000)
2010-05-09  Richard Guenther  <rguenther@suse.de>

PR middle-end/44043
* ipa-inline.c (estimate_function_body_sizes): Return after
disregarding inline limits.

* gcc.c-torture/compile/pr44043.c: New testcase.

From-SVN: r159200

gcc/ChangeLog
gcc/ipa-inline.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr44043.c [new file with mode: 0644]

index c8d93ffc42c136a3d33f941a4a7a4efb87d36a69..3112b80b01356d11d3b327bb0899bb47d258f930 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-09  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/44043
+       * ipa-inline.c (estimate_function_body_sizes): Return after
+       disregarding inline limits.
+
 2010-05-09  Richard Guenther  <rguenther@suse.de>
 
        * gcc.c (store_arg): Revert last change.
index 5f9fe102ba1ff7d7b73b39fd5ca8bc1ac5c18b8a..8b73210c34d703d53ffe7f201a4886179c024787 100644 (file)
@@ -1835,10 +1835,13 @@ estimate_function_body_sizes (struct cgraph_node *node)
 
   if (node->local.disregard_inline_limits)
     {
+      if (dump_file)
+       fprintf (dump_file, "Disregarding inline limits.\n");
       inline_summary (node)->self_time = 0;
       inline_summary (node)->self_size = 0;
       inline_summary (node)->time_inlining_benefit = 0;
       inline_summary (node)->size_inlining_benefit = 0;
+      return;
     }
 
   if (dump_file)
index 2c4e31c7636ed57099eb601db1dd402d30b3225d..bd28f1876228ee7b7fb2323a2cee9997c14b0e5b 100644 (file)
@@ -1,3 +1,8 @@
+2010-05-09  Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/44043
+       * gcc.c-torture/compile/pr44043.c: New testcase.
+
 2010-05-09  Richard Guenther  <rguenther@suse.de>
 
        * gcc.dg/ipa/ipa-pta-11.c: Make p and q referenced.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44043.c b/gcc/testsuite/gcc.c-torture/compile/pr44043.c
new file mode 100644 (file)
index 0000000..943501b
--- /dev/null
@@ -0,0 +1,87 @@
+typedef unsigned char __u8;
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+typedef unsigned long __kernel_size_t;
+typedef __kernel_size_t size_t;
+typedef __u8 uint8_t;
+typedef __u16 __be16;
+typedef __u32 __be32;
+struct msghdr {
+    struct iovec * msg_iov;
+    unsigned msg_flags;
+};
+enum { IPPROTO_ICMP = 1 };
+struct sk_buff { };
+static inline __attribute__((always_inline)) struct dst_entry *
+skb_dst(const struct sk_buff *skb)
+{
+};
+enum nf_inet_hooks { NF_INET_LOCAL_OUT };
+struct net_device {
+    unsigned mtu;
+};
+static inline __attribute__((always_inline)) int
+NF_HOOK_THRESH(uint8_t pf, unsigned int hook, struct sk_buff *skb,
+              struct net_device *in, struct net_device *out,
+              int (*okfn)(struct sk_buff *), int thresh)
+{
+  int ret = nf_hook_thresh(pf, hook, skb, in, out, okfn, thresh);
+  if (ret == 1)
+    ret = okfn(skb);
+  return ret;
+}
+static inline __attribute__((always_inline)) int
+NF_HOOK(uint8_t pf, unsigned int hook, struct sk_buff *skb,
+       struct net_device *in, struct net_device *out,
+       int (*okfn)(struct sk_buff *))
+{
+  return NF_HOOK_THRESH(pf, hook, skb, in, out, okfn, (-((int)(~0U>>1)) - 1));
+}
+struct dst_entry {
+    struct net_device *dev;
+    int (*output)(struct sk_buff*);
+};
+static inline __attribute__((always_inline)) int dst_output(struct sk_buff *skb) {
+    return skb_dst(skb)->output(skb);
+};
+struct iphdr {
+    __u8 protocol;
+};
+struct inet_sock {
+    __be16 inet_dport;
+    __u8 recverr: 1,     hdrincl: 1;
+    struct { } cork;
+};
+struct icmphdr {
+    __u8 type;
+};
+struct rtable {
+    union { struct dst_entry dst; } u;
+    __be32 rt_dst;
+};
+struct sock;
+struct inet_sock *inet_sk (struct sock *);
+struct net *sock_net (struct sock *);
+void *skb_transport_header (struct sk_buff *);
+static int raw_send_hdrinc(struct sock *sk, void *from, size_t length,
+                          struct rtable *rt,    unsigned int flags)
+{
+  struct inet_sock *inet = inet_sk(sk);
+  struct net *net = sock_net(sk);
+  struct iphdr *iph;
+  struct sk_buff *skb;
+  if (length > rt->u.dst.dev->mtu) 
+    ip_local_error(sk, 90, rt->rt_dst, inet->inet_dport, rt->u.dst.dev->mtu);
+  if (flags&0x10)
+    goto out;
+  if (iph->protocol == IPPROTO_ICMP)
+    icmp_out_count(net, ((struct icmphdr *)skb_transport_header(skb))->type);
+  NF_HOOK(2, NF_INET_LOCAL_OUT, skb, ((void *)0), rt->u.dst.dev,
+         dst_output);
+out:
+  while (0);
+}
+int raw_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)
+{
+  raw_send_hdrinc(sk, msg->msg_iov, len, (void *)0, msg->msg_flags);
+}