public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47987] New: ICE on legal code (when attempting to inline non-implicitly instantiated template member function)
@ 2011-03-04 11:37 niemayer at isg dot de
  2011-03-04 11:43 ` [Bug c++/47987] " niemayer at isg dot de
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: niemayer at isg dot de @ 2011-03-04 11:37 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE on legal code (when attempting to inline
                    non-implicitly instantiated template member function)
           Product: gcc
           Version: 4.5.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: niemayer@isg.de


Created attachment 23540
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23540
preprocessed and gzipped legal C++ code causing ICE with gcc 4.5.[0-2]

When compiling the attached "crash.ii" file using gcc 4.5.[012] with

> gcc -O3 -fno-implicit-templates -c crash.ii -o crash.o

gcc crashes with a segmentation fault:

> crashtest.cxx: In static member function 'static bool LKV::MatchEntity::init_text_2_3(const LKV::Str&, LKV::Str&, LKV::Str&, LKV::Array<long unsigned int, true, LKV::_T<LKV::AbsPtr>, long unsigned int>*, LKV::Array<long unsigned int, true, LKV::_T<LKV::AbsPtr>, long unsigned int>*)':
crashtest.cxx:130:3:
> internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.


The same code is compiled fine by gcc 4.4.*, it also compiles fine with
-O[0-2].

Notice that this code is part of a library that uses explicit template
instantiations, intriguingly when compiling with "-fimplicit-templates", gcc
4.5.* does not crash - which let's me wonder how "just doing less" can actually
trigger such a bug :-)


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

end of thread, other threads:[~2011-09-29 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-04 11:37 [Bug c++/47987] New: ICE on legal code (when attempting to inline non-implicitly instantiated template member function) niemayer at isg dot de
2011-03-04 11:43 ` [Bug c++/47987] " niemayer at isg dot de
2011-03-04 13:29 ` rguenth at gcc dot gnu.org
2011-09-29 17:57 ` paolo.carlini at oracle dot com

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