From e65a2d65e000030f605ed9e8b921a68131eeb2dc Mon Sep 17 00:00:00 2001 From: Roger Sayle Date: Thu, 11 Jul 2002 12:29:07 +0000 Subject: [PATCH] c-decl.c (duplicate_decls): Preserve the noreturn attribute on non-ANSI builtin functions. * c-decl.c (duplicate_decls): Preserve the noreturn attribute on non-ANSI builtin functions. * gcc.c-torture/execute/builtin-noret-1.c: Test non-ANSI functions. From-SVN: r55396 --- gcc/ChangeLog | 5 +++++ gcc/c-decl.c | 5 ----- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c | 2 -- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 11314a1f7f0..4bd40857b37 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-07-11 Roger Sayle + + * c-decl.c (duplicate_decls): Preserve the noreturn attribute on + non-ANSI builtin functions. + Thu Jul 11 11:31:12 2002 J"orn Rennecke * rtl.h (gen_rtx_CONST_VECTOR): Declare. diff --git a/gcc/c-decl.c b/gcc/c-decl.c index a32b7835ca1..8551ba55dc4 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -1764,11 +1764,6 @@ duplicate_decls (newdecl, olddecl, different_binding_level) COPY_DECL_RTL (olddecl, newdecl); /* Merge the type qualifiers. */ - if (TREE_CODE (olddecl) == FUNCTION_DECL - && DECL_BUILT_IN_NONANSI (olddecl) && TREE_THIS_VOLATILE (olddecl) - && ! TREE_THIS_VOLATILE (newdecl)) - TREE_THIS_VOLATILE (write_olddecl) = 0; - if (TREE_READONLY (newdecl)) TREE_READONLY (write_olddecl) = 1; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f2800854a96..11cb55e0f32 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-07-11 Roger Sayle + + * gcc.c-torture/execute/builtin-noret-1.c: Test non-ANSI functions. + 2002-07-10 Roger Sayle * gcc.c-torture/execute/20000217-1.c: Fix usage of "abort". diff --git a/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c b/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c index cfd78991214..9cd3e84614b 100644 --- a/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c +++ b/gcc/testsuite/gcc.c-torture/execute/builtin-noret-1.c @@ -3,10 +3,8 @@ extern void abort (void); extern void exit (int); -#if 0 /* Doesn't work with prototype (bug?). */ extern void _exit (int); extern void _Exit (int); -#endif extern void tabort (void); extern void texit (void); -- 2.30.2