From 673a107a4003834ec3d6e8f413bda3c13b6062e7 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 29 Jul 2016 14:00:43 +0200 Subject: re PR c/71969 (Wrong setting of DECL_DISREGARD_INLINE_LIMITS in the C FE) PR c/71969 * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS on GNU extern inline functions. * gcc.dg/alias-11.c (add_cfi, new_cfi): Change __inline__ to static __inline__. * gcc.dg/pr71969-1.c: New test. * gcc.dg/pr71969-2.c: New test. * gcc.dg/pr71969-3.c: New test. From-SVN: r238862 --- gcc/c/ChangeLog | 6 ++++++ gcc/c/c-decl.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'gcc/c') diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index a47b8a3..d512a3d 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,9 @@ +2016-07-29 Jakub Jelinek + + PR c/71969 + * c-decl.c (finish_function): Only set DECL_DISREGARD_INLINE_LIMITS + on GNU extern inline functions. + 2016-07-29 Marek Polacek PR c/71583 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 41aabeb..f2773c5 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -9262,7 +9262,9 @@ finish_function (void) /* For GNU C extern inline functions disregard inline limits. */ if (DECL_EXTERNAL (fndecl) - && DECL_DECLARED_INLINE_P (fndecl)) + && DECL_DECLARED_INLINE_P (fndecl) + && (flag_gnu89_inline + || lookup_attribute ("gnu_inline", DECL_ATTRIBUTES (fndecl)))) DECL_DISREGARD_INLINE_LIMITS (fndecl) = 1; /* Genericize before inlining. Delay genericizing nested functions -- cgit v1.1