re PR c++/53839 ([C++11] internal compiler error: in adjust_temp_type, at cp/semantics.c:6391)
PR c++/53839 * semantics.c (cxx_eval_indirect_ref): If we aren't looking for an address, make sure the value is constant. From-SVN: r191266
This commit is contained in:
parent
1a4d4885c6
commit
7ccba73cef
|
@ -1,3 +1,9 @@
|
|||
2012-09-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/53839
|
||||
* semantics.c (cxx_eval_indirect_ref): If we aren't looking for an
|
||||
address, make sure the value is constant.
|
||||
|
||||
2012-09-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/54511
|
||||
|
|
|
@ -7454,7 +7454,11 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t,
|
|||
}
|
||||
|
||||
if (r == NULL_TREE)
|
||||
return t;
|
||||
{
|
||||
if (!addr)
|
||||
VERIFY_CONSTANT (t);
|
||||
return t;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2012-09-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/53839
|
||||
* g++.dg/cpp0x/constexpr-temp1.C: New.
|
||||
|
||||
2012-09-13 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/54511
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// { dg-do compile { target c++11 } }
|
||||
|
||||
struct A { int i; };
|
||||
constexpr A f2 (const A& a) { return a; }
|
||||
constexpr int f1 (const A &a) { return f2(a).i; }
|
||||
A g(const A &a)
|
||||
{
|
||||
return { f1(a) };
|
||||
}
|
Loading…
Reference in New Issue