Summary: | [6 Regression] ICE: canonical types differ for identical types | ||
---|---|---|---|
Product: | gcc | Reporter: | James Almer <jamrial> |
Component: | c++ | Assignee: | Nathan Sidwell <nathan> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | jason, nathan |
Priority: | P3 | ||
Version: | 6.0 | ||
Target Milestone: | 6.0 | ||
Host: | Target: | ||
Build: | Known to work: | 4.9.2, 5.0 | |
Known to fail: | 6.0 | Last reconfirmed: | 2015-04-30 00:00:00 |
Attachments: | Preprocessed source as generated by -freport-bug |
Description
James Almer
2015-04-30 05:38:14 UTC
markus@x4 tmp % cat test.ii class A; template <typename> struct B { typedef A type; }; template <class T> class C : public B<T>::type { } __attribute__ ((__may_alias__)); class A { operator const C<int> &() { return *static_cast<const C<int> *> (this); } }; markus@x4 tmp % g++ -c test.ii test.ii: In member function ‘A::operator const C<int>&()’: test.ii:13:72: internal compiler error: canonical types differ for identical types const C<int>* and const C<int>* Author: nathan Date: Sat May 23 22:28:54 2015 New Revision: 223613 URL: https://gcc.gnu.org/viewcvs?rev=223613&root=gcc&view=rev Log: cp/ PR c++/65936 * pt.c (lookup_template_class_1): Copy may_alias attribute too. testsuite/ PR c++/65936 * g++.dg/template/pr65936.C: New. Added: trunk/gcc/testsuite/g++.dg/template/pr65936.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/pt.c trunk/gcc/testsuite/ChangeLog Patch committed to trunk |