re PR c++/60474 (Crash in tree_class_check)
2014-03-10 Richard Biener <rguenther@suse.de> PR middle-end/60474 * tree.c (signed_or_unsigned_type_for): Handle OFFSET_TYPEs. * g++.dg/torture/pr60474.C: New testcase. From-SVN: r208451
This commit is contained in:
parent
3912b32f8d
commit
3c1c08d6d7
@ -1,3 +1,8 @@
|
||||
2014-03-10 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/60474
|
||||
* tree.c (signed_or_unsigned_type_for): Handle OFFSET_TYPEs.
|
||||
|
||||
2014-03-08 Douglas B Rupp <rupp@gnat.com>
|
||||
|
||||
* config/vms/vms.opt (vms_float_format): New variable.
|
||||
|
@ -1,3 +1,8 @@
|
||||
2014-03-10 Richard Biener <rguenther@suse.de>
|
||||
|
||||
PR middle-end/60474
|
||||
* g++.dg/torture/pr60474.C: New testcase.
|
||||
|
||||
2014-03-09 Andreas Schwab <schwab@linux-m68k.org>
|
||||
|
||||
* g++.dg/cpp0x/alias-decl-debug-0.C: Move dg-skip after dg-do.
|
||||
|
16
gcc/testsuite/g++.dg/torture/pr60474.C
Normal file
16
gcc/testsuite/g++.dg/torture/pr60474.C
Normal file
@ -0,0 +1,16 @@
|
||||
// { dg-do compile }
|
||||
|
||||
struct Layer;
|
||||
template <typename> struct A
|
||||
{
|
||||
Layer *m_fn1 ();
|
||||
Layer &operator[](int p1) { return m_fn1 ()[p1]; }
|
||||
};
|
||||
struct Layer
|
||||
{
|
||||
};
|
||||
void fn1 (A<int> &p1, int Layer::*p2, int p3)
|
||||
{
|
||||
for (int a = 0;; ++a, ++p3)
|
||||
p1[p3].*p2 = p1[a].*p2;
|
||||
}
|
@ -10588,7 +10588,8 @@ signed_or_unsigned_type_for (int unsignedp, tree type)
|
||||
}
|
||||
|
||||
if (!INTEGRAL_TYPE_P (type)
|
||||
&& !POINTER_TYPE_P (type))
|
||||
&& !POINTER_TYPE_P (type)
|
||||
&& TREE_CODE (type) != OFFSET_TYPE)
|
||||
return NULL_TREE;
|
||||
|
||||
return build_nonstandard_integer_type (TYPE_PRECISION (type), unsignedp);
|
||||
|
Loading…
Reference in New Issue
Block a user