From 275311c494a330790748a27d28fa494bd4a18933 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Mon, 6 Jun 2011 13:43:31 +0200 Subject: re PR tree-optimization/49243 (attribute((returns_twice)) doesn't work) 2011-06-06 Mikael Pettersson PR tree-optimization/49243 * calls.c (setjmp_call_p): Also check if fndecl has the returns_twice attribute. * gcc.dg/pr49243.c: New. From-SVN: r174695 --- gcc/calls.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/calls.c') diff --git a/gcc/calls.c b/gcc/calls.c index f5592c5..feb98d2 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -567,6 +567,8 @@ special_function_p (const_tree fndecl, int flags) int setjmp_call_p (const_tree fndecl) { + if (DECL_IS_RETURNS_TWICE (fndecl)) + return ECF_RETURNS_TWICE; return special_function_p (fndecl, 0) & ECF_RETURNS_TWICE; } -- cgit v1.1