Bug 49290 - [4.6/4.7 Regression][C++0x] ICE in in cxx_eval_indirect_ref, at cp/semantics.c:6795
Summary: [4.6/4.7 Regression][C++0x] ICE in in cxx_eval_indirect_ref, at cp/semantics....
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.6.1
: P2 normal
Target Milestone: 4.6.1
Assignee: Jason Merrill
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-05 14:03 UTC by Pawel Sikora
Modified: 2011-06-14 23:41 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.5.4
Known to fail: 4.6.1, 4.7.0
Last reconfirmed: 2011-06-05 22:20:50


Attachments
testcase (128.22 KB, application/bzip2)
2011-06-05 14:03 UTC, Pawel Sikora
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2011-06-05 14:03:04 UTC
Created attachment 24437 [details]
testcase

$ g++46 0x.ii -c -std=gnu++0x
camellia.cpp: In member function 'virtual void CryptoPP::Camellia::Base::ProcessAndXorBlock(const byte*, const byte*, byte*) const':
camellia.cpp:213:31: internal compiler error: in cxx_eval_indirect_ref, at cp/semantics.c:6795
Comment 1 Jakub Jelinek 2011-06-05 22:20:50 UTC
Started http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170488
Smaller testcase for -std=c++0x:
typedef unsigned T;
struct S
{
  T foo (void);
  static unsigned s1[16];
};
T
S::foo ()
{
  T u = *(T *) (s1 + 10);
  return u;
}
Comment 2 Jason Merrill 2011-06-14 18:15:46 UTC
Author: jason
Date: Tue Jun 14 18:15:43 2011
New Revision: 175041

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175041
Log:
	PR c++/49290
	* semantics.c (cxx_fold_indirect_ref): Local, more permissive copy
	of fold_indirect_ref_1.
	(cxx_eval_indirect_ref): Use it.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Jason Merrill 2011-06-14 22:13:24 UTC
Author: jason
Date: Tue Jun 14 22:13:19 2011
New Revision: 175058

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=175058
Log:
	PR c++/49290
	* semantics.c (cxx_eval_indirect_ref): Remove assert.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/g++.dg/cpp0x/regress/49290.C
Modified:
    branches/gcc-4_6-branch/gcc/cp/ChangeLog
    branches/gcc-4_6-branch/gcc/cp/semantics.c
Comment 4 Jason Merrill 2011-06-14 23:41:15 UTC
Fixed for 4.6.1.