Commit 1be56bc5 by Marek Polacek Committed by Marek Polacek

re PR c++/69795 (g++ ICE on invalid code on x86_64-linux-gnu in "reject_gcc_builtin")

	PR c++/69795
	* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
	any DECL.

	* g++.dg/parse/invalid1.C: New test.

From-SVN: r233855
parent db340c73
2016-03-01 Marek Polacek <polacek@redhat.com>
PR c++/69795
* c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
any DECL.
2016-02-22 Martin Sebor <msebor@redhat.com>
PR middle-end/69780
......
......@@ -12638,7 +12638,7 @@ reject_gcc_builtin (const_tree expr, location_t loc /* = UNKNOWN_LOCATION */)
if (TREE_TYPE (expr)
&& TREE_CODE (TREE_TYPE (expr)) == FUNCTION_TYPE
&& DECL_P (expr)
&& TREE_CODE (expr) == FUNCTION_DECL
/* The intersection of DECL_BUILT_IN and DECL_IS_BUILTIN avoids
false positives for user-declared built-ins such as abs or
strlen, and for C++ operators new and delete.
......
2016-03-01 Marek Polacek <polacek@redhat.com>
PR c++/69795
* g++.dg/parse/invalid1.C: New test.
2016-03-01 Richard Biener <rguenther@suse.de>
PR middle-end/70022
......
// PR c++/69795
// { dg-do compile { target c++11 } }
// { dg-options "-w" }
int foo ( foo += *[ // { dg-error "" }
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