public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54207] New: ICE in build_noexcept_spec when bool is #defined/typedef'd
@ 2012-08-09 11:04 andrewjcg at gmail dot com
  2012-08-09 11:39 ` [Bug c++/54207] " redi at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: andrewjcg at gmail dot com @ 2012-08-09 11:04 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 54207
           Summary: ICE in build_noexcept_spec when bool is
                    #defined/typedef'd
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andrewjcg@gmail.com


This ICE occurs under unique/odd but reproducible conditions.  The key
components of the environment for this bug appear to be:
1. 'bool' is typedef'd to a new type which is then #define'd over the existing
'bool' type (this is the case in the common.h head from the ldns package,
http://www.nlnetlabs.nl/projects/ldns/).
2. A user-defined class inherits from a templated base class, like
std::vector<string>.
3. This same class calls a noexcept method on a vector member (which appears to
trigger the build_noexcept_spec function).

This bug is reproducible with the following code on gcc-4.7.  It compiles
without error on gcc-4.6:

----------------------------------------------

typedef bool _Bool;
# define bool _Bool

#include <vector>
#include <iostream>
#include <cstring>
using namespace std;

class Test : public vector<string> {
public:
  Test (Test& that) {
    arr = std::move(that.arr);
  }
private:
  std::vector<int*> arr;
};


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

end of thread, other threads:[~2013-06-10 15:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-09 11:04 [Bug c++/54207] New: ICE in build_noexcept_spec when bool is #defined/typedef'd andrewjcg at gmail dot com
2012-08-09 11:39 ` [Bug c++/54207] " redi at gcc dot gnu.org
2012-10-06  0:15 ` [Bug c++/54207] [4.7/4.8 Regression] " paolo.carlini at oracle dot com
2012-11-19 12:50 ` jakub at gcc dot gnu.org
2012-12-03 15:41 ` [Bug c++/54207] [4.7/4.8 Regression][C++0x] " rguenth at gcc dot gnu.org
2012-12-04 11:09 ` jakub at gcc dot gnu.org
2012-12-06 18:56 ` jakub at gcc dot gnu.org
2012-12-06 19:16 ` [Bug c++/54207] [4.7 " jakub at gcc dot gnu.org
2013-02-01 14:06 ` jakub at gcc dot gnu.org
2013-02-01 14:28 ` jakub at gcc dot gnu.org
2013-06-10 15:46 ` 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).