public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jyasskin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/46596] misbehavior when mixing always_inline and alias attributes in the same compilation unit
Date: Wed, 29 Feb 2012 09:44:00 -0000	[thread overview]
Message-ID: <bug-46596-4-OOjIo1fpym@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46596-4@http.gcc.gnu.org/bugzilla/>

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

Jeffrey Yasskin <jyasskin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jyasskin at gcc dot gnu.org

--- Comment #4 from Jeffrey Yasskin <jyasskin at gcc dot gnu.org> 2012-02-29 09:41:05 UTC ---
glibc runs into the "sorry, unimplemented" part of the issue, with
delta-reduced code like:

$ cat test.i
typedef __builtin_va_list __gnuc_va_list;
extern __inline __attribute__ ((__always_inline__)) __attribute__
((__artificial__)) void syslog (int __pri, const char *__fmt, ...) {
};
typedef __gnuc_va_list va_list;
void __syslog(int pri, const char *fmt, ...) {
}
extern __typeof (__syslog) syslog __attribute__ ((alias ("__syslog")));
void __vsyslog_chk(int pri, int flag, const char *fmt, va_list ap) {
  if (pri & ~(0x07|0x03f8)) {
    syslog(3|0x02|0x20|0x01,
           "syslog: unknown facility/priority: %x", pri);
  }
}
$ gcc -c -O2 -Winline test.i
test.i: In function ‘__vsyslog_chk’:
test.i:7:28: sorry, unimplemented: inlining failed in call to ‘syslog’:
function body not available
test.i:10:11: sorry, unimplemented: called from here

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.6.1-9ubuntu3' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++,go --prefix=/usr
--program-suffix=-4.6 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin
--enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) 


I haven't yet built a gcc from head to make sure the behavior is there without
Ubuntu's patches. The glibc problem was described at
http://plash.beasts.org/wiki/GlibcBuildIssues#head-b9149fbab065967691cf1bade23d84325c05e9b0
and reported at http://sourceware.org/bugzilla/show_bug.cgi?id=10375, but it
looks like a gcc problem to me.


  parent reply	other threads:[~2012-02-29  9:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-22  3:50 [Bug c/46596] New: " vapier at gentoo dot org
2010-11-22  4:58 ` [Bug c/46596] " vapier at gentoo dot org
2010-11-22 11:11 ` rguenth at gcc dot gnu.org
2010-11-22 19:02 ` vapier at gentoo dot org
2012-02-29  9:44 ` jyasskin at gcc dot gnu.org [this message]
2012-02-29 15:16 ` hubicka at ucw dot cz
2012-02-29 16:22 ` vapier at gentoo dot org
2024-03-01 23:09 ` [Bug ipa/46596] " pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-46596-4-OOjIo1fpym@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).