From: Eric Botcazou Date: Wed, 23 Apr 2014 10:29:47 +0000 (+0000) Subject: Revert X-Git-Tag: releases/gcc-5.1.0~7981 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8f78ecdbe08233a96bad6d268a6bd06c754949b0;p=thirdparty%2Fgcc.git Revert 2014-04-22 Richard Henderson * gcc-interface/Makefile.in: Support aarch64-linux. 2014-04-22 Eric Botcazou * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer. (Error_Msg_N): Likewise. (Error_Msg_NE): Likewise. (Get_External_Name_With_Suffix): Likewise. * types.h (Fat_Pointer): Delete. (String_Pointer): New type. (DECLARE_STRING_POINTER): New macro. * gcc-interface/decl.c (create_concat_name): Adjust. * gcc-interface/trans.c (post_error): Likewise. (post_error_ne): Likewise. * gcc-interface/misc.c (internal_error_function): Likewise. From-SVN: r209684 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 9c42a02b630e..6dc0c11ed3fd 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,24 @@ +2014-04-23 Eric Botcazou + + Revert + 2014-04-22 Richard Henderson + + * gcc-interface/Makefile.in: Support aarch64-linux. + + 2014-04-22 Eric Botcazou + + * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer. + (Error_Msg_N): Likewise. + (Error_Msg_NE): Likewise. + (Get_External_Name_With_Suffix): Likewise. + * types.h (Fat_Pointer): Delete. + (String_Pointer): New type. + (DECLARE_STRING_POINTER): New macro. + * gcc-interface/decl.c (create_concat_name): Adjust. + * gcc-interface/trans.c (post_error): Likewise. + (post_error_ne): Likewise. + * gcc-interface/misc.c (internal_error_function): Likewise. + 2014-04-22 Richard Henderson * gcc-interface/Makefile.in: Support aarch64-linux. diff --git a/gcc/ada/fe.h b/gcc/ada/fe.h index 518382041d98..d9fe48b5baa2 100644 --- a/gcc/ada/fe.h +++ b/gcc/ada/fe.h @@ -39,7 +39,7 @@ extern "C" { /* comperr: */ #define Compiler_Abort comperr__compiler_abort -extern int Compiler_Abort (String_Pointer, int, String_Pointer) ATTRIBUTE_NORETURN; +extern int Compiler_Abort (Fat_Pointer, int, Fat_Pointer) ATTRIBUTE_NORETURN; /* csets: */ @@ -90,8 +90,8 @@ extern Node_Id Get_Attribute_Definition_Clause (Entity_Id, char); #define Error_Msg_NE errout__error_msg_ne #define Set_Identifier_Casing errout__set_identifier_casing -extern void Error_Msg_N (String_Pointer, Node_Id); -extern void Error_Msg_NE (String_Pointer, Node_Id, Entity_Id); +extern void Error_Msg_N (Fat_Pointer, Node_Id); +extern void Error_Msg_NE (Fat_Pointer, Node_Id, Entity_Id); extern void Set_Identifier_Casing (Char *, const Char *); /* err_vars: */ @@ -151,7 +151,7 @@ extern void Setup_Asm_Outputs (Node_Id); extern void Get_Encoded_Name (Entity_Id); extern void Get_External_Name (Entity_Id, Boolean); -extern void Get_External_Name_With_Suffix (Entity_Id, String_Pointer); +extern void Get_External_Name_With_Suffix (Entity_Id, Fat_Pointer); /* exp_util: */ diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index cc21b79dadcd..9af1967ce9f4 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2188,44 +2188,6 @@ ifeq ($(strip $(filter-out alpha% linux%,$(target_cpu) $(target_os))),) LIBRARY_VERSION := $(LIB_VERSION) endif -# AArch64 Linux -ifeq ($(strip $(filter-out aarch64% linux%,$(arch) $(osys))),) - LIBGNAT_TARGET_PAIRS = \ - a-exetim.adbshow_column && xloc.column != 0) - asprintf (&loc, "%s:%d:%d", xloc.file, xloc.line, xloc.column); + s = expand_location (input_location); + if (context->show_column && s.column != 0) + asprintf (&loc, "%s:%d:%d", s.file, s.line, s.column); else - asprintf (&loc, "%s:%d", xloc.file, xloc.line); + asprintf (&loc, "%s:%d", s.file, s.line); temp_loc.Low_Bound = 1; temp_loc.High_Bound = strlen (loc); - sp_loc.Bounds = &temp_loc; - sp_loc.Array = loc; + fp_loc.Bounds = &temp_loc; + fp_loc.Array = loc; Current_Error_Node = error_gnat_node; - Compiler_Abort (sp, -1, sp_loc); + Compiler_Abort (fp, -1, fp_loc); } /* Perform all the initialization steps that are language-specific. */ diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 0e55f94c8789..813a1dce6f88 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -9356,16 +9356,16 @@ void post_error (const char *msg, Node_Id node) { String_Template temp; - DECLARE_STRING_POINTER (sp); + Fat_Pointer fp; if (No (node)) return; temp.Low_Bound = 1; temp.High_Bound = strlen (msg); - sp.Bounds = &temp; - sp.Array = msg; - Error_Msg_N (sp, node); + fp.Bounds = &temp; + fp.Array = msg; + Error_Msg_N (fp, node); } /* Similar to post_error, but NODE is the node at which to post the error and @@ -9375,16 +9375,16 @@ void post_error_ne (const char *msg, Node_Id node, Entity_Id ent) { String_Template temp; - DECLARE_STRING_POINTER (sp); + Fat_Pointer fp; if (No (node)) return; temp.Low_Bound = 1; temp.High_Bound = strlen (msg); - sp.Bounds = &temp; - sp.Array = msg; - Error_Msg_NE (sp, node, ent); + fp.Bounds = &temp; + fp.Array = msg; + Error_Msg_NE (fp, node, ent); } /* Similar to post_error_ne, but NUM is the number to use for the '^'. */ diff --git a/gcc/ada/types.h b/gcc/ada/types.h index 268579ecefb1..dd049db908a2 100644 --- a/gcc/ada/types.h +++ b/gcc/ada/types.h @@ -76,14 +76,11 @@ typedef Char *Str; /* Pointer to string of Chars */ typedef Char *Str_Ptr; -/* Types for the fat pointer used for strings and the template it points to. - On most platforms the fat pointer is naturally aligned but, on the rest, - it is given twice the natural alignment. For maximum portability, we do - not overalign the type but only the objects. */ -typedef struct { int Low_Bound, High_Bound; } String_Template; -typedef struct { const char *Array; String_Template *Bounds; } String_Pointer; -#define DECLARE_STRING_POINTER(...) \ - __attribute__ ((aligned (sizeof (char *) * 2))) String_Pointer __VA_ARGS__ +/* Types for the fat pointer used for strings and the template it + points to. */ +typedef struct {int Low_Bound, High_Bound; } String_Template; +typedef struct {const char *Array; String_Template *Bounds; } + __attribute ((aligned (sizeof (char *) * 2))) Fat_Pointer; /* Types for Node/Entity Kinds: */