diff options
author | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 09:04:33 +0000 |
---|---|---|
committer | ktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-07-15 09:04:33 +0000 |
commit | 7b36f9abc95ca897534c58a4c65f70975cf8708d (patch) | |
tree | 6b29fd2254041440823db2ff9a529b817d92340c /gcc | |
parent | b4d6f57bf72754f842ccbdb62dcf7bd1b90830be (diff) | |
download | ppe42-gcc-7b36f9abc95ca897534c58a4c65f70975cf8708d.tar.gz ppe42-gcc-7b36f9abc95ca897534c58a4c65f70975cf8708d.zip |
2008-07-15 Kai Tietz <kai.tietz@onevision.com>
* builtins.c (std_canonical_va_list): Treat structure based
va_list types.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@137819 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/builtins.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 32438121f14..78c6f4388c7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-07-15 Kai Tietz <kai.tietz@onevision.com> + + * builtins.c (std_canonical_va_list): Treat structure based + va_list types. + 2008-07-15 Ben Elliston <bje@au.ibm.com> * emit-rtl.c (set_mem_attributes_minus_bitpos): Improve comment. diff --git a/gcc/builtins.c b/gcc/builtins.c index 2d6ad2a1a34..60caa8126d8 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -4691,10 +4691,12 @@ std_canonical_va_list_type (tree type) type = TREE_TYPE (type); else if (POINTER_TYPE_P (type) && POINTER_TYPE_P (TREE_TYPE(type))) type = TREE_TYPE (type); - wtype = va_list_type_node; htype = type; - if (TREE_CODE (wtype) == ARRAY_TYPE) + /* Treat structure va_list types. */ + if (TREE_CODE (wtype) == RECORD_TYPE && POINTER_TYPE_P (htype)) + htype = TREE_TYPE (htype); + else if (TREE_CODE (wtype) == ARRAY_TYPE) { /* If va_list is an array type, the argument may have decayed to a pointer type, e.g. by being passed to another function. |