Bug 67870 - ICE: in type_throw_all_p, at cp/except.c:1306
Summary: ICE: in type_throw_all_p, at cp/except.c:1306
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.9.3
: P3 normal
Target Milestone: 5.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-06 17:20 UTC by Konstantin Isakov
Modified: 2015-10-22 18:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Isakov 2015-10-06 17:20:02 UTC
The following code snippet makes the compiler ICE. Affects at least 4.8.2 and 4.9.3. Does not seem to affect 5.x. Compile with --std=c++11

==================================================

#include <type_traits>

template< class T >
struct Tmpl
{
  ~Tmpl() noexcept( std::is_nothrow_destructible< T >::value )
  {}
};

struct Empty
{
};

struct Foo
{
  ~Foo()
  {}

  Tmpl< Empty > member;
};

int main()
{
}

==================================================

Live snippet to play with: http://melpon.org/wandbox/permlink/6vmp1P7Ppwzjk1kh
Comment 1 Konstantin Isakov 2015-10-06 17:25:08 UTC
$ g++-4.9 --std=c++11 bug.cc 
bug.cc: In destructor ‘Foo::~Foo()’:
bug.cc:17:3: internal compiler error: in type_throw_all_p, at cp/except.c:1306
   {}
   ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ g++-4.9 --version
g++-4.9 (Debian 4.9.3-4) 4.9.3
Comment 2 Paolo Carlini 2015-10-22 18:10:06 UTC
Confirmed fixed in 5.x and 6.x.