Commit 7b3bc1f3 by Marek Polacek Committed by Marek Polacek

re PR c++/66748 (Crash with abi_tag attribute)

	PR c++/66748
	* tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
	accessing TYPE_LANG_SPECIFIC node.

	* g++.dg/abi/abi-tag15.C: New test.

From-SVN: r225541
parent daee9ce2
2015-07-08 Marek Polacek <polacek@redhat.com>
PR c++/66748
* tree.c (handle_abi_tag_attribute): Check for CLASS_TYPE_P before
accessing TYPE_LANG_SPECIFIC node.
2015-07-07 Andrew MacLeod <amacleod@redhat.com>
* call.c: Adjust includes.
......
......@@ -3653,13 +3653,15 @@ handle_abi_tag_attribute (tree* node, tree name, tree args,
name, *node);
goto fail;
}
else if (CLASSTYPE_TEMPLATE_INSTANTIATION (*node))
else if (CLASS_TYPE_P (*node)
&& CLASSTYPE_TEMPLATE_INSTANTIATION (*node))
{
warning (OPT_Wattributes, "ignoring %qE attribute applied to "
"template instantiation %qT", name, *node);
goto fail;
}
else if (CLASSTYPE_TEMPLATE_SPECIALIZATION (*node))
else if (CLASS_TYPE_P (*node)
&& CLASSTYPE_TEMPLATE_SPECIALIZATION (*node))
{
warning (OPT_Wattributes, "ignoring %qE attribute applied to "
"template specialization %qT", name, *node);
......
2015-07-08 Marek Polacek <polacek@redhat.com>
PR c++/66748
* g++.dg/abi/abi-tag15.C: New test.
2015-07-08 Andrew Bennett <andrew.bennett@imgtec.com>
* gcc.target/mips/branch-2.c: Change NOMIPS16 to NOCOMPRESSION.
......
// PR c++/66748
enum __attribute__((abi_tag("foo"))) E {}; // { dg-error "redeclaration of" }
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