This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Jan 2009 18:38:20 -0000
- Subject: [Bug c++/38705] [4.4 Regression] ICE: canonical types differ for identical types const int and const AlpsNodeIndex_t
- References: <bug-38705-14147@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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