diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2004-12-01 09:47:23 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2004-12-01 09:47:23 +0000 |
commit | e674926142fcb388e910783b3db755efaef36ac5 (patch) | |
tree | a35a16fd615ca2220b45acaf0076515bedc9f0a9 | |
parent | 6b45c5732734cf1d79e5babcaa3b1e2911913b93 (diff) |
Prevent -fno-builtin-{abort,exit} from causing cc1 to dump core.
Spotted by espie@
-rw-r--r-- | gnu/egcs/gcc/c-decl.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gnu/egcs/gcc/c-decl.c b/gnu/egcs/gcc/c-decl.c index 80dd78a6868..b109e0b4ca6 100644 --- a/gnu/egcs/gcc/c-decl.c +++ b/gnu/egcs/gcc/c-decl.c @@ -3595,11 +3595,15 @@ init_decl_processing () from certain code which isn't valid in ANSI but which exists. */ temp = builtin_function ("abort", void_ftype_any, NOT_BUILT_IN, NULL_PTR); - TREE_THIS_VOLATILE (temp) = 1; - TREE_SIDE_EFFECTS (temp) = 1; + if (temp) { + TREE_THIS_VOLATILE (temp) = 1; + TREE_SIDE_EFFECTS (temp) = 1; + } temp = builtin_function ("exit", void_ftype_any, NOT_BUILT_IN, NULL_PTR); - TREE_THIS_VOLATILE (temp) = 1; - TREE_SIDE_EFFECTS (temp) = 1; + if (temp) { + TREE_THIS_VOLATILE (temp) = 1; + TREE_SIDE_EFFECTS (temp) = 1; + } } #if 0 |