This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA] libobjc/encoding.c AIX patch


Make sense, thanks!

Ovidiu

On Mon, 19 Mar 2001 15:01:46 -0500, David Edelsohn <dje@watson.ibm.com> wrote:

> 	With the appended patch, Objective-C regression test goes from
> complete failure (140/140) to 3/140 unexpected failures.  The remaining
> compilation failures are:
> 
> Two instances of
> In function `__objc_tmp_1': Segmentation fault
> One instance of
> In function `__objc_tmp_0': Segmentation fault
> 
> 	This patch provides yet another work-around for encoding.c use of
> GCC macros intended for use on GCC internal tree structures and not the
> Objective-C "type" data structure.
> 
> 	The SEGVs occur regardless whether encoding.c ignores
> ADJUST_FIELD_ALIGN macro on AIX or defines TYPE_MODE macro, so the patch
> is not introducing the failures by dereferencing an invalid address.
> 
> 
> 	* libobjc/encoding.c (TYPE_MODE): Define.
> 
> Index: encoding.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/libobjc/encoding.c,v
> retrieving revision 1.8
> diff -c -p -r1.8 encoding.c
> *** encoding.c	2001/01/11 14:01:45	1.8
> --- encoding.c	2001/03/19 19:57:10
> *************** Boston, MA 02111-1307, USA.  */
> *** 46,53 ****
>   /* Various hacks for objc_layout_record. These are used by the target
>      macros. */
>   
> ! #define TREE_CODE(TYPE) *TYPE
> ! #define TREE_TYPE(TREE) TREE
>   
>   #define RECORD_TYPE     _C_STRUCT_B
>   #define UNION_TYPE      _C_UNION_B
> --- 46,53 ----
>   /* Various hacks for objc_layout_record. These are used by the target
>      macros. */
>   
> ! #define TREE_CODE(TYPE) *(TYPE)
> ! #define TREE_TYPE(TREE) (TREE)
>   
>   #define RECORD_TYPE     _C_STRUCT_B
>   #define UNION_TYPE      _C_UNION_B
> *************** Boston, MA 02111-1307, USA.  */
> *** 57,62 ****
> --- 57,63 ----
>   #define TYPE_FIELDS(TYPE)     objc_skip_typespec (TYPE)
>   
>   #define DECL_MODE(TYPE)         *(TYPE)
> + #define TYPE_MODE(TYPE)		*(TYPE)
>   
>   #define DFmode          _C_DBL
>   
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]