http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48880
Summary: regression when performing __builtin_object_size in deep inline chain Product: gcc Version: 4.6.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: bary...@smp.if.uj.edu.pl Created attachment 24188 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24188 minimized test case Hi. My first bug report to gcc :) $ gcc-4.6 -v Using built-in specs. COLLECT_GCC=gcc-4.6 COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.6.1/lto-wrapper Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 4.6.0-6' --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-multiarch --with-multiarch-defaults=i386-linux-gnu --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 --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-targets=all --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.6.1 20110428 (prerelease) (Debian 4.6.0-6) linux (2.6.38) kernel fails to compile when using gcc 4.6. It fails on binfmt_misc.o compilation. Minimized test case attached (from 780703 bytes, down to 471 bytes, thanks to delta) gcc 4.5.3 works without problem. gcc 4.6.1 gives: $ gcc-4.6 -O2 -c binfmt_misc_ultramini.i binfmt_misc_ultramini.i: In function ‘p.part.0’: binfmt_misc_ultramini.i:8:14: error: call to ‘c_overflow’ declared with attribute error: c() buffer size is not provably correct $ Regression dissapear when i use -O3 or -finline-functions optimization. Also problem disapears when i subtelly change minimized test case. Thus it is problem with inliner. Regards, Witek