From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 762 invoked by alias); 29 Feb 2012 09:41:40 -0000 Received: (qmail 741 invoked by uid 22791); 29 Feb 2012 09:41:38 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_BJ,TW_CX,TW_DC,TW_GX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Feb 2012 09:41:25 +0000 From: "jyasskin at gcc dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jyasskin at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: CC Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-02/txt/msg02771.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D46596 Jeffrey Yasskin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jyasskin at gcc dot gnu.org --- Comment #4 from Jeffrey Yasskin 2012-02-2= 9 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 =E2=80=98__vsyslog_chk=E2=80=99: test.i:7:28: sorry, unimplemented: inlining failed in call to =E2=80=98sysl= og=E2=80=99: function body not available test.i:10:11: sorry, unimplemented: called from here $ gcc -v Using built-in specs. COLLECT_GCC=3Dgcc COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-linux-gnu/4.6.1/lto-wrapper Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion=3D'Ubuntu/Linaro 4.6.1-9ubuntu3' --with-bugurl=3Dfile:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=3Dc,c++,fortran,objc,obj-c++,go --prefix=3D/usr --program-suffix=3D-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=3D/usr/lib --without-included-gettext --enable-threads=3Dposix --with-gxx-include-dir=3D/usr/include/c++/4.6 --libdir=3D/usr/lib --enable-nls --with-sysroot=3D/ --enable-clocale=3Dgnu --enable-libstdcxx-debug --enable-libstdcxx-time=3Dyes --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=3Di686 --with-tune=3Dgener= ic --enable-checking=3Drelease --build=3Dx86_64-linux-gnu --host=3Dx86_64-linu= x-gnu --target=3Dx86_64-linux-gnu Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)=20 I haven't yet built a gcc from head to make sure the behavior is there with= out Ubuntu's patches. The glibc problem was described at http://plash.beasts.org/wiki/GlibcBuildIssues#head-b9149fbab065967691cf1bad= e23d84325c05e9b0 and reported at http://sourceware.org/bugzilla/show_bug.cgi?id=3D10375, but= it looks like a gcc problem to me.