diff options
author | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-04-19 21:42:40 +0000 |
---|---|---|
committer | Anil Madhavapeddy <avsm@cvs.openbsd.org> | 2004-04-19 21:42:40 +0000 |
commit | 820b676c3164dca22403b90fbf7a4f06d75499c7 (patch) | |
tree | 1c90958c81d6b18c72b2e019d53c8d8ec47cedc8 /gnu/usr.bin | |
parent | 9d392fe3f6d38aba8e6cb72091825c8ff0a0c747 (diff) |
some gcc3/propolice --enable-checking fixes:
- dont use DECL_INLINE to alter a VAR_DECL inline flag. This trips
off gcc3's FUNCTION_DECL assert. Define DECL_VAR_INLINE and
use that instead.
- RTX_INTEGRATE_P isnt expecting to see a PLUS code, which pp adds.
ok etoh@
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r-- | gnu/usr.bin/gcc/gcc/integrate.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/protector.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/rtl.h | 17 | ||||
-rw-r--r-- | gnu/usr.bin/gcc/gcc/tree.h | 3 |
4 files changed, 20 insertions, 4 deletions
diff --git a/gnu/usr.bin/gcc/gcc/integrate.c b/gnu/usr.bin/gcc/gcc/integrate.c index dc49bd09804..fbe909bbb8d 100644 --- a/gnu/usr.bin/gcc/gcc/integrate.c +++ b/gnu/usr.bin/gcc/gcc/integrate.c @@ -403,7 +403,7 @@ copy_decl_for_inlining (decl, from_fn, to_fn) /* The inlined variable is marked as INLINE not to sweep by propolice */ if (flag_propolice_protection && TREE_CODE (copy) == VAR_DECL) - DECL_INLINE (copy) = 1; + DECL_VAR_INLINE (copy) = 1; /* Set the context for the new declaration. */ if (!DECL_CONTEXT (decl)) diff --git a/gnu/usr.bin/gcc/gcc/protector.c b/gnu/usr.bin/gcc/gcc/protector.c index fb8970dc9d2..2100a43b5e2 100644 --- a/gnu/usr.bin/gcc/gcc/protector.c +++ b/gnu/usr.bin/gcc/gcc/protector.c @@ -948,7 +948,7 @@ arrange_var_order (block) if (! DECL_EXTERNAL (types) && ! TREE_STATIC (types) && TREE_CODE (types) == VAR_DECL && ! DECL_ARTIFICIAL (types) - && ! DECL_INLINE (types) /* don't sweep inlined string */ + && ! DECL_VAR_INLINE (types) /* don't sweep inlined string */ && DECL_RTL_SET_P (types) && GET_CODE (DECL_RTL (types)) == MEM && GET_MODE (DECL_RTL (types)) == BLKmode diff --git a/gnu/usr.bin/gcc/gcc/rtl.h b/gnu/usr.bin/gcc/gcc/rtl.h index a2cb1dbf1ab..a5a68ad41cc 100644 --- a/gnu/usr.bin/gcc/gcc/rtl.h +++ b/gnu/usr.bin/gcc/gcc/rtl.h @@ -440,6 +440,18 @@ extern void rtvec_check_failed_bounds PARAMS ((rtvec, int, __FUNCTION__); \ _rtx; }) +#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) \ + __extension__ \ +({ rtx const _rtx = (RTX); \ + if (GET_CODE(_rtx) != C1 && GET_CODE(_rtx) != C2 \ + && GET_CODE(_rtx) != C3 && GET_CODE(_rtx) != C4 \ + && GET_CODE(_rtx) != C5 && GET_CODE(_rtx) != C6 \ + && GET_CODE(_rtx) != C7 && GET_CODE(_rtx) != C8 \ + && GET_CODE(_rtx) != C9) \ + rtl_check_failed_flag (NAME, _rtx, __FILE__, __LINE__, \ + __FUNCTION__); \ + _rtx; }) + extern void rtl_check_failed_flag PARAMS ((const char *, rtx, const char *, int, const char *)) ATTRIBUTE_NORETURN @@ -455,6 +467,7 @@ extern void rtl_check_failed_flag PARAMS ((const char *, rtx, const char *, #define RTL_FLAG_CHECK6(NAME, RTX, C1, C2, C3, C4, C5, C6) (RTX) #define RTL_FLAG_CHECK7(NAME, RTX, C1, C2, C3, C4, C5, C6, C7) (RTX) #define RTL_FLAG_CHECK8(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8) (RTX) +#define RTL_FLAG_CHECK9(NAME, RTX, C1, C2, C3, C4, C5, C6, C7, C8, C9) (RTX) #endif #define CLEAR_RTX_FLAGS(RTX) \ @@ -549,9 +562,9 @@ do { \ #define LOG_LINKS(INSN) XEXP(INSN, 7) #define RTX_INTEGRATED_P(RTX) \ - (RTL_FLAG_CHECK8("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \ + (RTL_FLAG_CHECK9("RTX_INTEGRATED_P", (RTX), INSN, CALL_INSN, \ JUMP_INSN, INSN_LIST, BARRIER, CODE_LABEL, CONST, \ - NOTE)->integrated) + NOTE, PLUS)->integrated) #define RTX_UNCHANGING_P(RTX) \ (RTL_FLAG_CHECK3("RTX_UNCHANGING_P", (RTX), REG, MEM, CONCAT)->unchanging) #define RTX_FRAME_RELATED_P(RTX) \ diff --git a/gnu/usr.bin/gcc/gcc/tree.h b/gnu/usr.bin/gcc/gcc/tree.h index 1ad4b142c78..facaa9d0277 100644 --- a/gnu/usr.bin/gcc/gcc/tree.h +++ b/gnu/usr.bin/gcc/gcc/tree.h @@ -1644,6 +1644,9 @@ struct tree_type GTY(()) where it is called. */ #define DECL_INLINE(NODE) (FUNCTION_DECL_CHECK (NODE)->decl.inline_flag) +/* Nonzero in a VAR_DECL means this variable is skipped by propolice. */ +#define DECL_VAR_INLINE(NODE) (VAR_DECL_CHECK (NODE)->decl.inline_flag) + /* Nonzero in a FUNCTION_DECL means this function has been found inlinable only by virtue of -finline-functions */ #define DID_INLINE_FUNC(NODE) \ |