Commit fad7652e by Jakub Jelinek Committed by Jakub Jelinek

re PR c/59280 (ICE with attribute((constructor(invalid))))

	PR c/59280
	* c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
	goto invalid.  If it is error_mark_node, don't issue further
	diagnostics.
testsuite/
	* c-c++-common/pr59280.c: New test.

From-SVN: r205510
parent b82e0d0d
2013-11-29 Jakub Jelinek <jakub@redhat.com>
PR c/59280
* c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
goto invalid. If it is error_mark_node, don't issue further
diagnostics.
2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
* c.opt (Wopenmp-simd): New.
......
......@@ -7014,6 +7014,10 @@ get_priority (tree args, bool is_destructor)
}
arg = TREE_VALUE (args);
if (TREE_CODE (arg) == IDENTIFIER_NODE)
goto invalid;
if (arg == error_mark_node)
return DEFAULT_INIT_PRIORITY;
arg = default_conversion (arg);
if (!tree_fits_shwi_p (arg)
|| !INTEGRAL_TYPE_P (TREE_TYPE (arg)))
......
2013-11-29 Jakub Jelinek <jakub@redhat.com>
PR c/59280
* c-c++-common/pr59280.c: New test.
2013-11-29 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* gcc.target/arm/lp1243022.c: Skip target arm-neon.
......
/* PR c/59280 */
/* { dg-do compile } */
void bar (char *) __attribute__((constructor(foo))); /* { dg-error "constructor priorities must be integers|was not declared|constructor priorities are not supported" } */
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