diff options
author | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-30 17:26:32 +0000 |
---|---|---|
committer | ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-06-30 17:26:32 +0000 |
commit | 4189e6771feda58eeb5859eb78adaeb1ce9729e1 (patch) | |
tree | 46e380a758cc2f203dbeec25be5417a9a9bca764 /gcc/testsuite/gnat.dg/discr19.adb | |
parent | e94dd3dc45406db7175beaa5b7c909711996be09 (diff) | |
download | gcc-4189e6771feda58eeb5859eb78adaeb1ce9729e1.tar.gz |
* cgraphunit.c (cgraph_finalize_compilation_unit): Call
finalize_size_functions before further processing.
* stor-layout.c: Include cgraph.h, tree-inline.h and tree-dump.h.
(variable_size): Call self_referential_size on size expressions
that contain a PLACEHOLDER_EXPR.
(size_functions): New static variable.
(copy_self_referential_tree_r): New static function.
(self_referential_size): Likewise.
(finalize_size_functions): New global function.
* tree.c: Include tree-inline.h.
(push_without_duplicates): New static function.
(find_placeholder_in_expr): New global function.
(substitute_in_expr) <tcc_declaration>: Return the replacement object
on equality.
<tcc_expression>: Likewise.
<tcc_vl_exp>: If the replacement object is a constant, try to inline
the call in the expression.
* tree.h (finalize_size_functions): Declare.
(find_placeholder_in_expr): Likewise.
(FIND_PLACEHOLDER_IN_EXPR): New macro.
(substitute_placeholder_in_expr): Update comment.
* tree-inline.c (remap_decl): Do not unshare trees if do_not_unshare
is true.
(copy_tree_body_r): Likewise.
(copy_tree_body): New static function.
(maybe_inline_call_in_expr): New global function.
* tree-inline.h (struct copy_body_data): Add do_not_unshare field.
(maybe_inline_call_in_expr): Declare.
* Makefile.in (tree.o): Depend on TREE_INLINE_H.
(stor-layout.o): Depend on CGRAPH_H, TREE_INLINE_H, TREE_DUMP_H and
GIMPLE_H.
ada/
* gcc-interface/decl.c: Include tree-inline.h.
(annotate_value) <CALL_EXPR>: Try to inline the call in the expression.
* gcc-interface/utils.c (max_size) <CALL_EXPR>: Likewise.
* gcc-interface/utils2.c: Include tree-inline.
(known_alignment) <CALL_EXPR>: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149112 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gnat.dg/discr19.adb')
-rw-r--r-- | gcc/testsuite/gnat.dg/discr19.adb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gnat.dg/discr19.adb b/gcc/testsuite/gnat.dg/discr19.adb new file mode 100644 index 00000000000..8f5c56b3fb5 --- /dev/null +++ b/gcc/testsuite/gnat.dg/discr19.adb @@ -0,0 +1,16 @@ +-- { dg-do compile } + +procedure Discr19 is + + type Arr_Int_T is array (Integer range <>) of Integer; + + type Abs_Tag_Rec_T (N : Integer; M : Integer) is abstract tagged record + Arr_Int : Arr_Int_T (1..M); + end record; + + type Tag_Rec_T (M : Integer) + is new Abs_Tag_Rec_T (N => 1, M => M) with null record; + +begin + null; +end; |