From 7fac66d43ca6cae23140f6dc6be408d49f731d12 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Tue, 12 Jul 2005 22:06:49 +0000 Subject: [PATCH] tree-ssa-operands.c (parse_ssa_operands): Fix formatting. * tree-ssa-operands.c (parse_ssa_operands): Fix formatting. (get_expr_operands): Fix thinko wrt flags and subvars. From-SVN: r101947 --- gcc/ChangeLog | 9 ++++++++ gcc/testsuite/ChangeLog | 6 ++++- gcc/testsuite/gcc.c-torture/compile/pr22379.c | 23 +++++++++++++++++++ gcc/tree-inline.c | 4 +++- gcc/tree-ssa-operands.c | 8 ++++--- 5 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr22379.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f29aaf899c3..21433ead198 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2005-07-13 Jan Hubicka + + * tree-ssa-operands.c (parse_ssa_operands): Fix formatting. + (get_expr_operands): Fix thinko wrt flags and subvars. + + PR tree-optimize/22379 + * tree-inline.c (expand_call_inline): Do not output sorry in early + inlining. + 2005-07-12 Dale Johannesen * config/rs6000.c (rs6000_rtx_cost): Move FLOAT_EXTEND. diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 715c437e9a1..db5906ccd8a 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,8 @@ -2005-07-12 Thomas Koenig +2005-07-12 Jan Hubicka + + * gcc.c-torture/compile/pr22379.c: New test. + +2005-07-11 Thomas Koenig PR libfortran/21593 gfortran.dg/dev_null.f90: Remove outdated comment about diff --git a/gcc/testsuite/gcc.c-torture/compile/pr22379.c b/gcc/testsuite/gcc.c-torture/compile/pr22379.c new file mode 100644 index 00000000000..fae84a0afad --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr22379.c @@ -0,0 +1,23 @@ +void __add_entropy_words(void); +void __wake_up(void); +void SHATransform(void); +static inline __attribute__((always_inline)) void add_entropy_words(void){} +void extract_entropy(void); +static inline __attribute__((always_inline)) void xfer_secondary_pool(void) +{ +extract_entropy(); +add_entropy_words(); +} +void extract_entropy(void) +{ +xfer_secondary_pool(); +__wake_up(); +} +void init_std_data(void) +{ +add_entropy_words(); +} +void rand_initialize(void) +{ +init_std_data(); +} diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index ca00892ab0d..fe70751cc9a 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1966,7 +1966,9 @@ expand_call_inline (basic_block bb, tree stmt, tree *tp, void *data) inlining. */ if (!cgraph_inline_p (cg_edge, &reason)) { - if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))) + if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) + /* Avoid warnings during early inline pass. */ + && (!flag_unit_at_a_time || cgraph_global_info_ready)) { sorry ("inlining failed in call to %q+F: %s", fn, reason); sorry ("called from here"); diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 34c09925174..98b476683e6 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -896,7 +896,8 @@ parse_ssa_operands (tree stmt) if (TREE_CODE (lhs) == VIEW_CONVERT_EXPR) lhs = TREE_OPERAND (lhs, 0); - if (TREE_CODE (lhs) != ARRAY_REF && TREE_CODE (lhs) != ARRAY_RANGE_REF + if (TREE_CODE (lhs) != ARRAY_REF + && TREE_CODE (lhs) != ARRAY_RANGE_REF && TREE_CODE (lhs) != BIT_FIELD_REF && TREE_CODE (lhs) != REALPART_EXPR && TREE_CODE (lhs) != IMAGPART_EXPR) @@ -1325,9 +1326,10 @@ get_expr_operands (tree stmt, tree *expr_p, int flags) bool exact; if (overlap_subvar (offset, size, sv, &exact)) { + bool subvar_flags = flags; if (!exact) - flags &= ~opf_kill_def; - add_stmt_operand (&sv->var, s_ann, flags); + subvar_flags &= ~opf_kill_def; + add_stmt_operand (&sv->var, s_ann, subvar_flags); } } }