public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55788] New: inlining failed in call to always_inline: mismatched arguments
@ 2012-12-22 16:07 geza at bitquad dot com
  2012-12-22 17:58 ` [Bug c++/55788] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: geza at bitquad dot com @ 2012-12-22 16:07 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55788
           Summary: inlining failed in call to always_inline: mismatched
                    arguments
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: geza@bitquad.com


Created attachment 29028
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29028
source code which fails to compile

Hi,

I've found a possible bug in gcc. I've attached a source code which fails to
compile with:

'g++ -c -O2 inline_problem.cpp'

Gcc prints:
inline_problem.cpp: In function ‘void bar(Foo&)’:
inline_problem.cpp:24:60: error: inlining failed in call to always_inline
‘Delegate<void(PAR)> delegate(OBJECT&, void (OBJECT::*)(PAR)) [with OBJECT =
Foo; PAR = int]’: mismatched arguments
inline_problem.cpp:35:27: error: called from here

The code compiles, if you do any of the following:
* remove '-O2'
* replace 'sint' with 'int' at line 32
* remove one of the 'delegate' calls from the function 'bar'

It fails to compile with 4.4.6, 4.6.3, 4.7.2.
However, it compiles with 4.5.3.

g++-4.7 -v prints:
Using built-in specs.
COLLECT_GCC=g++-4.7
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --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.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object
--enable-plugin --enable-objc-gc --with-arch-32=i586 --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.7.2 (Debian 4.7.2-4)


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

end of thread, other threads:[~2013-03-01 11:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-22 16:07 [Bug c++/55788] New: inlining failed in call to always_inline: mismatched arguments geza at bitquad dot com
2012-12-22 17:58 ` [Bug c++/55788] " pinskia at gcc dot gnu.org
2013-02-27 18:03 ` paolo.carlini at oracle dot com
2013-02-27 18:52 ` jakub at gcc dot gnu.org
2013-03-01 11:08 ` rguenth at gcc dot gnu.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).