Commit 6b56d5f5 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/78901 (ICE: verify_gimple failed (error: statement marked for…

re PR middle-end/78901 (ICE: verify_gimple failed (error: statement marked for throw in middle of block))

	PR middle-end/78901
	* except.c (nothrow_libfn_p): Expect libc_name_p to return
	const struct libc_name_struct *, if it returns NULL, return 0,
	otherwise check c_ver and use flag_isoc99 or flag_isoc11.
	* cfns.gperf: Add %struct-type and libc_name_struct definition.
	For all C89 C library functions add , 89 after the name, add
	C99 C library functions with , 99 and C11 C library functions
	with , 11 suffix.
	* cfns.h: Regenerated.

From-SVN: r243914
parent 7b903e28
2016-12-24 Jakub Jelinek <jakub@redhat.com>
PR middle-end/78901
* except.c (nothrow_libfn_p): Expect libc_name_p to return
const struct libc_name_struct *, if it returns NULL, return 0,
otherwise check c_ver and use flag_isoc99 or flag_isoc11.
* cfns.gperf: Add %struct-type and libc_name_struct definition.
For all C89 C library functions add , 89 after the name, add
C99 C library functions with , 99 and C11 C library functions
with , 11 suffix.
* cfns.h: Regenerated.
2016-12-22 Jason Merrill <jason@redhat.com>
PR c++/78906
......
......@@ -892,8 +892,17 @@ nothrow_libfn_p (const_tree fn)
unless the system headers are playing rename tricks, and if
they are, we don't want to be confused by them. */
id = DECL_NAME (fn);
return !!libc_name::libc_name_p (IDENTIFIER_POINTER (id),
IDENTIFIER_LENGTH (id));
const struct libc_name_struct *s
= libc_name::libc_name_p (IDENTIFIER_POINTER (id), IDENTIFIER_LENGTH (id));
if (s == NULL)
return 0;
switch (s->c_ver)
{
case 89: return 1;
case 99: return !flag_iso || flag_isoc99;
case 11: return !flag_iso || flag_isoc11;
default: gcc_unreachable ();
}
}
/* Returns nonzero if an exception of type FROM will be caught by a
......
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