Commit 7eb48705 by Jason Merrill Committed by Jason Merrill

re PR regression/57551 (g++.dg/ext/visibility/anon6.C scan-assembler 1BIiE1cE)

	PR c++/57551
	* semantics.c (cxx_eval_indirect_ref): Don't try to look through
	a POINTER_PLUS_EXPR for type punning diagnostic.

From-SVN: r200840
parent 1d0859d8
2013-07-09 Jason Merrill <jason@redhat.com>
PR c++/57551
* semantics.c (cxx_eval_indirect_ref): Don't try to look through
a POINTER_PLUS_EXPR for type punning diagnostic.
PR c++/57831
* pt.c (tsubst_copy): Handle USING_DECL.
......
......@@ -7715,11 +7715,6 @@ cxx_eval_indirect_ref (const constexpr_call *call, tree t,
{
tree sub = op0;
STRIP_NOPS (sub);
if (TREE_CODE (sub) == POINTER_PLUS_EXPR)
{
sub = TREE_OPERAND (sub, 0);
STRIP_NOPS (sub);
}
if (TREE_CODE (sub) == ADDR_EXPR)
{
/* We couldn't fold to a constant value. Make sure it's not
......
// PR c++/57551
extern unsigned long ADDR;
unsigned long f(){
const unsigned long* const var=&ADDR;
const unsigned long retval=var[1];
return retval;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment