aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-28 00:55:36 +0000
committerhjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-28 00:55:36 +0000
commitb6d4508abdcf09752f1bb48074adbab4dcb2fdfa (patch)
treef6efffdee74904597b68ed75e1b91637e18888cc
parent1ad9855894ce874c82fb2529176d12a0dca7d161 (diff)
Merged with trunk at revision 145152.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/ix86/atom@145156 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--fixincludes/ChangeLog4
-rw-r--r--fixincludes/server.c2
-rw-r--r--gcc/BASE-VER2
-rw-r--r--gcc/ChangeLog188
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/Makefile.in2
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gcc-interface/utils.c2
-rw-r--r--gcc/builtins.c95
-rw-r--r--gcc/c-common.c8
-rw-r--r--gcc/cfgexpand.c7
-rw-r--r--gcc/config/i386/cygming.h4
-rw-r--r--gcc/config/i386/i386-protos.h5
-rw-r--r--gcc/config/i386/i386.c92
-rw-r--r--gcc/config/i386/i386.h13
-rw-r--r--gcc/config/i386/i386.md2
-rw-r--r--gcc/config/i386/i386.opt4
-rw-r--r--gcc/config/i386/mingw32.h2
-rw-r--r--gcc/config/ia64/sync.md12
-rw-r--r--gcc/coverage.c2
-rw-r--r--gcc/cp/ChangeLog13
-rw-r--r--gcc/cp/cp-objcp-common.c12
-rw-r--r--gcc/cp/cp-objcp-common.h6
-rw-r--r--gcc/cp/except.c1
-rw-r--r--gcc/doc/invoke.texi12
-rw-r--r--gcc/dwarf2out.c7
-rw-r--r--gcc/emit-rtl.c2
-rw-r--r--gcc/expr.h2
-rw-r--r--gcc/fold-const.c55
-rw-r--r--gcc/fortran/ChangeLog39
-rw-r--r--gcc/fortran/gfortran.h7
-rw-r--r--gcc/fortran/invoke.texi11
-rw-r--r--gcc/fortran/options.c2
-rw-r--r--gcc/fortran/resolve.c6
-rw-r--r--gcc/fortran/target-memory.c2
-rw-r--r--gcc/fortran/trans-array.c22
-rw-r--r--gcc/fortran/trans-const.c14
-rw-r--r--gcc/fortran/trans-const.h2
-rw-r--r--gcc/fortran/trans-expr.c32
-rw-r--r--gcc/fortran/trans-intrinsic.c47
-rw-r--r--gcc/fortran/trans-io.c38
-rw-r--r--gcc/fortran/trans-stmt.c6
-rw-r--r--gcc/fortran/trans.c5
-rw-r--r--gcc/gimplify.c8
-rw-r--r--gcc/jump.c45
-rw-r--r--gcc/langhooks-def.h2
-rw-r--r--gcc/langhooks.h3
-rw-r--r--gcc/omp-low.c3
-rw-r--r--gcc/rtl.h16
-rw-r--r--gcc/rtlanal.c17
-rw-r--r--gcc/testsuite/ChangeLog62
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr39120.c18
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipacost-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/memmove-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/memmove-3.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-explog-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-callused-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-3.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-4.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39315-check.c22
-rw-r--r--gcc/testsuite/gcc.target/ia64/sync-1.c23
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c27
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c13
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c17
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c24
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c24
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c31
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c17
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c37
-rw-r--r--gcc/tree-flow.h1
-rw-r--r--gcc/tree-inline.c27
-rw-r--r--gcc/tree-ssa-loop-manip.c2
-rw-r--r--gcc/tree-ssa-structalias.c194
-rw-r--r--gcc/tree-ssa.c15
-rw-r--r--gcc/tree.h6
-rw-r--r--libiberty/ChangeLog10
-rw-r--r--libiberty/Makefile.in14
-rw-r--r--libiberty/config.in3
-rwxr-xr-xlibiberty/configure4
-rw-r--r--libiberty/configure.ac3
-rw-r--r--libiberty/functions.texi13
-rw-r--r--libiberty/memmem.c70
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/backward/hashtable.h14
-rw-r--r--maintainer-scripts/ChangeLog4
-rw-r--r--maintainer-scripts/crontab3
92 files changed, 1360 insertions, 400 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog
index cef28bd7d3f..0db98af7ded 100644
--- a/fixincludes/ChangeLog
+++ b/fixincludes/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-27 Sandra Loosemore <sandra@codesourcery.com>
+
+ * server.c (run_shell): Quote directory name passed to cd.
+
2009-03-01 Bruce Korb <bkorb@gnu.org>
Apply a positively ancient patch:
diff --git a/fixincludes/server.c b/fixincludes/server.c
index 6db8cf7e101..1e50efc9faa 100644
--- a/fixincludes/server.c
+++ b/fixincludes/server.c
@@ -266,7 +266,7 @@ run_shell (const char* pz_cmd)
/* Make sure the process will pay attention to us, send the
supplied command, and then have it output a special marker that
we can find. */
- fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n",
+ fprintf (server_pair.pf_write, "cd \"%s\"\n%s\n\necho\necho %s\n",
p_cur_dir, pz_cmd, z_done);
fflush (server_pair.pf_write);
diff --git a/gcc/BASE-VER b/gcc/BASE-VER
index fdc6698807a..a84947d6ffe 100644
--- a/gcc/BASE-VER
+++ b/gcc/BASE-VER
@@ -1 +1 @@
-4.4.0
+4.5.0
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9ca01a2b653..ad0c1f09c21 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,191 @@
+2009-03-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ * genautomata.c: Add a new year to the copyright. Add a new
+ reference.
+ (struct insn_reserv_decl): Add comments for member bypass_list.
+ (find_bypass): Remove.
+ (insert_bypass): New.
+ (process_decls): Use insert_bypass.
+ (output_internal_insn_latency_func): Output all bypasses with the
+ same input insn in one switch case.
+
+ * rtl.def (define_bypass): Describe bypass choice.
+ * doc/md.texi (define_bypass): Ditto.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * gimplify.c (mark_addressable): Export.
+ * tree-flow.h (mark_addressable): Declare.
+ * tree-ssa-loop-manip.c (create_iv): Mark the base addressable.
+ * tree-ssa.c (verify_phi_args): Verify that address taken
+ variables have TREE_ADDRESSABLE set.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * fold-const.c (build_fold_addr_expr_with_type_1): Rename back to ...
+ (build_fold_addr_expr_with_type): ... this. Remove in_fold handling.
+ Do not mark decls TREE_ADDRESSABLE.
+ (build_fold_addr_expr): Adjust.
+ (fold_addr_expr): Remove.
+ (fold_unary): Use build_fold_addr_expr.
+ (fold_comparison): Likewise.
+ (split_address_to_core_and_offset): Likewise.
+ * coverage.c (tree_coverage_counter_addr): Mark the array decl
+ TREE_ADDRESSABLE.
+ * gimplify.c (mark_addressable): Do not exclude RESULT_DECLs.
+ (gimplify_modify_expr_to_memcpy): Mark source and destination
+ addressable.
+ * omp-low.c (create_omp_child_function): Mark the object decl
+ TREE_ADDRESSABLE.
+ (lower_rec_input_clauses): Mark the var we take the address of
+ TREE_ADDRESSABLE.
+ (lower_omp_taskreg): Mark the sender decl TREE_ADDRESSABLE.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/39315
+ * cfgexpand.c (expand_one_stack_var_at): Change alignment
+ limit to MAX_SUPPORTED_STACK_ALIGNMENT.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * tree-ssa-structalias.c (handle_rhs_call): Fill out return
+ constraints.
+ (handle_lhs_call): Process return constraints. Add escape
+ constraints if necessary.
+ (handle_const_call): Fill out return constraints. Make nested
+ case more precise. Avoid consttmp if possible.
+ (handle_pure_call): Fill out return constraints. Avoid
+ callused if possible.
+ (find_func_aliases): Simplify call handling.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * tree-ssa-structalias.c (do_sd_constraint): Do not use CALLUSED
+ as a representative.
+ (solve_graph): Do propagate CALLUSED.
+ (handle_pure_call): Use a scalar constraint from CALLUSED for
+ the return value.
+ (find_what_p_points_to): CALLUSED shall not appear in poins-to
+ solutions.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * c-common.c (handle_aligned_attribute): Properly check alignment
+ overflow. Use (1U << i) instead of (1 << i).
+
+ * emit-rtl.c (get_mem_align_offset): Use "unsigned int" for
+ align.
+
+ * expr.h (get_mem_align_offset): Updated.
+
+ * tree.h (tree_decl_common): Change align to "unsigned int" and
+ move it before pointer_alias_set.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/38034
+ * config/ia64/sync.md (cmpxchg_rel_<mode>): Replace input
+ gr_register_operand with gr_reg_or_0_operand.
+ (cmpxchg_rel_di): Likewise.
+ (sync_lock_test_and_set<mode>): Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ * jump.c (rtx_renumbered_equal_p): Use subreg_get_info.
+ (true_regnum): Likewise.
+
+ * rtlanal.c (subreg_info): Moved to ...
+ * rtl.h (subreg_info): Here. New.
+ (subreg_get_info): New.
+
+ * rtlanal.c (subreg_get_info): Make it extern.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39472
+ * config/i386/i386.c (ix86_abi): New.
+ (override_options): Handle -mabi=.
+ (ix86_function_arg_regno_p): Replace DEFAULT_ABI with
+ ix86_abi.
+ (ix86_call_abi_override): Likewise.
+ (init_cumulative_args): Likewise.
+ (function_arg_advance): Likewise.
+ (function_arg_64): Likewise.
+ (function_arg): Likewise.
+ (ix86_pass_by_reference): Likewise.
+ (ix86_function_value_regno_p): Likewise.
+ (ix86_build_builtin_va_list_abi): Likewise.
+ (setup_incoming_varargs_64): Likewise.
+ (is_va_list_char_pointer): Likewise.
+ (ix86_init_machine_status): Likewise.
+ (ix86_reg_parm_stack_space): Use enum calling_abi on
+ call_abi.
+ (ix86_function_type_abi): Return enum calling_abi. Rewrite
+ for 64bit. Replace DEFAULT_ABI with ix86_abi.
+ (ix86_function_abi): Make it static and return enum
+ calling_abi.
+ (ix86_cfun_abi): Return enum calling_abi. Replace DEFAULT_ABI
+ with ix86_abi.
+ (ix86_fn_abi_va_list): Updated.
+
+ * config/i386/i386.h (ix86_abi): New.
+ (STACK_BOUNDARY): Replace DEFAULT_ABI with ix86_abi.
+ (CONDITIONAL_REGISTER_USAGE): Likewise.
+ (CUMULATIVE_ARGS): Change call_abi type to enum calling_abi.
+ (machine_function): Likewise.
+
+ * config/i386/i386.md (untyped_call): Replace DEFAULT_ABI
+ with ix86_abi.
+ * config/i386/cygming.h (TARGET_64BIT_MS_ABI): Likewise.
+ (STACK_BOUNDARY): Likewise.
+ * config/i386/mingw32.h (EXTRA_OS_CPP_BUILTINS): Likewise.
+
+ * config/i386/i386.opt (mabi=): New.
+
+ * config/i386/i386-protos.h (ix86_cfun_abi): Changed to
+ return enum calling_abi.
+ (ix86_function_type_abi): Likewise.
+ (ix86_function_abi): Removed.
+
+ * doc/invoke.texi: Document -mabi= option for x86.
+
+2009-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * builtins.c (real_dconstp): Delete.
+ (fold_builtin_logarithm): Remove inaccurate log(e) special case.
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * dwarf2out.c (dwarf_attr_name): Handle DW_AT_explicit attribute.
+ (gen_subprogram_die): When a function is explicit, generate the
+ DW_AT_explicit attribute.
+ * langhooks.h (struct lang_hooks_for_decls): Add
+ function_decl_explicit_p langhook.
+ * langhooks-def.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
+ (LANG_HOOKS_DECLS): Add LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P.
+
+2009-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * builtins.c (fold_builtin_memory_op): Optimize memmove
+ into memcpy if we can prove source and destination don't overlap.
+
+ * tree-inline.c: Include gt-tree-inline.h.
+ (clone_fn_id_num): New variable.
+ (clone_function_name): New function.
+ (tree_function_versioning): Use it.
+ * Makefile.in (GTFILES): Add tree-inline.c.
+
+2009-03-27 Mark Mitchell <mark@codesourcery.com>
+
+ * BASE-VER: Change to 4.5.0.
+
2009-03-27 Xinliang David Li <davidxl@google.com>
PR tree-optimization/39557
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index 8b355c9c929..ad933e294bd 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20090327
+20090328
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 8850231bb89..e973c2a8c7f 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3308,7 +3308,7 @@ GTFILES = $(CPP_ID_DATA_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(srcdir)/tree-ssa-propagate.c \
$(srcdir)/tree-phinodes.c \
$(srcdir)/ipa-reference.c $(srcdir)/tree-ssa-structalias.h \
- $(srcdir)/tree-ssa-structalias.c \
+ $(srcdir)/tree-ssa-structalias.c $(srcdir)/tree-inline.c \
@all_gtfiles@
# Compute the list of GT header files from the corresponding C sources,
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 8752b3b0c40..97bd2609e2a 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * gcc-interface/utils.c (create_field_decl): Use "unsigned int"
+ on bit_align.
+
2009-03-11 Olivier Hainque <hainque@adacore.com>
* gcc-interface/trans.c (gnat_to_gnu) <case N_Slice>: In range
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 7b52d902241..8c5dc583625 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -1707,7 +1707,7 @@ create_field_decl (tree field_name, tree field_type, tree record_type,
we get the alignment from the type, indicate if this is from an explicit
user request, which prevents stor-layout from lowering it later on. */
{
- int bit_align
+ unsigned int bit_align
= (DECL_BIT_FIELD (field_decl) ? 1
: packed && TYPE_MODE (field_type) != BLKmode ? BITS_PER_UNIT : 0);
diff --git a/gcc/builtins.c b/gcc/builtins.c
index 929ea9069cb..fab8a4c879d 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -8331,21 +8331,6 @@ fold_builtin_bswap (tree fndecl, tree arg)
return NULL_TREE;
}
-/* Return true if EXPR is the real constant contained in VALUE. */
-
-static bool
-real_dconstp (tree expr, const REAL_VALUE_TYPE *value)
-{
- STRIP_NOPS (expr);
-
- return ((TREE_CODE (expr) == REAL_CST
- && !TREE_OVERFLOW (expr)
- && REAL_VALUES_EQUAL (TREE_REAL_CST (expr), *value))
- || (TREE_CODE (expr) == COMPLEX_CST
- && real_dconstp (TREE_REALPART (expr), value)
- && real_zerop (TREE_IMAGPART (expr))));
-}
-
/* A subroutine of fold_builtin to fold the various logarithmic
functions. Return NULL_TREE if no simplification can me made.
FUNC is the corresponding MPFR logarithm function. */
@@ -8360,17 +8345,6 @@ fold_builtin_logarithm (tree fndecl, tree arg,
tree res;
const enum built_in_function fcode = builtin_mathfn_code (arg);
- /* Optimize log(e) = 1.0. We're never passed an exact 'e',
- instead we'll look for 'e' truncated to MODE. So only do
- this if flag_unsafe_math_optimizations is set. */
- if (flag_unsafe_math_optimizations && func == mpfr_log)
- {
- const REAL_VALUE_TYPE e_truncated =
- real_value_truncate (TYPE_MODE (type), dconst_e ());
- if (real_dconstp (arg, &e_truncated))
- return build_real (type, dconst1);
- }
-
/* Calculate the result when the argument is a constant. */
if ((res = do_mpfr_arg1 (arg, type, func, &dconst0, NULL, false)))
return res;
@@ -8879,17 +8853,76 @@ fold_builtin_memory_op (tree dest, tree src, tree len, tree type, bool ignore, i
really mandatory?
If either SRC is readonly or length is 1, we can use memcpy. */
- if (dest_align && src_align
- && (readonly_data_expr (src)
- || (host_integerp (len, 1)
- && (MIN (src_align, dest_align) / BITS_PER_UNIT >=
- tree_low_cst (len, 1)))))
+ if (!dest_align || !src_align)
+ return NULL_TREE;
+ if (readonly_data_expr (src)
+ || (host_integerp (len, 1)
+ && (MIN (src_align, dest_align) / BITS_PER_UNIT
+ >= tree_low_cst (len, 1))))
{
tree fn = implicit_built_in_decls[BUILT_IN_MEMCPY];
if (!fn)
return NULL_TREE;
return build_call_expr (fn, 3, dest, src, len);
}
+
+ /* If *src and *dest can't overlap, optimize into memcpy as well. */
+ srcvar = build_fold_indirect_ref (src);
+ destvar = build_fold_indirect_ref (dest);
+ if (srcvar
+ && !TREE_THIS_VOLATILE (srcvar)
+ && destvar
+ && !TREE_THIS_VOLATILE (destvar))
+ {
+ tree src_base, dest_base, fn;
+ HOST_WIDE_INT src_offset = 0, dest_offset = 0;
+ HOST_WIDE_INT size = -1;
+ HOST_WIDE_INT maxsize = -1;
+
+ src_base = srcvar;
+ if (handled_component_p (src_base))
+ src_base = get_ref_base_and_extent (src_base, &src_offset,
+ &size, &maxsize);
+ dest_base = destvar;
+ if (handled_component_p (dest_base))
+ dest_base = get_ref_base_and_extent (dest_base, &dest_offset,
+ &size, &maxsize);
+ if (host_integerp (len, 1))
+ {
+ maxsize = tree_low_cst (len, 1);
+ if (maxsize
+ > INTTYPE_MAXIMUM (HOST_WIDE_INT) / BITS_PER_UNIT)
+ maxsize = -1;
+ else
+ maxsize *= BITS_PER_UNIT;
+ }
+ else
+ maxsize = -1;
+ if (SSA_VAR_P (src_base)
+ && SSA_VAR_P (dest_base))
+ {
+ if (operand_equal_p (src_base, dest_base, 0)
+ && ranges_overlap_p (src_offset, maxsize,
+ dest_offset, maxsize))
+ return NULL_TREE;
+ }
+ else if (TREE_CODE (src_base) == INDIRECT_REF
+ && TREE_CODE (dest_base) == INDIRECT_REF)
+ {
+ if (! operand_equal_p (TREE_OPERAND (src_base, 0),
+ TREE_OPERAND (dest_base, 0), 0)
+ || ranges_overlap_p (src_offset, maxsize,
+ dest_offset, maxsize))
+ return NULL_TREE;
+ }
+ else
+ return NULL_TREE;
+
+ fn = implicit_built_in_decls[BUILT_IN_MEMCPY];
+ if (!fn)
+ return NULL_TREE;
+ return build_call_expr (fn, 3, dest, src, len);
+ }
return NULL_TREE;
}
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 820d859c5bb..9b066f413c6 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -5976,7 +5976,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
error ("requested alignment is not a power of 2");
*no_add_attrs = true;
}
- else if (i > HOST_BITS_PER_INT - 2)
+ else if (i >= HOST_BITS_PER_INT - BITS_PER_UNIT_LOG)
{
error ("requested alignment is too large");
*no_add_attrs = true;
@@ -5998,7 +5998,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
else if (!(flags & (int) ATTR_FLAG_TYPE_IN_PLACE))
*type = build_variant_type_copy (*type);
- TYPE_ALIGN (*type) = (1 << i) * BITS_PER_UNIT;
+ TYPE_ALIGN (*type) = (1U << i) * BITS_PER_UNIT;
TYPE_USER_ALIGN (*type) = 1;
}
else if (! VAR_OR_FUNCTION_DECL_P (decl)
@@ -6008,7 +6008,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
*no_add_attrs = true;
}
else if (TREE_CODE (decl) == FUNCTION_DECL
- && DECL_ALIGN (decl) > (1 << i) * BITS_PER_UNIT)
+ && DECL_ALIGN (decl) > (1U << i) * BITS_PER_UNIT)
{
if (DECL_USER_ALIGN (decl))
error ("alignment for %q+D was previously specified as %d "
@@ -6021,7 +6021,7 @@ handle_aligned_attribute (tree *node, tree ARG_UNUSED (name), tree args,
}
else
{
- DECL_ALIGN (decl) = (1 << i) * BITS_PER_UNIT;
+ DECL_ALIGN (decl) = (1U << i) * BITS_PER_UNIT;
DECL_USER_ALIGN (decl) = 1;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 4bfdc5fed74..695e4ef0ef9 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -866,7 +866,8 @@ dump_stack_var_partition (void)
static void
expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset)
{
- HOST_WIDE_INT align;
+ /* Alignment is unsigned. */
+ unsigned HOST_WIDE_INT align;
rtx x;
/* If this fails, we've overflowed the stack frame. Error nicely? */
@@ -879,8 +880,10 @@ expand_one_stack_var_at (tree decl, HOST_WIDE_INT offset)
offset -= frame_phase;
align = offset & -offset;
align *= BITS_PER_UNIT;
- if (align > STACK_BOUNDARY || align == 0)
+ if (align == 0)
align = STACK_BOUNDARY;
+ else if (align > MAX_SUPPORTED_STACK_ALIGNMENT)
+ align = MAX_SUPPORTED_STACK_ALIGNMENT;
DECL_ALIGN (decl) = align;
DECL_USER_ALIGN (decl) = 0;
diff --git a/gcc/config/i386/cygming.h b/gcc/config/i386/cygming.h
index db43ffda08b..431e926818a 100644
--- a/gcc/config/i386/cygming.h
+++ b/gcc/config/i386/cygming.h
@@ -34,7 +34,7 @@ along with GCC; see the file COPYING3. If not see
#endif
#undef TARGET_64BIT_MS_ABI
-#define TARGET_64BIT_MS_ABI (!cfun ? DEFAULT_ABI == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
+#define TARGET_64BIT_MS_ABI (!cfun ? ix86_abi == MS_ABI : TARGET_64BIT && cfun->machine->call_abi == MS_ABI)
#undef DEFAULT_ABI
#define DEFAULT_ABI (TARGET_64BIT ? MS_ABI : SYSV_ABI)
@@ -202,7 +202,7 @@ do { \
#define CHECK_STACK_LIMIT 4000
#undef STACK_BOUNDARY
-#define STACK_BOUNDARY (DEFAULT_ABI == MS_ABI ? 128 : BITS_PER_WORD)
+#define STACK_BOUNDARY (ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
/* By default, target has a 80387, uses IEEE compatible arithmetic,
returns float values in the 387 and needs stack probes.
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 3502f82ae94..5d92ec79f60 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -142,9 +142,8 @@ extern int ix86_function_arg_boundary (enum machine_mode, tree);
extern bool ix86_sol10_return_in_memory (const_tree,const_tree);
extern rtx ix86_force_to_memory (enum machine_mode, rtx);
extern void ix86_free_from_memory (enum machine_mode);
-extern int ix86_cfun_abi (void);
-extern int ix86_function_abi (const_tree);
-extern int ix86_function_type_abi (const_tree);
+extern enum calling_abi ix86_cfun_abi (void);
+extern enum calling_abi ix86_function_type_abi (const_tree);
extern void ix86_call_abi_override (const_tree);
extern tree ix86_fn_abi_va_list (tree);
extern tree ix86_canonical_va_list_type (tree);
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 10d39e4b0bd..a87b762f966 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1829,6 +1829,9 @@ static unsigned int ix86_default_incoming_stack_boundary;
/* Alignment for incoming stack boundary in bits. */
unsigned int ix86_incoming_stack_boundary;
+/* The abi used by target. */
+enum calling_abi ix86_abi = DEFAULT_ABI;
+
/* Values 1-5: see jump.c */
int ix86_branch_cost;
@@ -1905,6 +1908,8 @@ static bool ix86_valid_target_attribute_inner_p (tree, char *[]);
static bool ix86_can_inline_p (tree, tree);
static void ix86_set_current_function (tree);
+static enum calling_abi ix86_function_abi (const_tree);
+
/* The svr4 ABI for the i386 says that records and unions are returned
in memory. */
@@ -2807,6 +2812,18 @@ override_options (bool main_args_p)
error ("bad value (%s) for %sarch=%s %s",
ix86_arch_string, prefix, suffix, sw);
+ /* Validate -mabi= value. */
+ if (ix86_abi_string)
+ {
+ if (strcmp (ix86_abi_string, "sysv") == 0)
+ ix86_abi = SYSV_ABI;
+ else if (strcmp (ix86_abi_string, "ms") == 0)
+ ix86_abi = MS_ABI;
+ else
+ error ("unknown ABI (%s) for %sabi=%s %s",
+ ix86_abi_string, prefix, suffix, sw);
+ }
+
if (ix86_cmodel_string != 0)
{
if (!strcmp (ix86_cmodel_string, "small"))
@@ -4606,14 +4623,14 @@ ix86_function_arg_regno_p (int regno)
default ABI. */
/* RAX is used as hidden argument to va_arg functions. */
- if (DEFAULT_ABI == SYSV_ABI && regno == AX_REG)
+ if (ix86_abi == SYSV_ABI && regno == AX_REG)
return true;
- if (DEFAULT_ABI == MS_ABI)
+ if (ix86_abi == MS_ABI)
parm_regs = x86_64_ms_abi_int_parameter_registers;
else
parm_regs = x86_64_int_parameter_registers;
- for (i = 0; i < (DEFAULT_ABI == MS_ABI ? X64_REGPARM_MAX
+ for (i = 0; i < (ix86_abi == MS_ABI ? X64_REGPARM_MAX
: X86_64_REGPARM_MAX); i++)
if (regno == parm_regs[i])
return true;
@@ -4641,7 +4658,7 @@ ix86_must_pass_in_stack (enum machine_mode mode, const_tree type)
int
ix86_reg_parm_stack_space (const_tree fndecl)
{
- int call_abi = SYSV_ABI;
+ enum calling_abi call_abi = SYSV_ABI;
if (fndecl != NULL_TREE && TREE_CODE (fndecl) == FUNCTION_DECL)
call_abi = ix86_function_abi (fndecl);
else
@@ -4653,37 +4670,39 @@ ix86_reg_parm_stack_space (const_tree fndecl)
/* Returns value SYSV_ABI, MS_ABI dependent on fntype, specifying the
call abi used. */
-int
+enum calling_abi
ix86_function_type_abi (const_tree fntype)
{
if (TARGET_64BIT && fntype != NULL)
{
- int abi;
- if (DEFAULT_ABI == SYSV_ABI)
- abi = lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)) ? MS_ABI : SYSV_ABI;
- else
- abi = lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)) ? SYSV_ABI : MS_ABI;
-
+ enum calling_abi abi = ix86_abi;
+ if (abi == SYSV_ABI)
+ {
+ if (lookup_attribute ("ms_abi", TYPE_ATTRIBUTES (fntype)))
+ abi = MS_ABI;
+ }
+ else if (lookup_attribute ("sysv_abi", TYPE_ATTRIBUTES (fntype)))
+ abi = SYSV_ABI;
return abi;
}
- return DEFAULT_ABI;
+ return ix86_abi;
}
-int
+static enum calling_abi
ix86_function_abi (const_tree fndecl)
{
if (! fndecl)
- return DEFAULT_ABI;
+ return ix86_abi;
return ix86_function_type_abi (TREE_TYPE (fndecl));
}
/* Returns value SYSV_ABI, MS_ABI dependent on cfun, specifying the
call abi used. */
-int
+enum calling_abi
ix86_cfun_abi (void)
{
if (! cfun || ! TARGET_64BIT)
- return DEFAULT_ABI;
+ return ix86_abi;
return cfun->machine->call_abi;
}
@@ -4697,7 +4716,7 @@ void
ix86_call_abi_override (const_tree fndecl)
{
if (fndecl == NULL_TREE)
- cfun->machine->call_abi = DEFAULT_ABI;
+ cfun->machine->call_abi = ix86_abi;
else
cfun->machine->call_abi = ix86_function_type_abi (TREE_TYPE (fndecl));
}
@@ -4737,8 +4756,8 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->nregs = ix86_regparm;
if (TARGET_64BIT)
{
- if (cum->call_abi != DEFAULT_ABI)
- cum->nregs = DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX
+ if (cum->call_abi != ix86_abi)
+ cum->nregs = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX
: X64_REGPARM_MAX;
}
if (TARGET_SSE)
@@ -4746,8 +4765,8 @@ init_cumulative_args (CUMULATIVE_ARGS *cum, /* Argument info to initialize */
cum->sse_nregs = SSE_REGPARM_MAX;
if (TARGET_64BIT)
{
- if (cum->call_abi != DEFAULT_ABI)
- cum->sse_nregs = DEFAULT_ABI != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
+ if (cum->call_abi != ix86_abi)
+ cum->sse_nregs = ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
: X64_SSE_REGPARM_MAX;
}
}
@@ -5673,7 +5692,7 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode,
if (type)
mode = type_natural_mode (type, NULL);
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
function_arg_advance_ms_64 (cum, bytes, words);
else if (TARGET_64BIT)
function_arg_advance_64 (cum, mode, type, words, named);
@@ -5819,9 +5838,9 @@ function_arg_64 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
if (mode == VOIDmode)
return GEN_INT (cum->maybe_vaarg
? (cum->sse_nregs < 0
- ? (cum->call_abi == DEFAULT_ABI
+ ? (cum->call_abi == ix86_abi
? SSE_REGPARM_MAX
- : (DEFAULT_ABI != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
+ : (ix86_abi != SYSV_ABI ? X86_64_SSE_REGPARM_MAX
: X64_SSE_REGPARM_MAX))
: cum->sse_regno)
: -1);
@@ -5915,7 +5934,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode omode,
if (type && TREE_CODE (type) == VECTOR_TYPE)
mode = type_natural_mode (type, cum);
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
return function_arg_ms_64 (cum, mode, omode, named, bytes);
else if (TARGET_64BIT)
return function_arg_64 (cum, mode, omode, type, named);
@@ -5935,7 +5954,7 @@ ix86_pass_by_reference (CUMULATIVE_ARGS *cum ATTRIBUTE_UNUSED,
const_tree type, bool named ATTRIBUTE_UNUSED)
{
/* See Windows x64 Software Convention. */
- if (TARGET_64BIT && (cum ? cum->call_abi : DEFAULT_ABI) == MS_ABI)
+ if (TARGET_64BIT && (cum ? cum->call_abi : ix86_abi) == MS_ABI)
{
int msize = (int) GET_MODE_SIZE (mode);
if (type)
@@ -6075,7 +6094,7 @@ ix86_function_value_regno_p (int regno)
/* TODO: The function should depend on current function ABI but
builtins.c would need updating then. Therefore we use the
default ABI. */
- if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
+ if (TARGET_64BIT && ix86_abi == MS_ABI)
return false;
return TARGET_FLOAT_RETURNS_IN_80387;
@@ -6471,13 +6490,13 @@ ix86_build_builtin_va_list_abi (enum calling_abi abi)
static tree
ix86_build_builtin_va_list (void)
{
- tree ret = ix86_build_builtin_va_list_abi (DEFAULT_ABI);
+ tree ret = ix86_build_builtin_va_list_abi (ix86_abi);
/* Initialize abi specific va_list builtin types. */
if (TARGET_64BIT)
{
tree t;
- if (DEFAULT_ABI == MS_ABI)
+ if (ix86_abi == MS_ABI)
{
t = ix86_build_builtin_va_list_abi (SYSV_ABI);
if (TREE_CODE (t) != RECORD_TYPE)
@@ -6491,7 +6510,7 @@ ix86_build_builtin_va_list (void)
t = build_variant_type_copy (t);
sysv_va_list_type_node = t;
}
- if (DEFAULT_ABI != MS_ABI)
+ if (ix86_abi != MS_ABI)
{
t = ix86_build_builtin_va_list_abi (MS_ABI);
if (TREE_CODE (t) != RECORD_TYPE)
@@ -6524,8 +6543,8 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
int i;
int regparm = ix86_regparm;
- if (cum->call_abi != DEFAULT_ABI)
- regparm = DEFAULT_ABI != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
+ if (cum->call_abi != ix86_abi)
+ regparm = ix86_abi != SYSV_ABI ? X86_64_REGPARM_MAX : X64_REGPARM_MAX;
/* GPR size of varargs save area. */
if (cfun->va_list_gpr_size)
@@ -6678,7 +6697,7 @@ is_va_list_char_pointer (tree type)
return true;
canonic = ix86_canonical_va_list_type (type);
return (canonic == ms_va_list_type_node
- || (DEFAULT_ABI == MS_ABI && canonic == va_list_type_node));
+ || (ix86_abi == MS_ABI && canonic == va_list_type_node));
}
/* Implement va_start. */
@@ -19072,7 +19091,7 @@ ix86_init_machine_status (void)
f = GGC_CNEW (struct machine_function);
f->use_fast_prologue_epilogue_nregs = -1;
f->tls_descriptor_call_expanded_p = 0;
- f->call_abi = DEFAULT_ABI;
+ f->call_abi = ix86_abi;
return f;
}
@@ -29784,14 +29803,11 @@ x86_builtin_vectorization_cost (bool runtime_test)
tree
ix86_fn_abi_va_list (tree fndecl)
{
- int abi;
-
if (!TARGET_64BIT)
return va_list_type_node;
gcc_assert (fndecl != NULL_TREE);
- abi = ix86_function_abi ((const_tree) fndecl);
- if (abi == MS_ABI)
+ if (ix86_function_abi ((const_tree) fndecl) == MS_ABI)
return ms_va_list_type_node;
else
return sysv_va_list_type_node;
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 065f4d6fd36..d4cf2eb7528 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -468,7 +468,10 @@ enum calling_abi
MS_ABI = 1
};
-/* The default abi form used by target. */
+/* The abi used by target. */
+extern enum calling_abi ix86_abi;
+
+/* The default abi used by target. */
#define DEFAULT_ABI SYSV_ABI
/* Subtargets may reset this to 1 in order to enable 96-bit long double
@@ -657,7 +660,7 @@ enum target_cpu_default
/* Boundary (in *bits*) on which stack pointer should be aligned. */
#define STACK_BOUNDARY \
- (TARGET_64BIT && DEFAULT_ABI == MS_ABI ? 128 : BITS_PER_WORD)
+ (TARGET_64BIT && ix86_abi == MS_ABI ? 128 : BITS_PER_WORD)
/* Stack boundary of the main function guaranteed by OS. */
#define MAIN_STACK_BOUNDARY (TARGET_64BIT ? 128 : 32)
@@ -953,7 +956,7 @@ do { \
fixed_regs[j] = call_used_regs[j] = 1; \
if (TARGET_64BIT \
&& ((cfun && cfun->machine->call_abi == MS_ABI) \
- || (!cfun && DEFAULT_ABI == MS_ABI))) \
+ || (!cfun && ix86_abi == MS_ABI))) \
{ \
call_used_regs[SI_REG] = 0; \
call_used_regs[DI_REG] = 0; \
@@ -1613,7 +1616,7 @@ typedef struct ix86_args {
int maybe_vaarg; /* true for calls to possibly vardic fncts. */
int float_in_sse; /* 1 if in 32-bit mode SFmode (2 for DFmode) should
be passed in SSE registers. Otherwise 0. */
- int call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise
+ enum calling_abi call_abi; /* Set to SYSV_ABI for sysv abi. Otherwise
MS_ABI for ms abi. */
} CUMULATIVE_ARGS;
@@ -2433,7 +2436,7 @@ struct machine_function GTY(())
int tls_descriptor_call_expanded_p;
/* This value is used for amd64 targets and specifies the current abi
to be used. MS_ABI means ms abi. Otherwise SYSV_ABI means sysv abi. */
- int call_abi;
+ enum calling_abi call_abi;
};
#define ix86_stack_locals (cfun->machine->stack_locals)
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 943914dec7e..2c82f2cfbef 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -15193,7 +15193,7 @@
? gen_rtx_REG (XCmode, FIRST_FLOAT_REG) : NULL),
operands[0], const0_rtx,
GEN_INT ((TARGET_64BIT
- ? (DEFAULT_ABI == SYSV_ABI
+ ? (ix86_abi == SYSV_ABI
? X86_64_SSE_REGPARM_MAX
: X64_SSE_REGPARM_MAX)
: X86_32_SSE_REGPARM_MAX)
diff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt
index 853059081d2..6fd218f8ede 100644
--- a/gcc/config/i386/i386.opt
+++ b/gcc/config/i386/i386.opt
@@ -228,6 +228,10 @@ mtune=
Target RejectNegative Joined Var(ix86_tune_string)
Schedule code for given CPU
+mabi=
+Target RejectNegative Joined Var(ix86_abi_string)
+Generate code that conforms to the given ABI
+
mveclibabi=
Target RejectNegative Joined Var(ix86_veclibabi_string)
Vector library ABI to use
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index f3fbe8c5865..746d7d105da 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -38,7 +38,7 @@ along with GCC; see the file COPYING3. If not see
builtin_define_std ("WINNT"); \
builtin_define_with_int_value ("_INTEGRAL_MAX_BITS", \
TYPE_PRECISION (intmax_type_node));\
- if (TARGET_64BIT && DEFAULT_ABI == MS_ABI) \
+ if (TARGET_64BIT && ix86_abi == MS_ABI) \
{ \
builtin_define ("__MINGW64__"); \
builtin_define_std ("WIN64"); \
diff --git a/gcc/config/ia64/sync.md b/gcc/config/ia64/sync.md
index e356081202e..b40e208b6a0 100644
--- a/gcc/config/ia64/sync.md
+++ b/gcc/config/ia64/sync.md
@@ -151,10 +151,10 @@
(unspec:I124MODE
[(match_dup 1)
(match_operand:DI 2 "ar_ccv_reg_operand" "")
- (match_operand:I124MODE 3 "gr_register_operand" "r")]
+ (match_operand:I124MODE 3 "gr_reg_or_0_operand" "rO")]
UNSPEC_CMPXCHG_ACQ))]
""
- "cmpxchg<modesuffix>.rel %0 = %1, %3, %2"
+ "cmpxchg<modesuffix>.rel %0 = %1, %r3, %2"
[(set_attr "itanium_class" "sem")])
(define_insn "cmpxchg_rel_di"
@@ -163,19 +163,19 @@
(set (match_dup 1)
(unspec:DI [(match_dup 1)
(match_operand:DI 2 "ar_ccv_reg_operand" "")
- (match_operand:DI 3 "gr_register_operand" "r")]
+ (match_operand:DI 3 "gr_reg_or_0_operand" "rO")]
UNSPEC_CMPXCHG_ACQ))]
""
- "cmpxchg8.rel %0 = %1, %3, %2"
+ "cmpxchg8.rel %0 = %1, %r3, %2"
[(set_attr "itanium_class" "sem")])
(define_insn "sync_lock_test_and_set<mode>"
[(set (match_operand:IMODE 0 "gr_register_operand" "=r")
(match_operand:IMODE 1 "not_postinc_memory_operand" "+S"))
(set (match_dup 1)
- (match_operand:IMODE 2 "gr_register_operand" "r"))]
+ (match_operand:IMODE 2 "gr_reg_or_0_operand" "rO"))]
""
- "xchg<modesuffix> %0 = %1, %2"
+ "xchg<modesuffix> %0 = %1, %r2"
[(set_attr "itanium_class" "sem")])
(define_expand "sync_lock_release<mode>"
diff --git a/gcc/coverage.c b/gcc/coverage.c
index b2ac87651d3..8eb30acb90d 100644
--- a/gcc/coverage.c
+++ b/gcc/coverage.c
@@ -459,6 +459,8 @@ tree_coverage_counter_addr (unsigned counter, unsigned no)
gcc_assert (no < fn_n_ctrs[counter] - fn_b_ctrs[counter]);
no += prg_n_ctrs[counter] + fn_b_ctrs[counter];
+ TREE_ADDRESSABLE (tree_ctr_tables[counter]) = 1;
+
/* "no" here is an array index, scaled to bytes later. */
return build_fold_addr_expr (build4 (ARRAY_REF, gcov_type_node,
tree_ctr_tables[counter],
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 6fcd92a8822..124a3e95651 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,16 @@
+2009-03-27 Jan Hubicka <jh@suse.cz>
+
+ * except.c (choose_personality_routine): Set terminate_node to abort
+ for java exceptions.
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * cp-objcp-common.h (LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P): Define.
+ (cp_function_decl_explicit_p): New prototype.
+ * cp-objcp-common.c (cp_function_decl_explicit_p): New function.
+
2009-03-27 Andrew Pinski <andrew_pinski@playstation.sony.com>
PR c++/38638
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index fefafb1ac7e..daefa2b0d87 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -1,5 +1,5 @@
/* Some code common to C++ and ObjC++ front ends.
- Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GCC.
@@ -203,6 +203,16 @@ cxx_staticp (tree arg)
return NULL_TREE;
}
+/* Return true if DECL is explicit member function. */
+
+bool
+cp_function_decl_explicit_p (tree decl)
+{
+ return (decl
+ && FUNCTION_FIRST_USER_PARMTYPE (decl) != void_list_node
+ && DECL_NONCONVERTING_P (decl));
+}
+
/* Stubs to keep c-opts.c happy. */
void
push_file_scope (void)
diff --git a/gcc/cp/cp-objcp-common.h b/gcc/cp/cp-objcp-common.h
index f24107598aa..bda23eb635b 100644
--- a/gcc/cp/cp-objcp-common.h
+++ b/gcc/cp/cp-objcp-common.h
@@ -1,5 +1,5 @@
/* Language hooks common to C++ and ObjC++ front ends.
- Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
Contributed by Ziemowit Laski <zlaski@apple.com>
This file is part of GCC.
@@ -26,6 +26,8 @@ along with GCC; see the file COPYING3. If not see
extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
tree, bool);
+extern bool cp_function_decl_explicit_p (tree decl);
+
/* Lang hooks that are shared between C++ and ObjC++ are defined here. Hooks
specific to C++ or ObjC++ go in cp/cp-lang.c and objcp/objcp-lang.c,
respectively. */
@@ -131,6 +133,8 @@ extern tree objcp_tsubst_copy_and_build (tree, tree, tsubst_flags_t,
#define LANG_HOOKS_TO_TARGET_CHARSET c_common_to_target_charset
#undef LANG_HOOKS_GIMPLIFY_EXPR
#define LANG_HOOKS_GIMPLIFY_EXPR cp_gimplify_expr
+#undef LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P
+#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P cp_function_decl_explicit_p
#undef LANG_HOOKS_OMP_PREDETERMINED_SHARING
#define LANG_HOOKS_OMP_PREDETERMINED_SHARING cxx_omp_predetermined_sharing
#undef LANG_HOOKS_OMP_CLAUSE_DEFAULT_CTOR
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index 7813d087405..2638ccc90d9 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -353,6 +353,7 @@ choose_personality_routine (enum languages lang)
case lang_java:
state = chose_java;
+ terminate_node = built_in_decls [BUILT_IN_ABORT];
eh_personality_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
? "__gcj_personality_sj0"
: "__gcj_personality_v0");
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 1d58f06879a..ac5b2c84580 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -585,7 +585,7 @@ Objective-C and Objective-C++ Dialects}.
-m96bit-long-double -mregparm=@var{num} -msseregparm @gol
-mveclibabi=@var{type} -mpc32 -mpc64 -mpc80 -mstackrealign @gol
-momit-leaf-frame-pointer -mno-red-zone -mno-tls-direct-seg-refs @gol
--mcmodel=@var{code-model} @gol
+-mcmodel=@var{code-model} -mabi=@var{name} @gol
-m32 -m64 -mlarge-data-threshold=@var{num} @gol
-mfused-madd -mno-fused-madd -msse2avx}
@@ -11393,6 +11393,16 @@ when @option{-mveclibabi=acml} is used. Both @option{-ftree-vectorize} and
@option{-funsafe-math-optimizations} have to be enabled. A SVML or ACML ABI
compatible library will have to be specified at link time.
+@item -mabi=@var{name}
+@opindex mabi
+Generate code for the specified calling convention. Permissible values
+are: @samp{sysv} for the ABI used on GNU/Linux and other systems and
+@samp{ms} for the Microsoft ABI. The default is to use the Microsoft
+ABI when targeting Windows. On all other systems, the default is the
+SYSV ABI. You can control this behavior for a specific function by
+using the function attribute @samp{ms_abi}/@samp{sysv_abi}.
+@xref{Function Attributes}.
+
@item -mpush-args
@itemx -mno-push-args
@opindex mpush-args
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 9bf0803ce57..1c82f9c09ff 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -5599,6 +5599,8 @@ dwarf_attr_name (unsigned int attr)
return "DW_AT_encoding";
case DW_AT_external:
return "DW_AT_external";
+ case DW_AT_explicit:
+ return "DW_AT_explicit";
case DW_AT_frame_base:
return "DW_AT_frame_base";
case DW_AT_friend:
@@ -13611,6 +13613,11 @@ gen_subprogram_die (tree decl, dw_die_ref context_die)
{
add_AT_flag (subr_die, DW_AT_declaration, 1);
+ /* If this is an explicit function declaration then generate
+ a DW_AT_explicit attribute. */
+ if (lang_hooks.decls.function_decl_explicit_p (decl))
+ add_AT_flag (subr_die, DW_AT_explicit, 1);
+
/* The first time we see a member function, it is in the context of
the class to which it belongs. We make sure of this by emitting
the class first. The next time is the definition, which is
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index ca033824c0d..1f51e125f35 100644
--- a/gcc/emit-rtl.c
+++ b/gcc/emit-rtl.c
@@ -1495,7 +1495,7 @@ mem_expr_equal_p (const_tree expr1, const_tree expr2)
-1 if not known. */
int
-get_mem_align_offset (rtx mem, int align)
+get_mem_align_offset (rtx mem, unsigned int align)
{
tree expr;
unsigned HOST_WIDE_INT offset;
diff --git a/gcc/expr.h b/gcc/expr.h
index 216de87feb1..7e7e08843c8 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -699,7 +699,7 @@ extern void set_mem_attributes_minus_bitpos (rtx, tree, int, HOST_WIDE_INT);
/* Return OFFSET if XEXP (MEM, 0) - OFFSET is known to be ALIGN
bits aligned for 0 <= OFFSET < ALIGN / BITS_PER_UNIT, or
-1 if not known. */
-extern int get_mem_align_offset (rtx, int);
+extern int get_mem_align_offset (rtx, unsigned int);
/* Assemble the static constant template for function entry trampolines. */
extern rtx assemble_trampoline_template (void);
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index e38850fd5df..4ca91a22d98 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -7937,11 +7937,10 @@ fold_view_convert_expr (tree type, tree expr)
}
/* Build an expression for the address of T. Folds away INDIRECT_REF
- to avoid confusing the gimplify process. When IN_FOLD is true
- avoid modifications of T. */
+ to avoid confusing the gimplify process. */
-static tree
-build_fold_addr_expr_with_type_1 (tree t, tree ptrtype, bool in_fold)
+tree
+build_fold_addr_expr_with_type (tree t, tree ptrtype)
{
/* The size of the object is not relevant when talking about its address. */
if (TREE_CODE (t) == WITH_SIZE_EXPR)
@@ -7956,56 +7955,20 @@ build_fold_addr_expr_with_type_1 (tree t, tree ptrtype, bool in_fold)
if (TREE_TYPE (t) != ptrtype)
t = build1 (NOP_EXPR, ptrtype, t);
}
- else if (!in_fold)
- {
- tree base = t;
-
- while (handled_component_p (base))
- base = TREE_OPERAND (base, 0);
-
- if (DECL_P (base))
- TREE_ADDRESSABLE (base) = 1;
-
- t = build1 (ADDR_EXPR, ptrtype, t);
- }
else
t = build1 (ADDR_EXPR, ptrtype, t);
return t;
}
-/* Build an expression for the address of T with type PTRTYPE. This
- function modifies the input parameter 'T' by sometimes setting the
- TREE_ADDRESSABLE flag. */
-
-tree
-build_fold_addr_expr_with_type (tree t, tree ptrtype)
-{
- return build_fold_addr_expr_with_type_1 (t, ptrtype, false);
-}
-
-/* Build an expression for the address of T. This function modifies
- the input parameter 'T' by sometimes setting the TREE_ADDRESSABLE
- flag. When called from fold functions, use fold_addr_expr instead. */
+/* Build an expression for the address of T. */
tree
build_fold_addr_expr (tree t)
{
- return build_fold_addr_expr_with_type_1 (t,
- build_pointer_type (TREE_TYPE (t)),
- false);
-}
-
-/* Same as build_fold_addr_expr, builds an expression for the address
- of T, but avoids touching the input node 't'. Fold functions
- should use this version. */
-
-static tree
-fold_addr_expr (tree t)
-{
tree ptrtype = build_pointer_type (TREE_TYPE (t));
- return build_fold_addr_expr_with_type_1 (t, ptrtype, true);
+ return build_fold_addr_expr_with_type (t, ptrtype);
}
/* Fold a unary expression of code CODE and type TYPE with operand
@@ -8245,7 +8208,7 @@ fold_unary (enum tree_code code, tree type, tree op0)
if (! offset && bitpos == 0
&& TYPE_MAIN_VARIANT (TREE_TYPE (type))
== TYPE_MAIN_VARIANT (TREE_TYPE (base)))
- return fold_convert (type, fold_addr_expr (base));
+ return fold_convert (type, build_fold_addr_expr (base));
}
if (TREE_CODE (op0) == MODIFY_EXPR
@@ -9155,9 +9118,9 @@ fold_comparison (enum tree_code code, tree type, tree op0, tree op1)
&& operand_equal_p (offset0, offset1, 0))))
{
if (indirect_base0)
- base0 = fold_addr_expr (base0);
+ base0 = build_fold_addr_expr (base0);
if (indirect_base1)
- base1 = fold_addr_expr (base1);
+ base1 = build_fold_addr_expr (base1);
return fold_build2 (code, type, base0, base1);
}
}
@@ -15829,7 +15792,7 @@ split_address_to_core_and_offset (tree exp,
core = get_inner_reference (TREE_OPERAND (exp, 0), &bitsize, pbitpos,
poffset, &mode, &unsignedp, &volatilep,
false);
- core = fold_addr_expr (core);
+ core = build_fold_addr_expr (core);
}
else
{
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 9cb9c94dcd6..09084fba1c1 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,42 @@
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ * trans-array.c (gfc_conv_descriptor_data_addr): Use
+ gfc_build_addr_expr instead of build_fold_addr_expr.
+ (gfc_trans_allocate_array_storage, gfc_trans_array_constructor_value,
+ gfc_trans_constant_array_constructor, gfc_conv_array_data,
+ gfc_conv_expr_descriptor, gfc_conv_array_parameter): Likewise.
+ * trans-expr.c (gfc_conv_missing_dummy, gfc_conv_variable,
+ gfc_conv_function_val, gfc_conv_operator_assign,
+ gfc_conv_subref_array_arg, gfc_conv_function_call,
+ gfc_conv_expr_reference, gfc_trans_scalar_assign): Likewise.
+ * trans-intrinsic.c (gfc_conv_intrinsic_exponent,
+ gfc_conv_intrinsic_ctime, gfc_conv_intrinsic_fdate,
+ gfc_conv_intrinsic_ttynam, gfc_conv_intrinsic_minmax_char,
+ gfc_conv_intrinsic_fraction, gfc_conv_intrinsic_spacing,
+ gfc_conv_intrinsic_rrspacing, gfc_conv_intrinsic_set_exponent,
+ gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_transfer,
+ gfc_conv_intrinsic_si_kind, gfc_conv_intrinsic_trim): Likewise.
+ * trans-io.c (gfc_trans_io_runtime_check, set_parameter_ref,
+ gfc_convert_array_to_string, gfc_trans_open, gfc_trans_close,
+ build_filepos, gfc_trans_inquire, gfc_trans_wait,
+ nml_get_addr_expr, transfer_namelist_element, build_dt,
+ gfc_trans_dt_end, transfer_array_component, transfer_expr,
+ transfer_array_desc, gfc_trans_transfer): Likewise.
+ * trans-stmt.c (gfc_trans_allocate, gfc_trans_deallocate): Likewise.
+ * trans.c (gfc_build_addr_expr): Mark the base of the address
+ TREE_ADDRESSABLE.
+
+2009-03-27 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.h (enum init_local_real.): Add GFC_INIT_REAL_SNAN.
+ (gfc_expr): Add is_snan.
+ * trans-const.c (gfc_conv_mpfr_to_tree): Support SNaN.
+ (gfc_conv_constant_to_tree): Update call to gfc_conv_mpfr_to_tree.
+ * trans-const.h (gfc_conv_mpfr_to_tree): Update prototype.
+ * resolve.c (build_default_init_expr): Update call.
+ * target-memory.c (encode_float): Ditto.
+ * trans-intrinsic.c (gfc_conv_intrinsic_aint,gfc_conv_intrinsic_mod,
+
2009-03-18 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lang.opt: Unify help texts for -I, -Wconversion, -d, -fopenmp,
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 8795bee3c91..a5b4fc6f0be 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -527,6 +527,7 @@ typedef enum
GFC_INIT_REAL_OFF = 0,
GFC_INIT_REAL_ZERO,
GFC_INIT_REAL_NAN,
+ GFC_INIT_REAL_SNAN,
GFC_INIT_REAL_INF,
GFC_INIT_REAL_NEG_INF
}
@@ -1547,8 +1548,10 @@ typedef struct gfc_expr
locus where;
/* True if the expression is a call to a function that returns an array,
- and if we have decided not to allocate temporary data for that array. */
- unsigned int inline_noncopying_intrinsic : 1, is_boz : 1;
+ and if we have decided not to allocate temporary data for that array.
+ is_boz is true if the integer is regarded as BOZ bitpatten and is_snan
+ denotes a signalling not-a-number. */
+ unsigned int inline_noncopying_intrinsic : 1, is_boz : 1, is_snan : 1;
/* Sometimes, when an error has been emitted, it is necessary to prevent
it from recurring. */
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index 8e18dd2342c..8138464a4f4 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -169,7 +169,7 @@ and warnings}.
-fmax-stack-var-size=@var{n} @gol
-fpack-derived -frepack-arrays -fshort-enums -fexternal-blas @gol
-fblas-matmul-limit=@var{n} -frecursive -finit-local-zero @gol
--finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan>} @gol
+-finit-integer=@var{n} -finit-real=@var{<zero|inf|-inf|nan|snan>} @gol
-finit-logical=@var{<true|false>} -finit-character=@var{n} -fno-align-commons}
@end table
@@ -1303,7 +1303,7 @@ on the stack. This flag cannot be used together with
@item -finit-local-zero
@item -finit-integer=@var{n}
-@item -finit-real=@var{<zero|inf|-inf|nan>}
+@item -finit-real=@var{<zero|inf|-inf|nan|snan>}
@item -finit-logical=@var{<true|false>}
@item -finit-character=@var{n}
@opindex @code{finit-local-zero}
@@ -1317,7 +1317,7 @@ variables to zero, @code{LOGICAL} variables to false, and
@code{CHARACTER} variables to a string of null bytes. Finer-grained
initialization options are provided by the
@option{-finit-integer=@var{n}},
-@option{-finit-real=@var{<zero|inf|-inf|nan>}} (which also initializes
+@option{-finit-real=@var{<zero|inf|-inf|nan|snan>}} (which also initializes
the real and imaginary parts of local @code{COMPLEX} variables),
@option{-finit-logical=@var{<true|false>}}, and
@option{-finit-character=@var{n}} (where @var{n} is an ASCII character
@@ -1327,7 +1327,10 @@ type variables, nor do they initialize variables that appear in an
future releases).
Note that the @option{-finit-real=nan} option initializes @code{REAL}
-and @code{COMPLEX} variables with a quiet NaN.
+and @code{COMPLEX} variables with a quiet NaN. For a signalling NaN
+use @option{-finit-real=snan}; note, however, that compile-time
+optimizations may convert them into quiet NaN and that trapping
+needs to be enabled (e.g. via @option{-ffpe-trap}).
@item -falign-commons
@opindex @code{falign-commons}
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 7a800ce8c66..d48bf24cdad 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -718,6 +718,8 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_option.flag_init_real = GFC_INIT_REAL_ZERO;
else if (!strcasecmp (arg, "nan"))
gfc_option.flag_init_real = GFC_INIT_REAL_NAN;
+ else if (!strcasecmp (arg, "snan"))
+ gfc_option.flag_init_real = GFC_INIT_REAL_SNAN;
else if (!strcasecmp (arg, "inf"))
gfc_option.flag_init_real = GFC_INIT_REAL_INF;
else if (!strcasecmp (arg, "-inf"))
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 433f380868b..e887fb13a6f 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -7357,6 +7357,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.real);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.real);
break;
@@ -7385,6 +7388,9 @@ build_default_init_expr (gfc_symbol *sym)
mpfr_init (init_expr->value.complex.i);
switch (gfc_option.flag_init_real)
{
+ case GFC_INIT_REAL_SNAN:
+ init_expr->is_snan = 1;
+ /* Fall through. */
case GFC_INIT_REAL_NAN:
mpfr_set_nan (init_expr->value.complex.r);
mpfr_set_nan (init_expr->value.complex.i);
diff --git a/gcc/fortran/target-memory.c b/gcc/fortran/target-memory.c
index dc10b53d926..07d5e194355 100644
--- a/gcc/fortran/target-memory.c
+++ b/gcc/fortran/target-memory.c
@@ -158,7 +158,7 @@ encode_integer (int kind, mpz_t integer, unsigned char *buffer,
static int
encode_float (int kind, mpfr_t real, unsigned char *buffer, size_t buffer_size)
{
- return native_encode_expr (gfc_conv_mpfr_to_tree (real, kind), buffer,
+ return native_encode_expr (gfc_conv_mpfr_to_tree (real, kind, 0), buffer,
buffer_size);
}
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 6c623504af8..6f750e63d84 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -194,7 +194,7 @@ gfc_conv_descriptor_data_addr (tree desc)
gcc_assert (DATA_FIELD == 0);
t = fold_build3 (COMPONENT_REF, TREE_TYPE (field), desc, field, NULL_TREE);
- return build_fold_addr_expr (t);
+ return gfc_build_addr_expr (NULL_TREE, t);
}
tree
@@ -533,7 +533,7 @@ gfc_trans_allocate_array_storage (stmtblock_t * pre, stmtblock_t * post,
tmp = build_array_type (gfc_get_element_type (TREE_TYPE (desc)),
tmp);
tmp = gfc_create_var (tmp, "A");
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
gfc_conv_descriptor_data_set (pre, desc, tmp);
}
else
@@ -1281,8 +1281,8 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
tmp = gfc_conv_descriptor_data_get (desc);
tmp = build_fold_indirect_ref (tmp);
tmp = gfc_build_array_ref (tmp, *poffset, NULL);
- tmp = build_fold_addr_expr (tmp);
- init = build_fold_addr_expr (init);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
+ init = gfc_build_addr_expr (NULL_TREE, init);
size = TREE_INT_CST_LOW (TYPE_SIZE_UNIT (type));
bound = build_int_cst (NULL_TREE, n * size);
@@ -1683,7 +1683,7 @@ gfc_trans_constant_array_constructor (gfc_loopinfo * loop,
info = &ss->data.info;
info->descriptor = tmp;
- info->data = build_fold_addr_expr (tmp);
+ info->data = gfc_build_addr_expr (NULL_TREE, tmp);
info->offset = gfc_index_zero_node;
for (i = 0; i < info->dimen; i++)
@@ -2136,7 +2136,7 @@ gfc_conv_array_data (tree descriptor)
else
{
/* Descriptorless arrays. */
- return build_fold_addr_expr (descriptor);
+ return gfc_build_addr_expr (NULL_TREE, descriptor);
}
}
else
@@ -4836,7 +4836,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{
/* We pass full arrays directly. This means that pointers and
allocatable arrays should also work. */
- se->expr = build_fold_addr_expr (desc);
+ se->expr = gfc_build_addr_expr (NULL_TREE, desc);
}
else
{
@@ -4867,7 +4867,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
/* For pointer assignments pass the descriptor directly. */
se->ss = secss;
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
gfc_conv_expr (se, expr);
return;
}
@@ -5189,7 +5189,7 @@ gfc_conv_expr_descriptor (gfc_se * se, gfc_expr * expr, gfc_ss * ss)
{
/* Get a pointer to the new descriptor. */
if (se->want_pointer)
- se->expr = build_fold_addr_expr (desc);
+ se->expr = gfc_build_addr_expr (NULL_TREE, desc);
else
se->expr = desc;
}
@@ -5255,7 +5255,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
if (sym->attr.dummy || POINTER_TYPE_P (TREE_TYPE (tmp)))
se->expr = tmp;
else
- se->expr = build_fold_addr_expr (tmp);
+ se->expr = gfc_build_addr_expr (NULL_TREE, tmp);
return;
}
if (sym->attr.allocatable)
@@ -5275,7 +5275,7 @@ gfc_conv_array_parameter (gfc_se * se, gfc_expr * expr, gfc_ss * ss, int g77,
{
/* Result of the enclosing function. */
gfc_conv_expr_descriptor (se, expr, ss);
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
if (g77 && TREE_TYPE (TREE_TYPE (se->expr)) != NULL_TREE
&& GFC_DESCRIPTOR_TYPE_P (TREE_TYPE (TREE_TYPE (se->expr))))
diff --git a/gcc/fortran/trans-const.c b/gcc/fortran/trans-const.c
index 4db3512bc0e..569aa7ec15e 100644
--- a/gcc/fortran/trans-const.c
+++ b/gcc/fortran/trans-const.c
@@ -218,7 +218,7 @@ gfc_conv_tree_to_mpz (mpz_t i, tree source)
/* Converts a real constant into backend form. */
tree
-gfc_conv_mpfr_to_tree (mpfr_t f, int kind)
+gfc_conv_mpfr_to_tree (mpfr_t f, int kind, int is_snan)
{
tree type;
int n;
@@ -228,7 +228,11 @@ gfc_conv_mpfr_to_tree (mpfr_t f, int kind)
gcc_assert (gfc_real_kinds[n].radix == 2);
type = gfc_get_real_type (kind);
- real_from_mpfr (&real, f, type, GFC_RND_MODE);
+ if (mpfr_nan_p (f) && is_snan)
+ real_from_string (&real, "SNaN");
+ else
+ real_from_mpfr (&real, f, type, GFC_RND_MODE);
+
return build_real (type, real);
}
@@ -277,7 +281,7 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
gfc_build_string_const (expr->representation.length,
expr->representation.string));
else
- return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind);
+ return gfc_conv_mpfr_to_tree (expr->value.real, expr->ts.kind, expr->is_snan);
case BT_LOGICAL:
if (expr->representation.string)
@@ -304,9 +308,9 @@ gfc_conv_constant_to_tree (gfc_expr * expr)
else
{
tree real = gfc_conv_mpfr_to_tree (expr->value.complex.r,
- expr->ts.kind);
+ expr->ts.kind, expr->is_snan);
tree imag = gfc_conv_mpfr_to_tree (expr->value.complex.i,
- expr->ts.kind);
+ expr->ts.kind, expr->is_snan);
return build_complex (gfc_typenode_for_spec (&expr->ts),
real, imag);
diff --git a/gcc/fortran/trans-const.h b/gcc/fortran/trans-const.h
index 2cba791c9c9..6cc71c5faad 100644
--- a/gcc/fortran/trans-const.h
+++ b/gcc/fortran/trans-const.h
@@ -24,7 +24,7 @@ tree gfc_conv_mpz_to_tree (mpz_t, int);
void gfc_conv_tree_to_mpz (mpz_t, tree);
/* Converts between REAL_CST and MPFR floating-point representations. */
-tree gfc_conv_mpfr_to_tree (mpfr_t, int);
+tree gfc_conv_mpfr_to_tree (mpfr_t, int, int);
void gfc_conv_tree_to_mpfr (mpfr_ptr, tree);
/* Build a tree for a constant. Must be an EXPR_CONSTANT gfc_expr.
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 8c869f977ca..89fcadf547c 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -164,7 +164,7 @@ gfc_conv_missing_dummy (gfc_se * se, gfc_expr * arg, gfc_typespec ts, int kind)
tmp = build3 (COND_EXPR, TREE_TYPE (tmp), present, tmp,
fold_convert (TREE_TYPE (tmp), integer_one_node));
tmp = gfc_evaluate_now (tmp, &se->pre);
- se->expr = build_fold_addr_expr (tmp);
+ se->expr = gfc_build_addr_expr (NULL_TREE, tmp);
}
else
{
@@ -603,7 +603,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
if (!sym->attr.dummy && !sym->attr.proc_pointer)
{
gcc_assert (TREE_CODE (se->expr) == FUNCTION_DECL);
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
return;
}
@@ -705,7 +705,7 @@ gfc_conv_variable (gfc_se * se, gfc_expr * expr)
if (expr->ts.type == BT_CHARACTER)
gfc_conv_string_parameter (se);
else
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
}
@@ -1519,7 +1519,7 @@ gfc_conv_function_val (gfc_se * se, gfc_symbol * sym)
if (!POINTER_TYPE_P (TREE_TYPE (tmp)))
{
gcc_assert (TREE_CODE (tmp) == FUNCTION_DECL);
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
}
}
se->expr = tmp;
@@ -1547,8 +1547,8 @@ gfc_conv_operator_assign (gfc_se *lse, gfc_se *rse, gfc_symbol *sym)
gfc_add_block_to_block (&block, &rse->pre);
/* Build the argument list for the call, including hidden string lengths. */
- args = gfc_chainon_list (NULL_TREE, build_fold_addr_expr (lse->expr));
- args = gfc_chainon_list (args, build_fold_addr_expr (rse->expr));
+ args = gfc_chainon_list (NULL_TREE, gfc_build_addr_expr (NULL_TREE, lse->expr));
+ args = gfc_chainon_list (args, gfc_build_addr_expr (NULL_TREE, rse->expr));
if (lse->string_length != NULL_TREE)
args = gfc_chainon_list (args, lse->string_length);
if (rse->string_length != NULL_TREE)
@@ -2371,7 +2371,7 @@ gfc_conv_subref_array_arg (gfc_se * parmse, gfc_expr * expr,
if (g77)
parmse->expr = gfc_conv_descriptor_data_get (parmse->expr);
else
- parmse->expr = build_fold_addr_expr (parmse->expr);
+ parmse->expr = gfc_build_addr_expr (NULL_TREE, parmse->expr);
return;
}
@@ -2666,7 +2666,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
&& fsym && fsym->attr.target)
{
gfc_conv_expr (&parmse, e);
- parmse.expr = build_fold_addr_expr (parmse.expr);
+ parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr);
}
else
{
@@ -2680,7 +2680,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
indirection. The null pointer already contains
this level of indirection. */
parm_kind = SCALAR_POINTER;
- parmse.expr = build_fold_addr_expr (parmse.expr);
+ parmse.expr = gfc_build_addr_expr (NULL_TREE, parmse.expr);
}
}
}
@@ -2881,7 +2881,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
/* Pass the temporary as the first argument. */
tmp = info->descriptor;
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
retargs = gfc_chainon_list (retargs, tmp);
}
else if (ts.type == BT_CHARACTER)
@@ -2897,7 +2897,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
var = gfc_create_var (type, "pstr");
/* Provide an address expression for the function arguments. */
- var = build_fold_addr_expr (var);
+ var = gfc_build_addr_expr (NULL_TREE, var);
}
else
var = gfc_conv_string_tmp (se, type, len);
@@ -2909,7 +2909,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
gcc_assert (gfc_option.flag_f2c && ts.type == BT_COMPLEX);
type = gfc_get_complex_type (ts.kind);
- var = build_fold_addr_expr (gfc_create_var (type, "cmplx"));
+ var = gfc_build_addr_expr (NULL_TREE, gfc_create_var (type, "cmplx"));
retargs = gfc_chainon_list (retargs, var);
}
@@ -2945,7 +2945,7 @@ gfc_conv_function_call (gfc_se * se, gfc_symbol * sym,
TREE_TYPE (sym->backend_decl)
= build_function_type (integer_type_node,
TYPE_ARG_TYPES (TREE_TYPE (sym->backend_decl)));
- se->expr = build_fold_addr_expr (sym->backend_decl);
+ se->expr = gfc_build_addr_expr (NULL_TREE, sym->backend_decl);
}
else
TREE_TYPE (TREE_TYPE (TREE_TYPE (se->expr))) = integer_type_node;
@@ -4010,7 +4010,7 @@ gfc_conv_expr_reference (gfc_se * se, gfc_expr * expr)
gfc_add_block_to_block (&se->pre, &se->post);
/* Take the address of that value. */
- se->expr = build_fold_addr_expr (var);
+ se->expr = gfc_build_addr_expr (NULL_TREE, var);
}
@@ -4226,8 +4226,8 @@ gfc_trans_scalar_assign (gfc_se * lse, gfc_se * rse, gfc_typespec ts,
if (r_is_var)
{
cond = fold_build2 (EQ_EXPR, boolean_type_node,
- build_fold_addr_expr (lse->expr),
- build_fold_addr_expr (rse->expr));
+ gfc_build_addr_expr (NULL_TREE, lse->expr),
+ gfc_build_addr_expr (NULL_TREE, rse->expr));
cond = gfc_evaluate_now (cond, &lse->pre);
}
diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c
index c0ffc14b720..beb03d9bb73 100644
--- a/gcc/fortran/trans-intrinsic.c
+++ b/gcc/fortran/trans-intrinsic.c
@@ -488,11 +488,11 @@ gfc_conv_intrinsic_aint (gfc_se * se, gfc_expr * expr, enum rounding_mode op)
mpfr_init (huge);
n = gfc_validate_kind (BT_INTEGER, kind, false);
mpfr_set_z (huge, gfc_integer_kinds[n].huge, GFC_RND_MODE);
- tmp = gfc_conv_mpfr_to_tree (huge, kind);
+ tmp = gfc_conv_mpfr_to_tree (huge, kind, 0);
cond = fold_build2 (LT_EXPR, boolean_type_node, arg[0], tmp);
mpfr_neg (huge, huge, GFC_RND_MODE);
- tmp = gfc_conv_mpfr_to_tree (huge, kind);
+ tmp = gfc_conv_mpfr_to_tree (huge, kind, 0);
tmp = fold_build2 (GT_EXPR, boolean_type_node, arg[0], tmp);
cond = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, cond, tmp);
itype = gfc_get_int_type (kind);
@@ -807,7 +807,7 @@ gfc_conv_intrinsic_exponent (gfc_se *se, gfc_expr *expr)
res = gfc_create_var (integer_type_node, NULL);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (res));
+ gfc_build_addr_expr (NULL_TREE, res));
gfc_add_expr_to_block (&se->pre, tmp);
type = gfc_typenode_for_spec (&expr->ts);
@@ -1197,11 +1197,11 @@ gfc_conv_intrinsic_mod (gfc_se * se, gfc_expr * expr, int modulo)
ikind = gfc_max_integer_kind;
}
mpfr_set_z (huge, gfc_integer_kinds[n].huge, GFC_RND_MODE);
- test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind);
+ test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind, 0);
test2 = fold_build2 (LT_EXPR, boolean_type_node, tmp, test);
mpfr_neg (huge, huge, GFC_RND_MODE);
- test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind);
+ test = gfc_conv_mpfr_to_tree (huge, expr->ts.kind, 0);
test = fold_build2 (GT_EXPR, boolean_type_node, tmp, test);
test2 = fold_build2 (TRUTH_AND_EXPR, boolean_type_node, test, test2);
@@ -1375,8 +1375,8 @@ gfc_conv_intrinsic_ctime (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (8), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_ctime, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_ctime)),
@@ -1413,8 +1413,8 @@ gfc_conv_intrinsic_fdate (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_fdate, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_fdate)),
@@ -1453,8 +1453,8 @@ gfc_conv_intrinsic_ttynam (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (var);
- args[1] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, var);
+ args[1] = gfc_build_addr_expr (NULL_TREE, len);
fndecl = build_addr (gfor_fndecl_ttynam, current_function_decl);
tmp = build_call_array (TREE_TYPE (TREE_TYPE (gfor_fndecl_ttynam)),
@@ -1577,7 +1577,7 @@ gfc_conv_intrinsic_minmax_char (gfc_se * se, gfc_expr * expr, int op)
/* Create the result variables. */
len = gfc_create_var (gfc_charlen_type_node, "len");
- args[0] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, len);
var = gfc_create_var (gfc_get_pchar_type (expr->ts.kind), "pstr");
args[1] = gfc_build_addr_expr (ppvoid_type_node, var);
args[2] = build_int_cst (NULL_TREE, op);
@@ -2163,7 +2163,8 @@ gfc_conv_intrinsic_minmaxloc (gfc_se * se, gfc_expr * expr, int op)
switch (arrayexpr->ts.type)
{
case BT_REAL:
- tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, arrayexpr->ts.kind);
+ tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge,
+ arrayexpr->ts.kind, 0);
break;
case BT_INTEGER:
@@ -2342,7 +2343,7 @@ gfc_conv_intrinsic_minmaxval (gfc_se * se, gfc_expr * expr, int op)
switch (expr->ts.type)
{
case BT_REAL:
- tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, expr->ts.kind);
+ tmp = gfc_conv_mpfr_to_tree (gfc_real_kinds[n].huge, expr->ts.kind, 0);
break;
case BT_INTEGER:
@@ -3123,7 +3124,7 @@ gfc_conv_intrinsic_fraction (gfc_se * se, gfc_expr * expr)
tmp = gfc_create_var (integer_type_node, NULL);
se->expr = build_call_expr (built_in_decls[frexp], 2,
fold_convert (type, arg),
- build_fold_addr_expr (tmp));
+ gfc_build_addr_expr (NULL_TREE, tmp));
se->expr = fold_convert (type, se->expr);
}
@@ -3199,7 +3200,7 @@ gfc_conv_intrinsic_spacing (gfc_se * se, gfc_expr * expr)
k = gfc_validate_kind (BT_REAL, expr->ts.kind, false);
prec = build_int_cst (NULL_TREE, gfc_real_kinds[k].digits);
emin = build_int_cst (NULL_TREE, gfc_real_kinds[k].min_exponent - 1);
- tiny = gfc_conv_mpfr_to_tree (gfc_real_kinds[k].tiny, expr->ts.kind);
+ tiny = gfc_conv_mpfr_to_tree (gfc_real_kinds[k].tiny, expr->ts.kind, 0);
switch (expr->ts.kind)
{
@@ -3231,7 +3232,7 @@ gfc_conv_intrinsic_spacing (gfc_se * se, gfc_expr * expr)
/* Build the block for s /= 0. */
gfc_start_block (&block);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (e));
+ gfc_build_addr_expr (NULL_TREE, e));
gfc_add_expr_to_block (&block, tmp);
tmp = fold_build2 (MINUS_EXPR, integer_type_node, e, prec);
@@ -3309,7 +3310,7 @@ gfc_conv_intrinsic_rrspacing (gfc_se * se, gfc_expr * expr)
gfc_start_block (&block);
tmp = build_call_expr (built_in_decls[frexp], 2, arg,
- build_fold_addr_expr (e));
+ gfc_build_addr_expr (NULL_TREE, e));
gfc_add_expr_to_block (&block, tmp);
tmp = fold_build2 (MINUS_EXPR, integer_type_node,
@@ -3392,7 +3393,7 @@ gfc_conv_intrinsic_set_exponent (gfc_se * se, gfc_expr * expr)
tmp = gfc_create_var (integer_type_node, NULL);
tmp = build_call_expr (built_in_decls[frexp], 2,
fold_convert (type, args[0]),
- build_fold_addr_expr (tmp));
+ gfc_build_addr_expr (NULL_TREE, tmp));
se->expr = build_call_expr (built_in_decls[scalbn], 2, tmp,
fold_convert (integer_type_node, args[1]));
se->expr = fold_convert (type, se->expr);
@@ -3712,7 +3713,7 @@ gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
if (arg->expr->expr_type == EXPR_VARIABLE
&& arg->expr->ref->u.ar.type != AR_FULL)
{
- tmp = build_fold_addr_expr (argse.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, argse.expr);
if (gfc_option.warn_array_temp)
gfc_warning ("Creating array temporary at %L", &expr->where);
@@ -3953,7 +3954,7 @@ scalar_transfer:
ptr = convert (build_pointer_type (mold_type), source);
/* Use memcpy to do the transfer. */
- tmp = build_fold_addr_expr (tmpdecl);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmpdecl);
tmp = build_call_expr (built_in_decls[BUILT_IN_MEMCPY], 3,
fold_convert (pvoid_type_node, tmp),
fold_convert (pvoid_type_node, ptr),
@@ -4126,7 +4127,7 @@ gfc_conv_intrinsic_si_kind (gfc_se *se, gfc_expr *expr)
/* The argument to SELECTED_INT_KIND is INTEGER(4). */
type = gfc_get_int_type (4);
- arg = build_fold_addr_expr (fold_convert (type, arg));
+ arg = gfc_build_addr_expr (NULL_TREE, fold_convert (type, arg));
/* Convert it to the required type. */
type = gfc_typenode_for_spec (&expr->ts);
@@ -4202,7 +4203,7 @@ gfc_conv_intrinsic_trim (gfc_se * se, gfc_expr * expr)
len = gfc_create_var (gfc_get_int_type (4), "len");
gfc_conv_intrinsic_function_args (se, expr, &args[2], num_args - 2);
- args[0] = build_fold_addr_expr (len);
+ args[0] = gfc_build_addr_expr (NULL_TREE, len);
args[1] = addr;
if (expr->ts.kind == 1)
diff --git a/gcc/fortran/trans-io.c b/gcc/fortran/trans-io.c
index b5749ec89ac..40cb1f28d43 100644
--- a/gcc/fortran/trans-io.c
+++ b/gcc/fortran/trans-io.c
@@ -239,7 +239,7 @@ gfc_trans_io_runtime_check (tree cond, tree var, int error_code,
/* The code to generate the error. */
gfc_start_block (&block);
- arg1 = build_fold_addr_expr (var);
+ arg1 = gfc_build_addr_expr (NULL_TREE, var);
arg2 = build_int_cst (integer_type_node, error_code),
@@ -530,7 +530,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock,
if (TYPE_MODE (TREE_TYPE (se.expr))
== TYPE_MODE (TREE_TYPE (TREE_TYPE (p->field))))
{
- addr = convert (TREE_TYPE (p->field), build_fold_addr_expr (se.expr));
+ addr = convert (TREE_TYPE (p->field), gfc_build_addr_expr (NULL_TREE, se.expr));
/* If this is for the iostat variable initialize the
user variable to LIBERROR_OK which is zero. */
@@ -552,7 +552,7 @@ set_parameter_ref (stmtblock_t *block, stmtblock_t *postblock,
gfc_add_modify (block, tmpvar,
build_int_cst (TREE_TYPE (tmpvar), LIBERROR_OK));
- addr = build_fold_addr_expr (tmpvar);
+ addr = gfc_build_addr_expr (NULL_TREE, tmpvar);
/* After the I/O operation, we set the variable from the temporary. */
tmp = convert (TREE_TYPE (se.expr), tmpvar);
gfc_add_modify (postblock, se.expr, tmp);
@@ -621,7 +621,7 @@ gfc_convert_array_to_string (gfc_se * se, gfc_expr * e)
{
size = fold_build2 (MINUS_EXPR, gfc_array_index_type, size,
TREE_OPERAND (se->expr, 1));
- se->expr = build_fold_addr_expr (se->expr);
+ se->expr = gfc_build_addr_expr (NULL_TREE, se->expr);
}
tmp = TYPE_SIZE_UNIT (gfc_get_element_type (type));
@@ -966,7 +966,7 @@ gfc_trans_open (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_OPEN], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1018,7 +1018,7 @@ gfc_trans_close (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_CLOSE], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1068,7 +1068,7 @@ build_filepos (tree function, gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1325,7 +1325,7 @@ gfc_trans_inquire (gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_unit, 0);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_INQUIRE], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1374,7 +1374,7 @@ gfc_trans_wait (gfc_code * code)
if (p->unit)
set_parameter_value (&block, var, IOPARM_common_unit, p->unit);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (iocall[IOCALL_WAIT], 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1488,7 +1488,7 @@ nml_get_addr_expr (gfc_symbol * sym, gfc_component * c,
/* Now build the address expression. */
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
/* If scalar dummy, resolve indirect reference now. */
@@ -1581,7 +1581,7 @@ transfer_namelist_element (stmtblock_t * block, const char * var_name,
The call for the scalar part transfers:
(address, name, type, kind or string_length, dtype) */
- dt_parm_addr = build_fold_addr_expr (dt_parm);
+ dt_parm_addr = gfc_build_addr_expr (NULL_TREE, dt_parm);
if (ts->type == BT_CHARACTER)
tmp = ts->cl->backend_decl;
@@ -1791,7 +1791,7 @@ build_dt (tree function, gfc_code * code)
else
set_parameter_const (&block, var, IOPARM_common_flags, mask);
- tmp = build_fold_addr_expr (var);
+ tmp = gfc_build_addr_expr (NULL_TREE, var);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
@@ -1871,7 +1871,7 @@ gfc_trans_dt_end (gfc_code * code)
gcc_unreachable ();
}
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 1, tmp);
gfc_add_expr_to_block (&block, tmp);
gfc_add_block_to_block (&block, dt_post_end_block);
@@ -1955,7 +1955,7 @@ transfer_array_component (tree expr, gfc_component * cm, locus * where)
/* Now se.expr contains an element of the array. Take the address and pass
it to the IO routines. */
- tmp = build_fold_addr_expr (se.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, se.expr);
transfer_expr (&se, &cm->ts, tmp, NULL);
/* We are done now with the loop body. Wrap up the scalarizer and
@@ -2053,7 +2053,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
}
arg3 = build_int_cst (NULL_TREE, kind);
function = iocall[IOCALL_X_CHARACTER_WIDE];
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 4, tmp, addr_expr, arg2, arg3);
gfc_add_expr_to_block (&se->pre, tmp);
gfc_add_block_to_block (&se->pre, &se->post);
@@ -2093,7 +2093,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
else
{
if (!c->attr.pointer)
- tmp = build_fold_addr_expr (tmp);
+ tmp = gfc_build_addr_expr (NULL_TREE, tmp);
transfer_expr (se, &c->ts, tmp, code);
}
}
@@ -2103,7 +2103,7 @@ transfer_expr (gfc_se * se, gfc_typespec * ts, tree addr_expr, gfc_code * code)
internal_error ("Bad IO basetype (%d)", ts->type);
}
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (function, 3, tmp, addr_expr, arg2);
gfc_add_expr_to_block (&se->pre, tmp);
gfc_add_block_to_block (&se->pre, &se->post);
@@ -2126,7 +2126,7 @@ transfer_array_desc (gfc_se * se, gfc_typespec * ts, tree addr_expr)
kind_arg = build_int_cst (NULL_TREE, ts->kind);
- tmp = build_fold_addr_expr (dt_parm);
+ tmp = gfc_build_addr_expr (NULL_TREE, dt_parm);
tmp = build_call_expr (iocall[IOCALL_X_ARRAY], 4,
tmp, addr_expr, kind_arg, charlen_arg);
gfc_add_expr_to_block (&se->pre, tmp);
@@ -2198,7 +2198,7 @@ gfc_trans_transfer (gfc_code * code)
{
/* Get the descriptor. */
gfc_conv_expr_descriptor (&se, expr, ss);
- tmp = build_fold_addr_expr (se.expr);
+ tmp = gfc_build_addr_expr (NULL_TREE, se.expr);
}
transfer_array_desc (&se, &expr->ts, tmp);
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 42f0ac438ab..75eeb333d62 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -3893,7 +3893,7 @@ gfc_trans_allocate (gfc_code * code)
tree gfc_int4_type_node = gfc_get_int_type (4);
stat = gfc_create_var (gfc_int4_type_node, "stat");
- pstat = build_fold_addr_expr (stat);
+ pstat = gfc_build_addr_expr (NULL_TREE, stat);
error_label = gfc_build_label_decl (NULL_TREE);
TREE_USED (error_label) = 1;
@@ -3999,11 +3999,11 @@ gfc_trans_deallocate (gfc_code * code)
/* Variable used with the library call. */
stat = gfc_create_var (gfc_int4_type_node, "stat");
- pstat = build_fold_addr_expr (stat);
+ pstat = gfc_build_addr_expr (NULL_TREE, stat);
/* Running total of possible deallocation failures. */
astat = gfc_create_var (gfc_int4_type_node, "astat");
- apstat = build_fold_addr_expr (astat);
+ apstat = gfc_build_addr_expr (NULL_TREE, astat);
/* Initialize astat to 0. */
gfc_add_modify (&block, astat, build_int_cst (TREE_TYPE (astat), 0));
diff --git a/gcc/fortran/trans.c b/gcc/fortran/trans.c
index 628c2a08346..3dc2d8f4442 100644
--- a/gcc/fortran/trans.c
+++ b/gcc/fortran/trans.c
@@ -293,8 +293,9 @@ gfc_build_addr_expr (tree type, tree t)
}
else
{
- if (DECL_P (t))
- TREE_ADDRESSABLE (t) = 1;
+ tree base = get_base_address (t);
+ if (base && DECL_P (base))
+ TREE_ADDRESSABLE (base) = 1;
t = fold_build1 (ADDR_EXPR, natural_type, t);
}
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 8ed42636642..842ef378a9d 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -107,12 +107,14 @@ static enum gimplify_status gimplify_compound_expr (tree *, gimple_seq *, bool);
/* Mark X addressable. Unlike the langhook we expect X to be in gimple
form and we don't do any syntax checking. */
-static void
+void
mark_addressable (tree x)
{
while (handled_component_p (x))
x = TREE_OPERAND (x, 0);
- if (TREE_CODE (x) != VAR_DECL && TREE_CODE (x) != PARM_DECL)
+ if (TREE_CODE (x) != VAR_DECL
+ && TREE_CODE (x) != PARM_DECL
+ && TREE_CODE (x) != RESULT_DECL)
return ;
TREE_ADDRESSABLE (x) = 1;
}
@@ -3056,9 +3058,11 @@ gimplify_modify_expr_to_memcpy (tree *expr_p, tree size, bool want_value,
to = TREE_OPERAND (*expr_p, 0);
from = TREE_OPERAND (*expr_p, 1);
+ mark_addressable (from);
from_ptr = build_fold_addr_expr (from);
gimplify_arg (&from_ptr, seq_p, EXPR_LOCATION (*expr_p));
+ mark_addressable (to);
to_ptr = build_fold_addr_expr (to);
gimplify_arg (&to_ptr, seq_p, EXPR_LOCATION (*expr_p));
diff --git a/gcc/jump.c b/gcc/jump.c
index 2b9a9545223..1189f812fef 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -1536,6 +1536,7 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
{
int reg_x = -1, reg_y = -1;
int byte_x = 0, byte_y = 0;
+ struct subreg_info info;
if (GET_MODE (x) != GET_MODE (y))
return 0;
@@ -1552,15 +1553,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_x] >= 0)
{
- if (!subreg_offset_representable_p (reg_renumber[reg_x],
- GET_MODE (SUBREG_REG (x)),
- byte_x,
- GET_MODE (x)))
+ subreg_get_info (reg_renumber[reg_x],
+ GET_MODE (SUBREG_REG (x)), byte_x,
+ GET_MODE (x), &info);
+ if (!info.representable_p)
return 0;
- reg_x = subreg_regno_offset (reg_renumber[reg_x],
- GET_MODE (SUBREG_REG (x)),
- byte_x,
- GET_MODE (x));
+ reg_x = info.offset;
byte_x = 0;
}
}
@@ -1578,15 +1576,12 @@ rtx_renumbered_equal_p (const_rtx x, const_rtx y)
if (reg_renumber[reg_y] >= 0)
{
- if (!subreg_offset_representable_p (reg_renumber[reg_y],
- GET_MODE (SUBREG_REG (y)),
- byte_y,
- GET_MODE (y)))
+ subreg_get_info (reg_renumber[reg_y],
+ GET_MODE (SUBREG_REG (y)), byte_y,
+ GET_MODE (y), &info);
+ if (!info.representable_p)
return 0;
- reg_y = subreg_regno_offset (reg_renumber[reg_y],
- GET_MODE (SUBREG_REG (y)),
- byte_y,
- GET_MODE (y));
+ reg_y = info.offset;
byte_y = 0;
}
}
@@ -1728,13 +1723,17 @@ true_regnum (const_rtx x)
{
int base = true_regnum (SUBREG_REG (x));
if (base >= 0
- && base < FIRST_PSEUDO_REGISTER
- && subreg_offset_representable_p (REGNO (SUBREG_REG (x)),
- GET_MODE (SUBREG_REG (x)),
- SUBREG_BYTE (x), GET_MODE (x)))
- return base + subreg_regno_offset (REGNO (SUBREG_REG (x)),
- GET_MODE (SUBREG_REG (x)),
- SUBREG_BYTE (x), GET_MODE (x));
+ && base < FIRST_PSEUDO_REGISTER)
+ {
+ struct subreg_info info;
+
+ subreg_get_info (REGNO (SUBREG_REG (x)),
+ GET_MODE (SUBREG_REG (x)),
+ SUBREG_BYTE (x), GET_MODE (x), &info);
+
+ if (info.representable_p)
+ return base + info.offset;
+ }
}
return -1;
}
diff --git a/gcc/langhooks-def.h b/gcc/langhooks-def.h
index f9f8cde4d2a..96c091c7f05 100644
--- a/gcc/langhooks-def.h
+++ b/gcc/langhooks-def.h
@@ -189,6 +189,7 @@ extern tree lhd_make_node (enum tree_code);
#define LANG_HOOKS_GLOBAL_BINDINGS_P global_bindings_p
#define LANG_HOOKS_PUSHDECL pushdecl
#define LANG_HOOKS_GETDECLS getdecls
+#define LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P hook_bool_tree_false
#define LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL lhd_warn_unused_global_decl
#define LANG_HOOKS_WRITE_GLOBALS write_global_declarations
#define LANG_HOOKS_DECL_OK_FOR_SIBCALL lhd_decl_ok_for_sibcall
@@ -208,6 +209,7 @@ extern tree lhd_make_node (enum tree_code);
LANG_HOOKS_GLOBAL_BINDINGS_P, \
LANG_HOOKS_PUSHDECL, \
LANG_HOOKS_GETDECLS, \
+ LANG_HOOKS_FUNCTION_DECL_EXPLICIT_P, \
LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL, \
LANG_HOOKS_WRITE_GLOBALS, \
LANG_HOOKS_DECL_OK_FOR_SIBCALL, \
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index 52d1f24448c..40695781683 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -159,6 +159,9 @@ struct lang_hooks_for_decls
/* Returns the chain of decls so far in the current scope level. */
tree (*getdecls) (void);
+ /* Returns true if DECL is explicit member function. */
+ bool (*function_decl_explicit_p) (tree);
+
/* Returns true when we should warn for an unused global DECL.
We will already have checked that it has static binding. */
bool (*warn_unused_global) (const_tree);
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index dce89fa2464..c56915f6546 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -1595,6 +1595,7 @@ create_omp_child_function (omp_context *ctx, bool task_copy)
DECL_ARG_TYPE (t) = ptr_type_node;
DECL_CONTEXT (t) = current_function_decl;
TREE_USED (t) = 1;
+ TREE_ADDRESSABLE (t) = 1;
TREE_CHAIN (t) = DECL_ARGUMENTS (decl);
DECL_ARGUMENTS (decl) = t;
}
@@ -2316,6 +2317,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
x = create_tmp_var_raw (TREE_TYPE (TREE_TYPE (new_var)),
name);
gimple_add_tmp_var (x);
+ TREE_ADDRESSABLE (x) = 1;
x = build_fold_addr_expr_with_type (x, TREE_TYPE (new_var));
}
else
@@ -6344,6 +6346,7 @@ lower_omp_taskreg (gimple_stmt_iterator *gsi_p, omp_context *ctx)
ctx->sender_decl
= create_tmp_var (ctx->srecord_type ? ctx->srecord_type
: ctx->record_type, ".omp_data_o");
+ TREE_ADDRESSABLE (ctx->sender_decl) = 1;
gimple_omp_taskreg_set_data_arg (stmt, ctx->sender_decl);
}
diff --git a/gcc/rtl.h b/gcc/rtl.h
index af5867ec83c..7984267b2d3 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -1808,6 +1808,22 @@ extern rtx canonicalize_condition (rtx, rtx, int, rtx *, rtx, int, int);
being made. */
extern rtx get_condition (rtx, rtx *, int, int);
+/* Information about a subreg of a hard register. */
+struct subreg_info
+{
+ /* Offset of first hard register involved in the subreg. */
+ int offset;
+ /* Number of hard registers involved in the subreg. */
+ int nregs;
+ /* Whether this subreg can be represented as a hard reg with the new
+ mode. */
+ bool representable_p;
+};
+
+extern void subreg_get_info (unsigned int, enum machine_mode,
+ unsigned int, enum machine_mode,
+ struct subreg_info *);
+
/* lists.c */
extern void free_EXPR_LIST_list (rtx *);
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index cf719732e42..f3d55646ce0 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -39,18 +39,6 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "tree.h"
-/* Information about a subreg of a hard register. */
-struct subreg_info
-{
- /* Offset of first hard register involved in the subreg. */
- int offset;
- /* Number of hard registers involved in the subreg. */
- int nregs;
- /* Whether this subreg can be represented as a hard reg with the new
- mode. */
- bool representable_p;
-};
-
/* Forward declarations */
static void set_of_1 (rtx, const_rtx, void *);
static bool covers_regno_p (const_rtx, unsigned int);
@@ -58,9 +46,6 @@ static bool covers_regno_no_parallel_p (const_rtx, unsigned int);
static int rtx_referenced_p_1 (rtx *, void *);
static int computed_jump_p_1 (const_rtx);
static void parms_set (rtx, const_rtx, void *);
-static void subreg_get_info (unsigned int, enum machine_mode,
- unsigned int, enum machine_mode,
- struct subreg_info *);
static unsigned HOST_WIDE_INT cached_nonzero_bits (const_rtx, enum machine_mode,
const_rtx, enum machine_mode,
@@ -3213,7 +3198,7 @@ subreg_lsb (const_rtx x)
offset - The byte offset.
ymode - The mode of a top level SUBREG (or what may become one).
info - Pointer to structure to fill in. */
-static void
+void
subreg_get_info (unsigned int xregno, enum machine_mode xmode,
unsigned int offset, enum machine_mode ymode,
struct subreg_info *info)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 38567f69fbf..ff739aca938 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,65 @@
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * gcc.c-torture/execute/pr39120.c: New testcase.
+
+2009-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/39120
+ * gcc.dg/torture/pta-callused-1.c: New testcase.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/39315
+ * gcc.target/i386/pr39315-1.c: New.
+ * gcc.target/i386/pr39315-2.c: Likewise.
+ * gcc.target/i386/pr39315-3.c: Likewise.
+ * gcc.target/i386/pr39315-4.c: Likewise.
+ * gcc.target/i386/pr39315-check.c: Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR c/39323
+ * gcc.dg/pr39323-1.c: New.
+ * gcc.dg/pr39323-2.c: Likewise.
+ * gcc.dg/pr39323-3.c: Likewise.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/38034
+ * gcc.target/ia64/sync-1.c: New.
+
+2009-03-27 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/39472
+ * gcc.target/x86_64/abi/callabi/func-2a.c: New.
+ * gcc.target/x86_64/abi/callabi/func-2b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-4a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-4b.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-5a.c: Likewise.
+ * gcc.target/x86_64/abi/callabi/vaarg-5b.c: Likewise.
+
+2009-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * gcc.dg/torture/builtin-explog-1.c: Remove tests that aren't true
+ for low precision (i.e. float).
+
+2009-03-27 Dodji Seketeli <dodji@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/37959
+ * g++.dg/debug/dwarf2/explicit-constructor.C: New test.
+
+2009-03-27 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/memmove-2.c: New test.
+ * gcc.dg/memmove-3.c: New test.
+
+ * gcc.dg/ipa/ipacost-1.c: Adjust match pattern for change
+ in clone naming.
+
2009-03-27 Xinliang David Li <davidxl@google.com>
PR tree-optimization/39557
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
new file mode 100644
index 00000000000..42fd26455f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
@@ -0,0 +1,19 @@
+// Contributed by Dodji Seketeli <dodji@redhat.com>
+// Origin: PR c++
+// { dg-do compile }
+// { dg-options "-O -g -dA" }
+// { dg-final { scan-assembler-times "DW_AT_explicit" 2 } }
+
+struct Foo
+{
+ Foo () {}
+ explicit Foo (int) {}
+ Foo (char) {}
+ ~Foo () {};
+};
+
+void
+bar ()
+{
+ Foo foo;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr39120.c b/gcc/testsuite/gcc.c-torture/execute/pr39120.c
new file mode 100644
index 00000000000..8859848007b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr39120.c
@@ -0,0 +1,18 @@
+struct X { int *p; } x;
+
+struct X __attribute__((noinline))
+foo(int *p) { struct X x; x.p = p; return x; }
+
+void __attribute((noinline))
+bar() { *x.p = 1; }
+
+extern void abort (void);
+int main()
+{
+ int i = 0;
+ x = foo(&i);
+ bar();
+ if (i != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
index ac013a72350..1c75c6cfde5 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipacost-1.c
@@ -53,6 +53,7 @@ main()
/* { dg-final { scan-ipa-dump-times "versioned function i_can_be_propagated_fully " 1 "cp" } } */
/* { dg-final { scan-ipa-dump-not "versioned function i_can_not_be_propagated_fully2" "cp" } } */
/* { dg-final { scan-ipa-dump-not "versioned function i_can_not_be_propagated_fully " "cp" } } */
-/* { dg-final { scan-tree-dump-not "i_can_be_propagated" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully " "optimized" } } */
+/* { dg-final { scan-tree-dump-not "i_can_be_propagated_fully2 " "optimized" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/memmove-2.c b/gcc/testsuite/gcc.dg/memmove-2.c
new file mode 100644
index 00000000000..9c691ef01c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/memmove-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "memmove" 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+char a[40];
+extern void bar (char *);
+
+void
+foo (void)
+{
+ char b[10];
+ __builtin_memmove (&a[0], &a[20], 20);
+ __builtin_memmove (&b[1], &a[25], 9);
+ bar (b);
+}
diff --git a/gcc/testsuite/gcc.dg/memmove-3.c b/gcc/testsuite/gcc.dg/memmove-3.c
new file mode 100644
index 00000000000..98493b3d42c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/memmove-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "memmove" 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+char a[40];
+struct A { char a[30]; };
+
+void
+foo (struct A *p, char *q, char *r)
+{
+ char b[10];
+ __builtin_memmove (&a[1], &a[19], 20);
+ __builtin_memmove (&p->a[1], &p->a[9], 10);
+ __builtin_memmove (q, r, 9);
+}
diff --git a/gcc/testsuite/gcc.dg/pr39323-1.c b/gcc/testsuite/gcc.dg/pr39323-1.c
new file mode 100644
index 00000000000..2876bf39aba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-1.c
@@ -0,0 +1,5 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+int foo __attribute__ ((aligned(1 << 29))) = 20; /* { dg-error "requested alignment is too large" } */
+typedef int __attribute__ ((aligned(1 << 29))) int29; /* { dg-error "requested alignment is too large" } */
diff --git a/gcc/testsuite/gcc.dg/pr39323-2.c b/gcc/testsuite/gcc.dg/pr39323-2.c
new file mode 100644
index 00000000000..2eaa6e96e73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-2.c
@@ -0,0 +1,6 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+int bar __attribute__ ((aligned(1 << 28))) = 20;
+
+/* { dg-final { scan-assembler "\.align\[\\t \]*268435456" } } */
diff --git a/gcc/testsuite/gcc.dg/pr39323-3.c b/gcc/testsuite/gcc.dg/pr39323-3.c
new file mode 100644
index 00000000000..cbfed9dbcef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39323-3.c
@@ -0,0 +1,7 @@
+/* PR c/39323 */
+/* { dg-do compile { target *-*-linux* } } */
+
+typedef int __attribute__ ((aligned(1 << 28))) int28;
+int28 foo = 20;
+
+/* { dg-final { scan-assembler "\.align\[\\t \]*268435456" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
index 4d7de84cbb5..740206153bd 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
@@ -53,7 +53,6 @@ void test(double d1, double d2, float f1, float f2,
if (LOG(BASE) != 1.0 || LOG##f(BASE##F) != 1.0F || LOG##l(BASE##L) != 1.0L) \
link_failure_##LOG##_N()
- LOG_N(log, M_E);
LOG_N(log2, 2.0);
LOG_N(log10, 10.0);
@@ -74,7 +73,6 @@ void test(double d1, double d2, float f1, float f2,
if (LOG(EXP(d1)) != d1*LOG(BASE) || LOG##f(EXP##f(f1)) != f1*LOG##f(BASE##F) \
|| LOG##l(EXP##l(ld1)) != ld1*LOG##l(BASE##L)) link_failure_##LOG##_##EXP()
- LOGEXP(log,exp,M_E);
LOGEXP(log,exp2,2.0);
LOGEXP(log,exp10,10.0);
LOGEXP(log,pow10,10.0);
diff --git a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
new file mode 100644
index 00000000000..dfe994b7a84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-fdump-tree-alias" } */
+/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
+
+volatile int i;
+int ** __attribute__((noinline,pure)) foo(int **p) { i; return p; }
+int bar(void)
+{
+ int i = 0, j = 1;
+ int *p, **q;
+ p = &i;
+ q = foo(&p);
+ *q = &j;
+ return *p;
+}
+extern void abort (void);
+int main()
+{
+ if (bar() != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "p.._., name memory tag: NMT..., is dereferenced, points-to vars: { i j }" "alias" } } */
+/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-1.c b/gcc/testsuite/gcc.target/i386/pr39315-1.c
new file mode 100644
index 00000000000..16ba5d59fe4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-1.c
@@ -0,0 +1,18 @@
+/* PR middle-end/39315 */
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler-not "movlps" } } */
+/* { dg-final { scan-assembler-not "movhps" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *);
+
+void
+foo (__m128 *x)
+{
+ __m128 b = *x;
+ bar (&b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-2.c b/gcc/testsuite/gcc.target/i386/pr39315-2.c
new file mode 100644
index 00000000000..ab3dcd0d24a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-2.c
@@ -0,0 +1,15 @@
+/* PR middle-end/39315 */
+/* { dg-do run } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-additional-sources pr39315-check.c } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *, int);
+
+void
+foo (__m128 *x)
+{
+ __m128 b = *x;
+ bar (&b, __alignof__ (x));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-3.c b/gcc/testsuite/gcc.target/i386/pr39315-3.c
new file mode 100644
index 00000000000..07862db603a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-3.c
@@ -0,0 +1,19 @@
+/* PR middle-end/39315 */
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler-not "movlps" } } */
+/* { dg-final { scan-assembler-not "movhps" } } */
+/* { dg-final { scan-assembler "and\[lq\]?\[\\t \]*\\$-128,\[\\t \]*%\[re\]?sp" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *);
+
+void
+foo (__m128 *x)
+{
+ __m128 b __attribute__ ((aligned(128))) = *x;
+ bar (&b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-4.c b/gcc/testsuite/gcc.target/i386/pr39315-4.c
new file mode 100644
index 00000000000..2e55c251b03
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-4.c
@@ -0,0 +1,15 @@
+/* PR middle-end/39315 */
+/* { dg-do run } */
+/* { dg-options "-O -msse2 -mtune=generic" } */
+/* { dg-additional-sources pr39315-check.c } */
+
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void bar (__m128 *, int);
+
+void
+foo (__m128 *x)
+{
+ __m128 b __attribute__ ((aligned(128))) = *x;
+ bar (&b, __alignof__ (x));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr39315-check.c b/gcc/testsuite/gcc.target/i386/pr39315-check.c
new file mode 100644
index 00000000000..ff926057536
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr39315-check.c
@@ -0,0 +1,22 @@
+typedef float __m128 __attribute__ ((__vector_size__ (16)));
+
+extern void foo (__m128 *);
+extern void abort (void);
+
+__m128 y = { 0.0, 1.0, 2.0, 3.0 };
+
+void
+bar (__m128 *x, int align)
+{
+ if ((((__PTRDIFF_TYPE__) x) & (align - 1)) != 0)
+ abort ();
+ if (__builtin_memcmp (x, &y, sizeof (y)) != 0)
+ abort ();
+}
+
+int
+main ()
+{
+ foo (&y);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/ia64/sync-1.c b/gcc/testsuite/gcc.target/ia64/sync-1.c
new file mode 100644
index 00000000000..95f6daeb997
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/sync-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "xchg4 .*, r0" } } */
+/* { dg-final { scan-assembler "cmpxchg4.*, r0, .*" } } */
+/* { dg-final { scan-assembler "cmpxchg8.*, r0, .*" } } */
+
+int
+foo1 (int *p)
+{
+ return __sync_lock_test_and_set (p, 0);
+}
+
+int
+foo2 (int *p, int v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
+
+long
+foo3 (long *p, long v)
+{
+ return __sync_bool_compare_and_swap (p, v, 0);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
new file mode 100644
index 00000000000..048da6e56ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
@@ -0,0 +1,27 @@
+/* Test for cross x86_64<->w64 abi standard calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-additional-sources "func-2b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+long double func_cross (long double, double, float, long, int, char);
+
+long double __attribute__ ((sysv_abi))
+func_native (long double a, double b, float c, long d, int e, char f)
+{
+ long double ret;
+ ret = a + (long double) b + (long double) c;
+ ret *= (long double) (d + (long) e);
+ if (f>0)
+ ret += func_native (a,b,c,d,e,-f);
+ return ret;
+}
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ if (func_cross (1.0,2.0,3.0,1,2,3)
+ != func_native (1.0,2.0,3.0,1,2,3))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c
new file mode 100644
index 00000000000..fe85dd1860d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2b.c
@@ -0,0 +1,13 @@
+/* Test for cross x86_64<->w64 abi standard calls. */
+/* { dg-options "-mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+
+long double func_cross (long double a, double b, float c, long d, int e,
+ char f)
+{
+ long double ret;
+ ret = a + (long double) b + (long double) c;
+ ret *= (long double) (d + (long) e);
+ if (f>0)
+ ret += func_cross (a,b,c,d,e,-f);
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
new file mode 100644
index 00000000000..730b8db9c1f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
@@ -0,0 +1,17 @@
+/* Test for cross x86_64<->w64 abi standard calls via variable. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+/* { dg-additional-sources "func-indirect-2b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+typedef int (*func)(void *, char *, char *, short, long long);
+extern func get_callback (void);
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ func callme = get_callback ();
+ if (callme (0, 0, 0, 0x1234, 0x1234567890abcdefLL))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c
new file mode 100644
index 00000000000..1a9fccd97f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2b.c
@@ -0,0 +1,24 @@
+/* Test for cross x86_64<->w64 abi standard calls via variable. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
+
+typedef int (*func)(void *, char *, char *, short, long long);
+
+static int
+callback (void *ptr, char *string1, char *string2, short number,
+ long long rand)
+{
+ if (ptr != 0
+ || string1 != 0
+ || string2 != 0
+ || number != 0x1234
+ || rand != 0x1234567890abcdefLL)
+ return 1;
+ else
+ return 0;
+}
+
+func
+get_callback (void)
+{
+ return callback;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
new file mode 100644
index 00000000000..a44470431ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
@@ -0,0 +1,24 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-additional-sources "vaarg-4b.c" } */
+
+extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
+extern int __attribute__ ((sysv_abi)) sprintf (char *,const char *, ...);
+extern void __attribute__ ((sysv_abi)) abort (void);
+
+extern void do_cpy (char *, ...);
+
+int __attribute__ ((sysv_abi))
+main ()
+{
+ char s[256];
+
+ do_cpy (s, "1","2","3","4", "5", "6", "7", "");
+
+ if (s[0] != '1' || s[1] !='2' || s[2] != '3' || s[3] != '4'
+ || s[4] != '5' || s[5] != '6' || s[6] != '7' || s[7] != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c
new file mode 100644
index 00000000000..f33906bd293
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4b.c
@@ -0,0 +1,31 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+
+#include <stdarg.h>
+
+extern __SIZE_TYPE__ __attribute__ ((sysv_abi)) strlen (const char *);
+extern int __attribute__ ((sysv_abi)) sprintf (char *, const char *, ...);
+
+static void
+vdo_cpy (char *s, va_list argp)
+{
+ __SIZE_TYPE__ len;
+ char *r = s;
+ char *e;
+ *r = 0;
+ for (;;) {
+ e = va_arg (argp, char *);
+ if (*e == 0) break;
+ sprintf (r,"%s", e);
+ r += strlen (r);
+ }
+}
+
+void
+do_cpy (char *s, ...)
+{
+ va_list argp;
+ va_start (argp, s);
+ vdo_cpy (s, argp);
+ va_end (argp);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
new file mode 100644
index 00000000000..e9912957e7c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
@@ -0,0 +1,17 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+/* { dg-additional-sources "vaarg-5b.c" } */
+
+extern void __attribute__ ((sysv_abi)) abort (void);
+extern int fct2 (int, ...);
+
+#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
+
+int __attribute__ ((sysv_abi))
+main()
+{
+ if (fct2 (-1, SZ_ARGS) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c
new file mode 100644
index 00000000000..e5dd4727bdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5b.c
@@ -0,0 +1,37 @@
+/* Test for cross x86_64<->w64 abi va_list calls. */
+/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
+
+#include <stdarg.h>
+
+#define SZ_ARGS 1ll,2ll,3ll,4ll,5ll,6ll,7ll,0ll
+
+static int __attribute__ ((sysv_abi))
+fct1 (va_list argp, ...)
+{
+ long long p1,p2;
+ int ret = 1;
+ __builtin_sysv_va_list argp_2;
+
+ __builtin_sysv_va_start (argp_2, argp);
+ do {
+ p1 = va_arg (argp_2, long long);
+ p2 = va_arg (argp, long long);
+ if (p1 != p2)
+ ret = 0;
+ } while (ret && p1 != 0);
+ __builtin_sysv_va_end (argp_2);
+
+ return ret;
+}
+
+int
+fct2 (int dummy, ...)
+{
+ va_list argp;
+ int ret = dummy;
+
+ va_start (argp, dummy);
+ ret += fct1 (argp, SZ_ARGS);
+ va_end (argp);
+ return ret;
+}
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 40829675b84..c5b9bd79e3a 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -1145,6 +1145,7 @@ tree force_gimple_operand (tree, gimple_seq *, bool, tree);
tree force_gimple_operand_gsi (gimple_stmt_iterator *, tree, bool, tree,
bool, enum gsi_iterator_update);
tree gimple_fold_indirect_ref (tree);
+void mark_addressable (tree);
/* In tree-ssa-structalias.c */
bool find_what_p_points_to (tree);
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c
index 15419c38a67..e6a2fb301eb 100644
--- a/gcc/tree-inline.c
+++ b/gcc/tree-inline.c
@@ -4268,6 +4268,29 @@ tree_versionable_function_p (tree fndecl)
return true;
}
+/* Create a new name for omp child function. Returns an identifier. */
+
+static GTY(()) unsigned int clone_fn_id_num;
+
+static tree
+clone_function_name (tree decl)
+{
+ tree name = DECL_ASSEMBLER_NAME (decl);
+ size_t len = IDENTIFIER_LENGTH (name);
+ char *tmp_name, *prefix;
+
+ prefix = XALLOCAVEC (char, len + strlen ("_clone") + 1);
+ memcpy (prefix, IDENTIFIER_POINTER (name), len);
+ strcpy (prefix + len, "_clone");
+#ifndef NO_DOT_IN_LABEL
+ prefix[len] = '.';
+#elif !defined NO_DOLLAR_IN_LABEL
+ prefix[len] = '$';
+#endif
+ ASM_FORMAT_PRIVATE_NAME (tmp_name, prefix, clone_fn_id_num++);
+ return get_identifier (tmp_name);
+}
+
/* Create a copy of a function's tree.
OLD_DECL and NEW_DECL are FUNCTION_DECL tree nodes
of the original function and the new copied function
@@ -4315,7 +4338,7 @@ tree_function_versioning (tree old_decl, tree new_decl, varray_type tree_map,
/* Generate a new name for the new version. */
if (!update_clones)
{
- DECL_NAME (new_decl) = create_tmp_var_name (NULL);
+ DECL_NAME (new_decl) = clone_function_name (old_decl);
SET_DECL_ASSEMBLER_NAME (new_decl, DECL_NAME (new_decl));
SET_DECL_RTL (new_decl, NULL_RTX);
id.statements_to_fold = pointer_set_create ();
@@ -4520,3 +4543,5 @@ tree_can_inline_p (tree caller, tree callee)
/* Allow the backend to decide if inlining is ok. */
return targetm.target_option.can_inline_p (caller, callee);
}
+
+#include "gt-tree-inline.h"
diff --git a/gcc/tree-ssa-loop-manip.c b/gcc/tree-ssa-loop-manip.c
index 7ebe680871d..c1514bf25f8 100644
--- a/gcc/tree-ssa-loop-manip.c
+++ b/gcc/tree-ssa-loop-manip.c
@@ -99,6 +99,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
}
if (POINTER_TYPE_P (TREE_TYPE (base)))
{
+ if (TREE_CODE (base) == ADDR_EXPR)
+ mark_addressable (TREE_OPERAND (base, 0));
step = fold_convert (sizetype, step);
if (incr_op == MINUS_EXPR)
step = fold_build1 (NEGATE_EXPR, sizetype, step);
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c
index 384fe1867cd..32e25a2455e 100644
--- a/gcc/tree-ssa-structalias.c
+++ b/gcc/tree-ssa-structalias.c
@@ -1592,12 +1592,9 @@ do_sd_constraint (constraint_graph_t graph, constraint_t c,
if (get_varinfo (t)->is_special_var)
flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
/* Merging the solution from ESCAPED needlessly increases
- the set. Use ESCAPED as representative instead.
- Same for CALLUSED. */
+ the set. Use ESCAPED as representative instead. */
else if (get_varinfo (t)->id == find (escaped_id))
flag |= bitmap_set_bit (sol, escaped_id);
- else if (get_varinfo (t)->id == find (callused_id))
- flag |= bitmap_set_bit (sol, callused_id);
else if (add_graph_edge (graph, lhs, t))
flag |= bitmap_ior_into (sol, get_varinfo (t)->solution);
}
@@ -2516,9 +2513,8 @@ solve_graph (constraint_graph_t graph)
solution_empty = bitmap_empty_p (solution);
if (!solution_empty
- /* Do not propagate the ESCAPED/CALLUSED solutions. */
- && i != find (escaped_id)
- && i != find (callused_id))
+ /* Do not propagate the ESCAPED solutions. */
+ && i != find (escaped_id))
{
bitmap_iterator bi;
@@ -3488,8 +3484,9 @@ make_escape_constraint (tree op)
RHS. */
static void
-handle_rhs_call (gimple stmt)
+handle_rhs_call (gimple stmt, VEC(ce_s, heap) **results)
{
+ struct constraint_expr rhsc;
unsigned i;
for (i = 0; i < gimple_call_num_args (stmt); ++i)
@@ -3505,6 +3502,12 @@ handle_rhs_call (gimple stmt)
/* The static chain escapes as well. */
if (gimple_call_chain (stmt))
make_escape_constraint (gimple_call_chain (stmt));
+
+ /* Regular functions return escaped addresses. */
+ rhsc.var = escaped_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* For non-IPA mode, generate constraints necessary for a call
@@ -3512,10 +3515,9 @@ handle_rhs_call (gimple stmt)
the LHS point to global and escaped variables. */
static void
-handle_lhs_call (tree lhs, int flags)
+handle_lhs_call (tree lhs, int flags, VEC(ce_s, heap) *rhsc)
{
VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
unsigned int j;
struct constraint_expr *lhsp;
@@ -3523,6 +3525,7 @@ handle_lhs_call (tree lhs, int flags)
if (flags & ECF_MALLOC)
{
+ struct constraint_expr rhsc;
tree heapvar = heapvar_lookup (lhs);
varinfo_t vi;
@@ -3546,15 +3549,30 @@ handle_lhs_call (tree lhs, int flags)
vi->size = ~0;
rhsc.type = ADDRESSOF;
rhsc.offset = 0;
+ for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
+ process_constraint (new_constraint (*lhsp, rhsc));
}
- else
+ else if (VEC_length (ce_s, rhsc) > 0)
{
- rhsc.var = escaped_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
+ struct constraint_expr *lhsp, *rhsp;
+ unsigned int i, j;
+ /* If the store is to a global decl make sure to
+ add proper escape constraints. */
+ lhs = get_base_address (lhs);
+ if (lhs
+ && DECL_P (lhs)
+ && is_global_var (lhs))
+ {
+ struct constraint_expr tmpc;
+ tmpc.var = escaped_id;
+ tmpc.offset = 0;
+ tmpc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, lhsc, &tmpc);
+ }
+ for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i)
+ for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); ++j)
+ process_constraint (new_constraint (*lhsp, *rhsp));
}
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
VEC_free (ce_s, heap, lhsc);
}
@@ -3562,43 +3580,23 @@ handle_lhs_call (tree lhs, int flags)
const function that returns a pointer in the statement STMT. */
static void
-handle_const_call (gimple stmt)
+handle_const_call (gimple stmt, VEC(ce_s, heap) **results)
{
- tree lhs = gimple_call_lhs (stmt);
- VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
- unsigned int j, k;
- struct constraint_expr *lhsp;
- tree tmpvar;
- struct constraint_expr tmpc;
+ struct constraint_expr rhsc, tmpc;
+ tree tmpvar = NULL_TREE;
+ unsigned int k;
- get_constraint_for (lhs, &lhsc);
-
- /* If this is a nested function then it can return anything. */
+ /* Treat nested const functions the same as pure functions as far
+ as the static chain is concerned. */
if (gimple_call_chain (stmt))
{
- rhsc.var = anything_id;
+ make_constraint_to (callused_id, gimple_call_chain (stmt));
+ rhsc.var = callused_id;
rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
- return;
+ rhsc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
- /* We always use a temporary here, otherwise we end up with a quadratic
- amount of constraints for
- large_struct = const_call (large_struct);
- in field-sensitive PTA. */
- tmpvar = create_tmp_var_raw (ptr_type_node, "consttmp");
- tmpc = get_constraint_exp_for_temp (tmpvar);
-
- /* May return addresses of globals. */
- rhsc.var = nonlocal_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- process_constraint (new_constraint (tmpc, rhsc));
-
/* May return arguments. */
for (k = 0; k < gimple_call_num_args (stmt); ++k)
{
@@ -3610,26 +3608,41 @@ handle_const_call (gimple stmt)
struct constraint_expr *argp;
int i;
+ /* We always use a temporary here, otherwise we end up with
+ a quadratic amount of constraints for
+ large_struct = const_call (large_struct);
+ with field-sensitive PTA. */
+ if (tmpvar == NULL_TREE)
+ {
+ tmpvar = create_tmp_var_raw (ptr_type_node, "consttmp");
+ tmpc = get_constraint_exp_for_temp (tmpvar);
+ }
+
get_constraint_for (arg, &argc);
for (i = 0; VEC_iterate (ce_s, argc, i, argp); i++)
process_constraint (new_constraint (tmpc, *argp));
VEC_free (ce_s, heap, argc);
}
}
+ if (tmpvar != NULL_TREE)
+ VEC_safe_push (ce_s, heap, *results, &tmpc);
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, tmpc));
-
- VEC_free (ce_s, heap, lhsc);
+ /* May return addresses of globals. */
+ rhsc.var = nonlocal_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* For non-IPA mode, generate constraints necessary for a call to a
pure function in statement STMT. */
static void
-handle_pure_call (gimple stmt)
+handle_pure_call (gimple stmt, VEC(ce_s, heap) **results)
{
+ struct constraint_expr rhsc;
unsigned i;
+ bool need_callused = false;
/* Memory reached from pointer arguments is call-used. */
for (i = 0; i < gimple_call_num_args (stmt); ++i)
@@ -3637,48 +3650,31 @@ handle_pure_call (gimple stmt)
tree arg = gimple_call_arg (stmt, i);
if (could_have_pointers (arg))
- make_constraint_to (callused_id, arg);
+ {
+ make_constraint_to (callused_id, arg);
+ need_callused = true;
+ }
}
/* The static chain is used as well. */
if (gimple_call_chain (stmt))
- make_constraint_to (callused_id, gimple_call_chain (stmt));
-
- /* If the call returns a pointer it may point to reachable memory
- from the arguments. Not so for malloc functions though. */
- if (gimple_call_lhs (stmt)
- && could_have_pointers (gimple_call_lhs (stmt))
- && !(gimple_call_flags (stmt) & ECF_MALLOC))
{
- tree lhs = gimple_call_lhs (stmt);
- VEC(ce_s, heap) *lhsc = NULL;
- struct constraint_expr rhsc;
- struct constraint_expr *lhsp;
- unsigned j;
-
- get_constraint_for (lhs, &lhsc);
-
- /* If this is a nested function then it can return anything. */
- if (gimple_call_chain (stmt))
- {
- rhsc.var = anything_id;
- rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
- return;
- }
+ make_constraint_to (callused_id, gimple_call_chain (stmt));
+ need_callused = true;
+ }
- /* Else just add the call-used memory here. Escaped variables
- and globals will be dealt with in handle_lhs_call. */
+ /* Pure functions may return callused and escaped memory. */
+ if (need_callused)
+ {
rhsc.var = callused_id;
rhsc.offset = 0;
- rhsc.type = ADDRESSOF;
- for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++)
- process_constraint (new_constraint (*lhsp, rhsc));
- VEC_free (ce_s, heap, lhsc);
+ rhsc.type = SCALAR;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
+ rhsc.var = escaped_id;
+ rhsc.offset = 0;
+ rhsc.type = ADDRESSOF;
+ VEC_safe_push (ce_s, heap, *results, &rhsc);
}
/* Walk statement T setting up aliasing constraints according to the
@@ -3743,33 +3739,28 @@ find_func_aliases (gimple origt)
{
if (!in_ipa_mode)
{
+ VEC(ce_s, heap) *rhsc = NULL;
int flags = gimple_call_flags (t);
/* Const functions can return their arguments and addresses
of global memory but not of escaped memory. */
- if (flags & ECF_CONST)
+ if (flags & (ECF_CONST|ECF_NOVOPS))
{
if (gimple_call_lhs (t)
&& could_have_pointers (gimple_call_lhs (t)))
- handle_const_call (t);
+ handle_const_call (t, &rhsc);
}
/* Pure functions can return addresses in and of memory
reachable from their arguments, but they are not an escape
point for reachable memory of their arguments. */
- else if (flags & ECF_PURE)
- {
- handle_pure_call (t);
- if (gimple_call_lhs (t)
- && could_have_pointers (gimple_call_lhs (t)))
- handle_lhs_call (gimple_call_lhs (t), flags);
- }
+ else if (flags & (ECF_PURE|ECF_LOOPING_CONST_OR_PURE))
+ handle_pure_call (t, &rhsc);
else
- {
- handle_rhs_call (t);
- if (gimple_call_lhs (t)
- && could_have_pointers (gimple_call_lhs (t)))
- handle_lhs_call (gimple_call_lhs (t), flags);
- }
+ handle_rhs_call (t, &rhsc);
+ if (gimple_call_lhs (t)
+ && could_have_pointers (gimple_call_lhs (t)))
+ handle_lhs_call (gimple_call_lhs (t), flags, rhsc);
+ VEC_free (ce_s, heap, rhsc);
}
else
{
@@ -4925,9 +4916,10 @@ find_what_p_points_to (tree p)
pi->pt_null = 1;
else if (vi->id == anything_id
|| vi->id == nonlocal_id
- || vi->id == escaped_id
- || vi->id == callused_id)
+ || vi->id == escaped_id)
was_pt_anything = 1;
+ else if (vi->id == callused_id)
+ gcc_unreachable ();
else if (vi->id == readonly_id)
was_pt_anything = 1;
else if (vi->id == integer_id)
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 8be2961f895..ee3df246dea 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -478,6 +478,21 @@ verify_phi_args (gimple phi, basic_block bb, basic_block *definition_block)
op_p, phi, e->flags & EDGE_ABNORMAL, NULL);
}
+ if (TREE_CODE (op) == ADDR_EXPR)
+ {
+ tree base = TREE_OPERAND (op, 0);
+ while (handled_component_p (base))
+ base = TREE_OPERAND (base, 0);
+ if ((TREE_CODE (base) == VAR_DECL
+ || TREE_CODE (base) == PARM_DECL
+ || TREE_CODE (base) == RESULT_DECL)
+ && !TREE_ADDRESSABLE (base))
+ {
+ error ("address taken, but ADDRESSABLE bit not set");
+ err = true;
+ }
+ }
+
if (e->dest != bb)
{
error ("wrong edge %d->%d for PHI argument",
diff --git a/gcc/tree.h b/gcc/tree.h
index e1c52e135b3..51fd7ec0c71 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2726,10 +2726,9 @@ struct tree_decl_common GTY(())
unsigned gimple_reg_flag : 1;
/* In a DECL with pointer type, set if no TBAA should be done. */
unsigned no_tbaa_flag : 1;
- /* Padding so that 'align' can be on a 32-bit boundary. */
+ /* Padding so that 'off_align' can be on a 32-bit boundary. */
unsigned decl_common_unused : 2;
- unsigned int align : 24;
/* DECL_OFFSET_ALIGN, used only for FIELD_DECLs. */
unsigned int off_align : 8;
@@ -2738,6 +2737,9 @@ struct tree_decl_common GTY(())
tree attributes;
tree abstract_origin;
+ /* DECL_ALIGN. It should have the same size as TYPE_ALIGN. */
+ unsigned int align;
+
alias_set_type pointer_alias_set;
/* Points to a structure whose details depend on the language in use. */
struct lang_decl *lang_specific;
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index a15a86005ff..141246a1248 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,13 @@
+2008-03-27 Ian Lance Taylor <iant@google.com>
+
+ * memmem.c: New file, from gnulib.
+ * configure.ac: Add memmem to list of functions provided if they
+ are not available on the host.
+ * Makefile.in: Rebuild dependencies.
+ (CFILES): Add memmem.c.
+ (CONFIGURED_OFILES): Add memmem.o.
+ * configure, config.in, functions.texi: Rebuild.
+
2009-03-23 Jason Merrill <jason@redhat.com>
* cp-demangle.c (d_expression): Handle pack expansion.
diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in
index 41a71f5ea32..29068ea8763 100644
--- a/libiberty/Makefile.in
+++ b/libiberty/Makefile.in
@@ -135,8 +135,8 @@ CFILES = alloca.c argv.c asprintf.c atexit.c \
lbasename.c \
lrealpath.c \
make-relative-prefix.c \
- make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmove.c \
- mempcpy.c memset.c mkstemps.c \
+ make-temp-file.c md5.c memchr.c memcmp.c memcpy.c memmem.c \
+ memmove.c mempcpy.c memset.c mkstemps.c \
objalloc.c obstack.c \
partition.c pexecute.c \
pex-common.c pex-djgpp.c pex-msdos.c pex-one.c \
@@ -187,8 +187,8 @@ CONFIGURED_OFILES = ./asprintf.o ./atexit.o \
./ffs.o \
./getcwd.o ./getpagesize.o ./gettimeofday.o \
./index.o ./insque.o \
- ./memchr.o ./memcmp.o ./memcpy.o ./memmove.o ./mempcpy.o \
- ./memset.o ./mkstemps.o \
+ ./memchr.o ./memcmp.o ./memcpy.o ./memmem.o ./memmove.o \
+ ./mempcpy.o ./memset.o ./mkstemps.o \
./pex-djgpp.o ./pex-msdos.o \
./pex-unix.o ./pex-win32.o \
./putenv.o \
@@ -798,6 +798,12 @@ $(CONFIGURED_OFILES): stamp-picdir
else true; fi
$(COMPILE.c) $(srcdir)/memcpy.c $(OUTPUT_OPTION)
+./memmem.o: $(srcdir)/memmem.c config.h
+ if [ x"$(PICFLAG)" != x ]; then \
+ $(COMPILE.c) $(PICFLAG) $(srcdir)/memmem.c -o pic/$@; \
+ else true; fi
+ $(COMPILE.c) $(srcdir)/memmem.c $(OUTPUT_OPTION)
+
./memmove.o: $(srcdir)/memmove.c $(INCDIR)/ansidecl.h
if [ x"$(PICFLAG)" != x ]; then \
$(COMPILE.c) $(PICFLAG) $(srcdir)/memmove.c -o pic/$@; \
diff --git a/libiberty/config.in b/libiberty/config.in
index 9260d560a6e..d34320c717d 100644
--- a/libiberty/config.in
+++ b/libiberty/config.in
@@ -139,6 +139,9 @@
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
+/* Define to 1 if you have the `memmem' function. */
+#undef HAVE_MEMMEM
+
/* Define to 1 if you have the `memmove' function. */
#undef HAVE_MEMMOVE
diff --git a/libiberty/configure b/libiberty/configure
index 4469808cdec..4d0aeae4e5c 100755
--- a/libiberty/configure
+++ b/libiberty/configure
@@ -5420,6 +5420,7 @@ funcs="$funcs insque"
funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
+funcs="$funcs memmem"
funcs="$funcs memmove"
funcs="$funcs mempcpy"
funcs="$funcs memset"
@@ -5532,9 +5533,10 @@ if test "x" = "y"; then
+
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
- memmove mempcpy memset putenv random rename rindex sigsetmask \
+ memmem memmove mempcpy memset putenv random rename rindex sigsetmask \
strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
diff --git a/libiberty/configure.ac b/libiberty/configure.ac
index 00fce384818..7d167c35a8a 100644
--- a/libiberty/configure.ac
+++ b/libiberty/configure.ac
@@ -317,6 +317,7 @@ funcs="$funcs insque"
funcs="$funcs memchr"
funcs="$funcs memcmp"
funcs="$funcs memcpy"
+funcs="$funcs memmem"
funcs="$funcs memmove"
funcs="$funcs mempcpy"
funcs="$funcs memset"
@@ -362,7 +363,7 @@ checkfuncs="$checkfuncs getsysinfo table sysctl wait3 wait4 __fsetlocking"
if test "x" = "y"; then
AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock \
getcwd getpagesize gettimeofday index insque mkstemps memchr memcmp memcpy \
- memmove mempcpy memset putenv random rename rindex sigsetmask \
+ memmem memmove mempcpy memset putenv random rename rindex sigsetmask \
strcasecmp setenv stpcpy stpncpy strchr strdup strncasecmp strndup strrchr strstr \
strtod strtol strtoul strverscmp tmpnam vasprintf vfprintf vprintf \
vsprintf waitpid getrusage on_exit psignal strerror strsignal \
diff --git a/libiberty/functions.texi b/libiberty/functions.texi
index 34566d8f17a..da9a3202235 100644
--- a/libiberty/functions.texi
+++ b/libiberty/functions.texi
@@ -158,7 +158,7 @@ not recommended.
@end deftypefn
-@c make-temp-file.c:87
+@c make-temp-file.c:95
@deftypefn Replacement char* choose_tmpdir ()
Returns a pointer to a directory path suitable for creating temporary
@@ -602,7 +602,7 @@ relative prefix can be found, return @code{NULL}.
@end deftypefn
-@c make-temp-file.c:137
+@c make-temp-file.c:163
@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
Return a temporary file name (as a string) or @code{NULL} if unable to
@@ -643,6 +643,15 @@ Copies @var{length} bytes from memory region @var{in} to region
@end deftypefn
+@c memmem.c:20
+@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len})
+
+Returns a pointer to the first occurrence of @var{needle} (length
+@var{needle_len}) in @var{haystack} (length @var{haystack_len}).
+Returns @code{NULL} if not found.
+
+@end deftypefn
+
@c memmove.c:6
@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
diff --git a/libiberty/memmem.c b/libiberty/memmem.c
new file mode 100644
index 00000000000..5d755992b76
--- /dev/null
+++ b/libiberty/memmem.c
@@ -0,0 +1,70 @@
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004,2007 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+
+@deftypefn Supplemental void* memmem (const void *@var{haystack}, size_t @var{haystack_len} const void *@var{needle}, size_t @var{needle_len})
+
+Returns a pointer to the first occurrence of @var{needle} (length
+@var{needle_len}) in @var{haystack} (length @var{haystack_len}).
+Returns @code{NULL} if not found.
+
+@end deftypefn
+
+*/
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <string.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#undef memmem
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+void *
+memmem (const void *haystack, size_t haystack_len, const void *needle,
+ size_t needle_len)
+{
+ const char *begin;
+ const char *const last_possible
+ = (const char *) haystack + haystack_len - needle_len;
+
+ if (needle_len == 0)
+ /* The first occurrence of the empty string is deemed to occur at
+ the beginning of the string. */
+ return (void *) haystack;
+
+ /* Sanity check, otherwise the loop might search through the whole
+ memory. */
+ if (__builtin_expect (haystack_len < needle_len, 0))
+ return NULL;
+
+ for (begin = (const char *) haystack; begin <= last_possible; ++begin)
+ if (begin[0] == ((const char *) needle)[0] &&
+ !memcmp ((const void *) &begin[1],
+ (const void *) ((const char *) needle + 1),
+ needle_len - 1))
+ return (void *) begin;
+
+ return NULL;
+}
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 23d43c1349e..0c51edb7aaf 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,8 @@
+2009-03-27 Ian Lance Taylor <iant@google.com>
+
+ * include/backward/hashtable.h (_S_num_primes): Change to 29.
+ (__stl_prime_list): Add 5 at the start of the list.
+
2009-03-25 Edward Smith-Rowland <3dw4rd@verizon.net>
* include/std/fstream (basic_filebuf<>::open(const std::string&,
diff --git a/libstdc++-v3/include/backward/hashtable.h b/libstdc++-v3/include/backward/hashtable.h
index 62bc5bc5193..c0981ee8565 100644
--- a/libstdc++-v3/include/backward/hashtable.h
+++ b/libstdc++-v3/include/backward/hashtable.h
@@ -210,16 +210,16 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
};
// Note: assumes long is at least 32 bits.
- enum { _S_num_primes = 28 };
+ enum { _S_num_primes = 29 };
static const unsigned long __stl_prime_list[_S_num_primes] =
{
- 53ul, 97ul, 193ul, 389ul, 769ul,
- 1543ul, 3079ul, 6151ul, 12289ul, 24593ul,
- 49157ul, 98317ul, 196613ul, 393241ul, 786433ul,
- 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul,
- 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,
- 1610612741ul, 3221225473ul, 4294967291ul
+ 5ul, 53ul, 97ul, 193ul, 389ul,
+ 769ul, 1543ul, 3079ul, 6151ul, 12289ul,
+ 24593ul, 49157ul, 98317ul, 196613ul, 393241ul,
+ 786433ul, 1572869ul, 3145739ul, 6291469ul, 12582917ul,
+ 25165843ul, 50331653ul, 100663319ul, 201326611ul, 402653189ul,
+ 805306457ul, 1610612741ul, 3221225473ul, 4294967291ul
};
inline unsigned long
diff --git a/maintainer-scripts/ChangeLog b/maintainer-scripts/ChangeLog
index fa171a8fddb..30856c7ff0a 100644
--- a/maintainer-scripts/ChangeLog
+++ b/maintainer-scripts/ChangeLog
@@ -1,3 +1,7 @@
+2009-03-27 Mark Mitchell <mark@codesourcery.com>
+
+ * crontab: Add 4.4 branch snapshots.
+
2009-02-21 Gerald Pfeifer <gerald@pfeifer.com>
* update_version_svn (ADD_BRANCHES): Remove autovect-branch
diff --git a/maintainer-scripts/crontab b/maintainer-scripts/crontab
index 091c24d8249..49862e7ee41 100644
--- a/maintainer-scripts/crontab
+++ b/maintainer-scripts/crontab
@@ -3,4 +3,5 @@
55 0 * * * sh /home/gccadmin/scripts/update_web_docs_libstdcxx_svn
32 22 * * 3 sh /home/gccadmin/scripts/gcc_release -s 4.2:branches/gcc-4_2-branch -l -d /sourceware/snapshot-tmp/gcc all
32 22 * * 4 sh /home/gccadmin/scripts/gcc_release -s 4.3:branches/gcc-4_3-branch -l -d /sourceware/snapshot-tmp/gcc all
-32 22 * * 5 sh /home/gccadmin/scripts/gcc_release -s 4.4:trunk -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 5 sh /home/gccadmin/scripts/gcc_release -s 4.4:branches/gcc-4_4-branch -l -d /sourceware/snapshot-tmp/gcc all
+32 22 * * 6 sh /home/gccadmin/scripts/gcc_release -s 4.5:trunk -l -d /sourceware/snapshot-tmp/gcc all