This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33865] [4.3 Regression] ICE: canonical types differ for identical types const
- From: "tbm at cyrius dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Oct 2007 21:12:47 -0000
- Subject: [Bug c++/33865] [4.3 Regression] ICE: canonical types differ for identical types const
- References: <bug-33865-12387@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from tbm at cyrius dot com 2007-10-22 21:12 -------
struct LE16 {
operator unsigned () const {
}
};
struct LE32 {
};
namespace N_BELE_CTP {
struct LEPolicy {
typedef LE16 U16;
typedef LE32 U32;
};
};
namespace N_Elf {
template <class THalf, class TWord, class TXword, class TAddr, class TOff>
struct ElfITypes {
typedef THalf Half;
};
template <class TElfITypes> struct Ehdr {
typedef typename TElfITypes::Half Half;
Half e_shnum;
};
}
namespace N_Elf32 {
template <class TElfITypes> struct Phdr {
};
template <class TElfITypes> struct Shdr {
} __attribute__((__packed__,__aligned__(1)));
}
namespace N_Elf {
template <class TP> struct ElfClass_32 {
typedef typename TP::U16 U16;
typedef typename TP::U32 U32;
typedef N_Elf::ElfITypes<U16, U32, U32, U32, U32> ElfITypes;
typedef N_Elf ::Ehdr<ElfITypes> Ehdr;
typedef N_Elf32::Shdr<ElfITypes> Shdr;
};
}
typedef N_Elf::ElfClass_32<N_BELE_CTP::LEPolicy> ElfClass_LE32;
template <class TElfClass> class PackVmlinuxBase {
protected:
typedef TElfClass ElfClass;
typedef typename ElfClass::Ehdr Ehdr;
typedef typename ElfClass::Shdr Shdr;
Shdr *shdri;
Ehdr ehdri;
virtual Shdr const *getElfSections();
virtual bool canPack();
};
class PackVmlinuxI386 : public PackVmlinuxBase<ElfClass_LE32> {
virtual const int *getCompressionMethods(void) const;
};
template <class T> typename T::Shdr const *PackVmlinuxBase<T>::getElfSections()
{
Shdr const *p, *shstrsec=0;
int j;
for (p = shdri, j= ehdri.e_shnum; --j >= 0; ++p);
}
template <class T> bool PackVmlinuxBase<T>::canPack() {
Shdr const *p, *const shstrsec = getElfSections();
}
const int *PackVmlinuxI386::getCompressionMethods(void) const {
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33865