This is the mail archive of the gcc-bugs@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 c/33763] [4.6/4.7/4.8 Regression] Bogus inlining failed in call to `xxx': redefined extern inline functions are not considered for inlining


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

Juha Kallioinen <kaltsi+gnu at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kaltsi+gnu at gmail dot com

--- Comment #41 from Juha Kallioinen <kaltsi+gnu at gmail dot com> ---
Maybe this failure with a newly built gcc 4.8 is related to this bug.

Built gcc today from
commit a846b696b9f3e9b9caab7e43ef8450cbded2715c
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_8-branch@202762
138bc75d-0d04-0410-961f-82ee72b

~/gcc48/bin$ ./gcc -v
Using built-in specs.
COLLECT_GCC=./gcc
COLLECT_LTO_WRAPPER=/home/kaltsi/gcc48/libexec/gcc/x86_64-unknown-linux-gnu/4.8.2/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/home/kaltsi/gcc48
--disable-bootstrap --with-tune=generic --disable-multilib
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-gnu-unique-object --enable-lto
--enable-linker-build-id --enable-languages=c,c++ --enable-threads=posix
--enable-shared --disable-libgcj
Thread model: posix
gcc version 4.8.2 20130920 (prerelease) (GCC) 

Compiling the following simple program with these options on an Ubuntu 12.04
causes a failure:

$ gcc -Wp,-D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE=1




-- foo.c --
#include <sys/socket.h>

extern ssize_t recvfrom(int s, void *buf, size_t len, int flags, struct
sockaddr *from, socklen_t *fromlen);

int main()
{
  int s, flags; void *buf; size_t len; struct sockaddr *from; socklen_t*
fromlen;
  return(recvfrom(s, buf, len, flags, from, fromlen));
}

-- foo.c --

~/gcc48/bin$ ./gcc -Wp,-D_FORTIFY_SOURCE=2 -O2 -D_GNU_SOURCE=1 foo.c
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:251:0,
                 from foo.c:5:
foo.c: In function âmainâ:
/usr/include/x86_64-linux-gnu/bits/socket2.h:65:1: error: inlining failed in
call to always_inline ârecvfromâ: mismatched arguments
 recvfrom (int __fd, void *__restrict __buf, size_t __n, int __flags,
 ^
foo.c:12:18: error: called from here
   return(recvfrom(s, buf, len, flags, from, fromlen));
                  ^

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