Summary: | [4.3 Regression] Revision 143404 caused ICE on 447.dealII in SPEC CPU 2006 | ||
---|---|---|---|
Product: | gcc | Reporter: | H.J. Lu <hjl.tools> |
Component: | c++ | Assignee: | Jason Merrill <jason> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gcc-bugs, jason, joey.ye, pinskia, xuepeng.guo |
Priority: | P1 | Keywords: | ice-checking, ice-on-valid-code |
Version: | 4.4.0 | ||
Target Milestone: | 4.3.3 | ||
Host: | Target: | ||
Build: | Known to work: | 4.3.2 | |
Known to fail: | Last reconfirmed: | 2009-01-16 20:41:49 |
Description
H.J. Lu
2009-01-16 19:06:04 UTC
Testcase? I don't have SPEC handy. [hjl@gnu-27 build_base_o3.0000]$ cat x.cc #include <string> #include <utility> template <int dim> class bar; template <int dim> std::pair<bar<dim> *, unsigned int> foo (const std::string &name, unsigned int position) { const std::pair<int,unsigned int> tmp; return std::make_pair (new bar<dim>(tmp.first), position); } [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -O2 x.cc -S x.cc: In function ‘std::pair<bar<dim>*, unsigned int> foo(const std::string&, unsigned int)’: x.cc:10: internal compiler error: tree check: expected field_decl, have identifier_node in lvalue_p_1, at cp/tree.c:120 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-27 build_base_o3.0000]$ [hjl@gnu-27 build_base_o3.0000]$ cat y.cc template<class _T1, class _T2> struct pair { typedef _T1 first_type; typedef _T2 second_type; _T1 first; _T2 second; pair () : first(), second() { } pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } }; template<class _T1, class _T2> inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } template <int dim> class bar; template <int dim> pair<bar<dim> *, unsigned int> foo (unsigned int position) { const pair<int,unsigned int> tmp; return make_pair (new bar<dim>(tmp.first), position); } [hjl@gnu-27 build_base_o3.0000]$ /export/gnu/import/rrs/143437/usr/bin/gcc -O2 y.cc -S y.cc: In function ‘pair<bar<dim>*, unsigned int> foo(unsigned int)’: y.cc:27: internal compiler error: tree check: expected field_decl, have identifier_node in lvalue_p_1, at cp/tree.c:120 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. [hjl@gnu-27 build_base_o3.0000]$ Subject: Bug 38877 Author: jason Date: Fri Jan 16 22:36:32 2009 New Revision: 143446 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143446 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. * init.c (build_new): Don't call describable_type unless we have an auto. Added: trunk/gcc/testsuite/g++.dg/template/lvalue1.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/init.c trunk/gcc/cp/tree.c Subject: Bug 38877 Author: jason Date: Fri Jan 16 22:40:25 2009 New Revision: 143448 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143448 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. * init.c (build_new): Don't call describable_type unless we have an auto. Modified: trunk/gcc/testsuite/ChangeLog Fixed for 4.4. Will fix in 4.3 soon. Patch is ok for the 4.3 branch, adjusting target milestone. Only happens with checking enabled. Subject: Bug 38877 Author: jason Date: Fri Jan 16 23:17:35 2009 New Revision: 143449 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=143449 Log: PR c++/38877 * tree.c (lvalue_p_1): Allow non-fields in COMPONENT_REF. Added: branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/lvalue1.C - copied unchanged from r143446, trunk/gcc/testsuite/g++.dg/template/lvalue1.C Modified: branches/gcc-4_3-branch/gcc/cp/ChangeLog branches/gcc-4_3-branch/gcc/cp/tree.c Fixed. |