diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-08-19 21:34:11 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-08-19 21:34:11 +0000 |
commit | 9c991efe42d4533ba547f3e27e91a01e7005f332 (patch) | |
tree | 2c9fa1b37be8efabcb56d285d51c3221b50ba2c3 /gcc/integrate.c | |
parent | 1aa89d4f2de65b9242a6350a03098e73d2aa04d9 (diff) | |
download | gcc-9c991efe42d4533ba547f3e27e91a01e7005f332.tar.gz |
(function_cannot_inline): Don't inline if any parm is a transparent
union.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7950 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 1f4874cacbd..2355508f6e5 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -134,10 +134,15 @@ function_cannot_inline_p (fndecl) if (int_size_in_bytes (TREE_TYPE (TREE_TYPE (fndecl))) < 0) return "function with varying-size return value cannot be inline"; - /* Cannot inline a function with a varying size argument. */ + /* Cannot inline a function with a varying size argument or one that + receives a transparent union. */ for (parms = DECL_ARGUMENTS (fndecl); parms; parms = TREE_CHAIN (parms)) - if (int_size_in_bytes (TREE_TYPE (parms)) < 0) - return "function with varying-size parameter cannot be inline"; + { + if (int_size_in_bytes (TREE_TYPE (parms)) < 0) + return "function with varying-size parameter cannot be inline"; + else if (TYPE_TRANSPARENT_UNION (TREE_TYPE (parms))) + return "function with transparent unit parameter cannot be inline"; + } if (!DECL_INLINE (fndecl) && get_max_uid () > max_insns) { |