Commit 56345d11 by Eric Botcazou Committed by Eric Botcazou

decl.c: Do not undefine IN_GCC_FRONTEND and do not include expr.h.

	* gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
	include expr.h.
	(gnat_to_gnu_entity) <object>: Force address of -1 at the tree level
	for the debug-only entity.
	* gcc-interface/Make-lang.in (ada/decl.o): Adjust dependencies.

From-SVN: r162854
parent 59c724ac
2010-08-04 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
include expr.h.
(gnat_to_gnu_entity) <object>: Force address of -1 at the tree level
for the debug-only entity.
* gcc-interface/Make-lang.in (ada/decl.o): Adjust dependencies.
2010-08-03 Joseph Myers <joseph@codesourcery.com> 2010-08-03 Joseph Myers <joseph@codesourcery.com>
* gcc-interface/lang-specs.h: Don't pass -a options. * gcc-interface/lang-specs.h: Don't pass -a options.
......
...@@ -1235,8 +1235,8 @@ ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ...@@ -1235,8 +1235,8 @@ ada/cuintp.o : ada/gcc-interface/cuintp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@ $(COMPILER) -c $(ALL_COMPILERFLAGS) -I.. $(ALL_CPPFLAGS) $< -o $@
ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ ada/decl.o : ada/gcc-interface/decl.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(TARGET_H) $(EXPR_H) \ $(TM_H) $(TREE_H) $(FLAGS_H) toplev.h $(TARGET_H) $(TREE_INLINE_H) \
$(TREE_INLINE_H) ada/gcc-interface/ada.h ada/types.h ada/atree.h \ ada/gcc-interface/ada.h ada/types.h ada/atree.h \
ada/elists.h ada/namet.h ada/nlists.h ada/repinfo.h ada/snames.h \ ada/elists.h ada/namet.h ada/nlists.h ada/repinfo.h ada/snames.h \
ada/stringt.h ada/uintp.h ada/fe.h ada/sinfo.h ada/einfo.h $(ADA_TREE_H) \ ada/stringt.h ada/uintp.h ada/fe.h ada/sinfo.h ada/einfo.h $(ADA_TREE_H) \
ada/gcc-interface/gigi.h gt-ada-decl.h ada/gcc-interface/gigi.h gt-ada-decl.h
......
...@@ -23,10 +23,6 @@ ...@@ -23,10 +23,6 @@
* * * *
****************************************************************************/ ****************************************************************************/
/* FIXME: Still need to include rtl.h here (via expr.h) because this file
actually generates RTL (search for gen_rtx_* in gnat_to_gnu_entity). */
#undef IN_GCC_FRONTEND
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
...@@ -36,7 +32,6 @@ ...@@ -36,7 +32,6 @@
#include "toplev.h" #include "toplev.h"
#include "ggc.h" #include "ggc.h"
#include "target.h" #include "target.h"
#include "expr.h"
#include "tree-inline.h" #include "tree-inline.h"
#include "ada.h" #include "ada.h"
...@@ -600,18 +595,18 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition) ...@@ -600,18 +595,18 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, int definition)
&& DECL_NAME (TYPE_NAME (gnu_type)) == exception_data_name_id) && DECL_NAME (TYPE_NAME (gnu_type)) == exception_data_name_id)
gnu_type = except_type_node; gnu_type = except_type_node;
/* For a debug renaming declaration, build a pure debug entity. */ /* For a debug renaming declaration, build a debug-only entity. */
if (Present (Debug_Renaming_Link (gnat_entity))) if (Present (Debug_Renaming_Link (gnat_entity)))
{ {
rtx addr; /* Force a non-null value to make sure the symbol is retained. */
tree value = build1 (INDIRECT_REF, gnu_type,
build1 (NOP_EXPR,
build_pointer_type (gnu_type),
integer_minus_one_node));
gnu_decl = build_decl (input_location, gnu_decl = build_decl (input_location,
VAR_DECL, gnu_entity_name, gnu_type); VAR_DECL, gnu_entity_name, gnu_type);
/* The (MEM (CONST (0))) pattern is prescribed by STABS. */ SET_DECL_VALUE_EXPR (gnu_decl, value);
if (global_bindings_p ()) DECL_HAS_VALUE_EXPR_P (gnu_decl) = 1;
addr = gen_rtx_CONST (VOIDmode, const0_rtx);
else
addr = stack_pointer_rtx;
SET_DECL_RTL (gnu_decl, gen_rtx_MEM (Pmode, addr));
gnat_pushdecl (gnu_decl, gnat_entity); gnat_pushdecl (gnu_decl, gnat_entity);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment