This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-01-02 18:38 -------
Reduced testcase:
typedef int AlpsNodeIndex_t;
  void writeRep(char* representation_, const int len)   {
    __builtin_memcpy(representation_ , &len, sizeof(int));
  }
struct AlpsTreeNode
{
  AlpsNodeIndex_t index_;
  int explicit_;
  int encodeAlps() const;
  template <class T> void writeRep(const T& value) const {      }
};
int AlpsTreeNode:: encodeAlps()     const
{
  writeRep(explicit_);
  writeRep(index_);
}

--- CUT ---
I think this might have something to do with the __builtin_memcpy optimization.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
 GCC target triplet|x86_64-unknown-linux-gnu    |
           Keywords|                            |ice-checking, ice-on-valid-
                   |                            |code
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-02 18:38:20
               date|                            |
            Summary|ICE: canonical types differ |[4.4 Regression] ICE:
                   |for identical types const   |canonical types differ for
                   |int and const               |identical types const int
                   |AlpsNodeIndex_t             |and const AlpsNodeIndex_t
   Target Milestone|---                         |4.4.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]