public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/40641]  New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os
@ 2009-07-03 16:15 florian at openwrt dot org
  2009-07-03 16:16 ` [Bug c/40641] " florian at openwrt dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-07-03 16:15 UTC (permalink / raw)
  To: gcc-bugs

This is a bug report from an OpenWrt user that I have also noticed myself.
uClibc requires its syscalls to be inlined and therefore the attribute
always_inline was added to ensure inlining.

When gcc is called with -Os the always_inline attribute is not honored,
resulting in a non working uClibc ldso. Please find the environmnet below.

This is probably related to the regression closed here:

System type: Debian testing compiling OpenWrt trunk 16656
GCC configuration: Using built-in specs.
Target: mips-openwrt-linux-uclibc
Configured with:
/home/florian/dev/openwrt/trunk/build_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/gcc-4.4.0/configure
--prefix=/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/usr
--build=i486-linux-gnu --host=i486-linux-gnu --target=mips-openwrt-linux-uclibc
--with-gnu-ld --enable-target-optspace --disable-libgomp --disable-libmudflap
--disable-multilib --disable-nls --with-float=soft
--with-gmp=/home/florian/dev/openwrt/trunk/staging_dir/host
--with-mpfr=/home/florian/dev/openwrt/trunk/staging_dir/host
--disable-decimal-float --disable-libssp --disable-__cxa_atexit
--enable-languages=c --enable-shared --enable-threads --disable-tls
--with-slibdir=/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/lib
Thread model: posix
gcc version 4.4.0 (GCC)

Compiler output:
mips-openwrt-linux-uclibc-gcc -c ldso/ldso/ldso.c -o ldso/ldso/ldso.oS -include
./include/libc-symbols.h -Wall -Wstrict-prototypes -fno-strict-aliasing -Os
-march=octeon -pipe -funit-at-a-time -fhonour-copts -msoft-float
-fno-stack-protector -fno-builtin -nostdinc -I./include -I.
-I./libc/sysdeps/linux/mips -fno-asm -msoft-float -DUCLIBC_INTERNAL -std=gnu99
-Os -funit-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts
-fno-strength-reduce -mno-split-addresses
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux/mips
-I./libpthread/linuxthreads.old/sysdeps/mips
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux
-I./libpthread/linuxthreads.old/sysdeps/pthread -I./libpthread/linuxthreads.old
-I./libpthread
-I/home/florian/dev/openwrt/trunk/build_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/linux-dev/usr/include/
-I/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.4.0//include-fixed
-I/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.4.0/include
-DNDEBUG -mno-split-addresses -fPIC -DSHARED -DNOT_IN_libc -DIS_IN_rtld
-fno-stack-protector -E -fno-omit-frame-pointer -I./ldso/ldso/mips
-I./ldso/include -I./ldso/ldso -DUCLIBC_RUNTIME_PREFIX="/"
-DUCLIBC_LDSO="ld-uClibc.so.0" -DLDSO_ELFINTERP="mips/elfinterp.c"
-DNOT_IN_libc -DIS_IN_rtld -fno-stack-protector -E -fno-omit-frame-pointer
-I./ldso/ldso/mips -I./ldso/include -I./ldso/ldso -DUCLIBC_RUNTIME_PREFIX="/"
-DUCLIBC_LDSO="ld-uClibc.so.0" -MT ldso/ldso/ldso.oS -MD -MP -MF
ldso/ldso/.ldso.oS.dep
mips-openwrt-linux-uclibc-gcc -c ldso/ldso/mips/resolve.S -o
ldso/ldso/mips/resolve.oS -include ./include/libc-symbols.h -Wall
-Wstrict-prototypes -fno-strict-aliasing -Os -march=octeon -pipe
-funit-at-a-time -fhonour-copts -msoft-float -fno-stack-protector -fno-builtin
-nostdinc -I./include -I. -I./libc/sysdeps/linux/mips -fno-asm -msoft-float
-DUCLIBC_INTERNAL -Os -funit-at-a-time -fno-tree-loop-optimize
-fno-tree-dominator-opts -fno-strength-reduce -mno-split-addresses
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux/mips
-I./libpthread/linuxthreads.old/sysdeps/mips
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux
-I./libpthread/linuxthreads.old/sysdeps/pthread -I./libpthread/linuxthreads.old
-I./libpthread
-I/home/florian/dev/openwrt/trunk/build_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/linux-dev/usr/include/
-I/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.4.0//include-fixed
-I/home/florian/dev/openwrt/trunk/staging_dir/toolchain-mips_gcc-4.4.0_uClibc-0.9.30.1/usr/lib/gcc/mips-openwrt-linux-uclibc/4.4.0/include
-DNDEBUG -mno-split-addresses -fPIC -DSHARED -DNOT_IN_libc -DIS_IN_rtld
-fno-stack-protector -E -fno-omit-frame-pointer -I./ldso/ldso/mips
-I./ldso/include -I./ldso/ldso -DUCLIBC_RUNTIME_PREFIX="/"
-DUCLIBC_LDSO="ld-uClibc.so.0" -MT ldso/ldso/mips/resolve.oS -MD -MP -MF
ldso/ldso/mips/.resolve.oS.dep -D__ASSEMBLER__ -Wa,--noexecstack


-- 
           Summary: gcc-4.4.0 does not honor the alway_inline attribute when
                    using -Os
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: florian at openwrt dot org
 GCC build triplet: i486-linux-gnu-
  GCC host triplet: i486-linux-gnu-
GCC target triplet: mips-openwrt-linux-uclibc


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
@ 2009-07-03 16:16 ` florian at openwrt dot org
  2009-07-03 17:24 ` rguenth at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-07-03 16:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from florian at openwrt dot org  2009-07-03 16:16 -------
Created an attachment (id=18136)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18136&action=view)
ldso.Os.i preprocessed file

This file is the preprocessed file which causes problems.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
  2009-07-03 16:16 ` [Bug c/40641] " florian at openwrt dot org
@ 2009-07-03 17:24 ` rguenth at gcc dot gnu dot org
  2009-07-03 17:33 ` rguenth at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-03 17:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from rguenth at gcc dot gnu dot org  2009-07-03 17:24 -------
Does -fno-ipa-cp fix it?


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
  2009-07-03 16:16 ` [Bug c/40641] " florian at openwrt dot org
  2009-07-03 17:24 ` rguenth at gcc dot gnu dot org
@ 2009-07-03 17:33 ` rguenth at gcc dot gnu dot org
  2009-07-06 10:39 ` florian at openwrt dot org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-07-03 17:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2009-07-03 17:32 -------
Btw, with a cross I cannot seem to reproduce the problem.  How do non-inlined
calls look like with mips?


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
                   ` (3 preceding siblings ...)
  2009-07-06 10:39 ` florian at openwrt dot org
@ 2009-07-06 10:39 ` florian at openwrt dot org
  2009-08-04  8:58 ` florian at openwrt dot org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-07-06 10:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from florian at openwrt dot org  2009-07-06 10:39 -------
(In reply to comment #3)
> Btw, with a cross I cannot seem to reproduce the problem.  How do non-inlined
> calls look like with mips?
> 

Let me attach a file showing how it looks like.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
                   ` (2 preceding siblings ...)
  2009-07-03 17:33 ` rguenth at gcc dot gnu dot org
@ 2009-07-06 10:39 ` florian at openwrt dot org
  2009-07-06 10:39 ` florian at openwrt dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-07-06 10:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from florian at openwrt dot org  2009-07-06 10:38 -------
(In reply to comment #2)
> Does -fno-ipa-cp fix it?
> 

Unfortunately, no the problem is still there event with -fno-ipa-cp.


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
                   ` (4 preceding siblings ...)
  2009-07-06 10:39 ` florian at openwrt dot org
@ 2009-08-04  8:58 ` florian at openwrt dot org
  2009-09-09 15:05 ` [Bug tree-optimization/40641] " florian at openwrt dot org
  2009-09-26 17:59 ` [Bug target/40641] " florian at openwrt dot org
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-08-04  8:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from florian at openwrt dot org  2009-08-04 08:58 -------
Created an attachment (id=18295)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=18295&action=view)
ldso.Os.i preprocessed file with non-inlined syscalls


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug tree-optimization/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
                   ` (5 preceding siblings ...)
  2009-08-04  8:58 ` florian at openwrt dot org
@ 2009-09-09 15:05 ` florian at openwrt dot org
  2009-09-26 17:59 ` [Bug target/40641] " florian at openwrt dot org
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-09-09 15:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from florian at openwrt dot org  2009-09-09 15:04 -------
Ping ? Anything else I should provide ? The bug is still present with gcc-4.4.1


-- 


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug target/40641] gcc-4.4.0 does not honor the alway_inline attribute when using -Os
  2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
                   ` (6 preceding siblings ...)
  2009-09-09 15:05 ` [Bug tree-optimization/40641] " florian at openwrt dot org
@ 2009-09-26 17:59 ` florian at openwrt dot org
  7 siblings, 0 replies; 9+ messages in thread
From: florian at openwrt dot org @ 2009-09-26 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from florian at openwrt dot org  2009-09-26 17:59 -------
(In reply to comment #7)
> Ping ? Anything else I should provide ? The bug is still present with gcc-4.4.1
> 

The bug is now solved with Dan's uClibc patch to prevent some registers to be
clobberd in syscalls.(In reply to comment #7)
> Ping ? Anything else I should provide ? The bug is still present with gcc-4.4.1
> 

The bug is fixed with the following patch :
http://lists.uclibc.org/pipermail/uclibc/2009-September/043020.html


-- 

florian at openwrt dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-26 17:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-03 16:15 [Bug c/40641] New: gcc-4.4.0 does not honor the alway_inline attribute when using -Os florian at openwrt dot org
2009-07-03 16:16 ` [Bug c/40641] " florian at openwrt dot org
2009-07-03 17:24 ` rguenth at gcc dot gnu dot org
2009-07-03 17:33 ` rguenth at gcc dot gnu dot org
2009-07-06 10:39 ` florian at openwrt dot org
2009-07-06 10:39 ` florian at openwrt dot org
2009-08-04  8:58 ` florian at openwrt dot org
2009-09-09 15:05 ` [Bug tree-optimization/40641] " florian at openwrt dot org
2009-09-26 17:59 ` [Bug target/40641] " florian at openwrt dot org

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).