public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/42758]  New: ICE on assert() in function with complex(?) template argument
@ 2010-01-15 13:38 adl at gnu dot org
  2010-01-15 13:40 ` [Bug c++/42758] " adl at gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: adl at gnu dot org @ 2010-01-15 13:38 UTC (permalink / raw)
  To: gcc-bugs

The following code compiles fine with g++-4.4 and causes g++-4.5 to segfault.
Removing the assert() or removing the int_less_than parameter no longer lead
to a segfault.

% g++-4.5 --version
g++-4.5 (Debian 4.5-20091226-1) 4.5.0 20091226 (experimental) [trunk revision
155473]
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% cat bug.cc
#include <cassert>
#include <set>

namespace spot
{
  struct int_less_than
  {
    bool operator()(int, int) const { return 0; }
  };

  int f(const std::set<int, int_less_than>&)
  {
    assert(0);
    return 1;
  }
}
% g++-4.4 -c bug.cc    # 4.4 runs OK
% g++-4.5 -c bug.cc
g++-4.5: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.


-- 
           Summary: ICE on assert() in function with complex(?) template
                    argument
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: adl at gnu dot org
 GCC build triplet: i686-linux-gnu
  GCC host triplet: i686-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

end of thread, other threads:[~2010-02-07  4:46 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-15 13:38 [Bug c++/42758] New: ICE on assert() in function with complex(?) template argument adl at gnu dot org
2010-01-15 13:40 ` [Bug c++/42758] " adl at gnu dot org
2010-01-15 14:07 ` paolo dot carlini at oracle dot com
2010-01-15 15:06 ` matz at gcc dot gnu dot org
2010-01-15 15:19 ` [Bug c++/42758] [4.5 Regression] " paolo dot carlini at oracle dot com
2010-01-15 15:21 ` rguenth at gcc dot gnu dot org
2010-01-15 18:57 ` hjl dot tools at gmail dot com
2010-01-17 17:02 ` rguenth at gcc dot gnu dot org
2010-01-18 16:11 ` dodji at gcc dot gnu dot org
2010-01-28  8:38 ` dodji at gcc dot gnu dot org
2010-01-29 14:31 ` dodji at gcc dot gnu dot org
2010-01-29 16:08 ` dodji at gcc dot gnu dot org
2010-02-07  4:49 ` hjl at gcc dot gnu 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).