Jan Hubicka [Wed, 9 Jan 2008 19:19:40 +0000 (20:19 +0100)]
re PR tree-optimization/34708 (Inlining heuristics issue)
PR tree-optimization/34708
* tree-inline.c (estimate_num_insns_1): Compute cost of SWITCH_EXPR
based on number of case labels.
(init_inline_once): Remove switch_cost.
* tree-inline.h (eni_weights_d): Remove switch_cost.
re PR fortran/34706 (FE should reuse array temporaries, reduce temporaties and tell ME the array-size type)
2008-01-08 Richard Guenther <rguenther@suse.de>
PR fortran/34706
PR tree-optimization/34683
* trans-types.c (gfc_get_array_type_bounds): Use an array type
with known size for accesses if that is known.
Paolo Carlini [Tue, 8 Jan 2008 18:16:06 +0000 (18:16 +0000)]
user_facet_hierarchies.cc: Do not include <cassert>.
2008-01-08 Paolo Carlini <pcarlini@suse.de>
* testsuite/22_locale/global_templates/user_facet_hierarchies.cc: Do
not include <cassert>.
* testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
Likewise.
* testsuite/util/testsuite_common_types.h: Include <algorithm>.
re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic behavior)
2008-01-08 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34683
* tree-ssa-operands.c (operand_build_cmp): Export.
* tree-ssa-operands.h (operand_build_cmp): Declare.
* tree-vn.c (vuses_compare): Remove.
(sort_vuses): Use operand_build_cmp.
(sort_vuses_heap): Likewise.
* tree-ssa-sccvn.c (vuses_to_vec): Use VEC_reserve, not VEC_alloc
to re-use old VEC if available. Do not sort already sorted VUSEs.
(vdefs_to_vec): Do not sort already sorted VDEFs.
Paul Thomas [Tue, 8 Jan 2008 15:14:33 +0000 (15:14 +0000)]
re PR fortran/34476 (Parameters: Bogus out of bounds error in array constructor)
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34476
* expr.c (find_array_element): Check that the array bounds are
constant before using them. Use lower, as well as upper bound.
(check_restricted): Allow implied index variable.
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34476
* gfortran.dg/parameter_array_init_3.f90: New test.
Paul Thomas [Tue, 8 Jan 2008 15:12:34 +0000 (15:12 +0000)]
re PR fortran/34681 (SAVEd derived type with allocatable components causes ICE)
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34681
* trans_array.c (gfc_trans_deferred_array): Do not null the
data pointer on entering scope, nor deallocate it on leaving
scope, if the symbol has the 'save' attribute.
PR fortran/34704
* trans_decl.c (gfc_finish_var_decl): Derived types with
allocatable components and an initializer must be TREE_STATIC.
2008-01-08 Paul Thomas <pault@gcc.gnu.org>
PR fortran/34681
PR fortran/34704
* gfortran.dg/alloc_comp_default_init_1.f90: New test.
Uros Bizjak [Mon, 7 Jan 2008 20:06:34 +0000 (21:06 +0100)]
re PR target/34682 (70% slowdown with SSE enabled)
PR target/34682
* config/i386/i386.md (neg<mode>2): Rename from negsf2, negdf2 and
negxf2. Macroize expander using X87MODEF mode iterator. Change
predicates of op0 and op1 to register_operand.
(abs<mode>2): Rename from abssf2, absdf2 and negxf2. Macroize expander
using X87MODEF mode iterator. Change predicates of op0 and op1 to
register_operand.
("*absneg<mode>2_mixed", "*absneg<mode>2_sse"): Rename from
corresponding patterns and macroize using MODEF macro. Change
predicates of op0 and op1 to register_operand and remove
"m" constraint. Disparage "r" alternative with "!".
("*absneg<mode>2_i387"): Rename from corresponding patterns and
macroize using X87MODEF macro. Change predicates of op0 and op1
to register_operand and remove "m" constraint. Disparage "r"
alternative with "!".
(absneg splitter with memory operands): Remove.
("*neg<mode>2_1", "*abs<mode>2_1"): Rename from corresponding
patterns and macroize using X87MODEF mode iterator.
* config/i386/sse.md (negv4sf2, absv4sf2, neg2vdf2, absv2df2):
Change predicate of op1 to register_operand.
* config/i386/i386.c (ix86_expand_fp_absneg_operator): Remove support
for memory operands.
Fred Fish [Mon, 7 Jan 2008 17:23:40 +0000 (17:23 +0000)]
re PR preprocessor/30363 (Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3)
libcpp
2008-01-07 Fred Fish <fnf@specifix.com>
PR preprocessor/30363:
* traditional.c (replace_args_and_push): Add local variable
cxtquote, calculate the replacement text size assuming a
worst case of every input character quoted with backslash,
and properly handle output quoting of quote characters in
actual arguments used in function-like macros.
gcc/testsuite
2008-01-07 Fred Fish <fnf@specifix.com>
PR preprocessor/30363:
* gcc.dg/cpp/trad/macroargs.c: Add code to test quoting in
macro expansions.
re PR tree-optimization/34683 (SSA rewriting in the loop unroller causes quadratic behavior)
2008-01-07 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34683
* tree-ssa-sccvn.c (vuses_to_vec): Pre-allocate the vector of
VOPs of the needed size to save memory. Use VEC_quick_push
to save compile-time.
(vdefs_to_vec): Likewise.
Paolo Carlini [Mon, 7 Jan 2008 11:11:02 +0000 (11:11 +0000)]
re PR libstdc++/34680 (Unconditional use of dynamic_cast in locale_facets.tcc breaks compilation with -fno-rtti)
2008-01-07 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/34680
* include/bits/locale_classes.h (has_facet<>, use_facet<>): Do not
use dynamic_cast when run-time type identification is disabled; do
not mark inline; only declare, define...
* include/bits/locale_classes.tcc: ... here.
Jerry DeLisle [Sun, 6 Jan 2008 18:19:06 +0000 (18:19 +0000)]
re PR fortran/34387 (FAIL: gfortran.dg/optional_dim_2.f90: FE vs library argument missmatch)
2008-01-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/34387
* trans-expr.c (gfc_conv_missing_dummy): Use a temporary to type convert
the dummy variable expression, test for NULL, and pass the variable
address to the called function.
Tobias Burnus [Sun, 6 Jan 2008 18:17:14 +0000 (19:17 +0100)]
re PR fortran/34658 (save / common)
2007-01-06 Tobias Burnus <burnus@net-b.de>
PR fortran/34658
* match.c (gfc_match_common): Remove blank common in
DATA BLOCK warning.
* resolve.c (resolve_common_vars): New function.
(resolve_common_blocks): Move checks to resolve_common_vars
and invoke that function.
(resolve_types): Call resolve_common_vars for blank commons.
2007-01-06 Tobias Burnus <burnus@net-b.de>
PR fortran/34658
* gfortran.dg/common_11.f90: New.
* gfortran.dg/blockdata_1.f90: Update test case.
* gfortran.dg/blockdata_2.f90: Update test case.
Andreas Tobler [Sat, 5 Jan 2008 20:49:41 +0000 (20:49 +0000)]
re PR testsuite/32843 (libffi.call/return_sc.c)
2008-01-05 Andreas Tobler <a.tobler@schweiz.org>
PR testsuite/32843
* src/x86/ffi.c (ffi_prep_cif_machdep): Add code for
signed/unsigned int8/16 for X86_DARWIN.
Updated copyright info.
Handle one and two byte structs with special cif->flags.
* src/x86/ffitarget.h: Add special types for one and two byte structs.
Updated copyright info.
* src/x86/darwin.S (ffi_call_SYSV): Rewrite to use a jump table like
sysv.S
Remove code to pop args from the stack after call.
Special-case signed/unsigned for int8/16, one and two byte structs.
(ffi_closure_raw_SYSV): Handle FFI_TYPE_UINT8,
FFI_TYPE_SINT8, FFI_TYPE_UINT16, FFI_TYPE_SINT16, FFI_TYPE_UINT32,
FFI_TYPE_SINT32.
Updated copyright info.
Aldy Hernandez [Fri, 4 Jan 2008 14:49:28 +0000 (14:49 +0000)]
re PR tree-optimization/34448 (ICE in declare_inline_vars, at tree-inline.c:3243)
PR tree-optimization/34448
PR tree-optimization/34465
* gimplify.c (gimplify_init_constructor): Add new parameter
notify_temp_creation. Use it.
(gimplify_modify_expr_rhs): Take volatiles into account when
optimizing constructors.
Do not optimize constructors if gimplify_init_constructor will dump to
memory.
* gcc.dg/tree-ssa/pr32901.c: Tests const volatiles.
* gcc.c-torture/compile/pr34448.c: New.
Jan Hubicka [Thu, 3 Jan 2008 21:23:26 +0000 (22:23 +0100)]
re PR tree-optimization/31081 (Inliner messes up SSA for abnormals)
PR tree-optimization/31081
* tree-inline.c (remap_ssa_name): Initialize uninitialized SSA vars to
0 when inlining and not inlining to first basic block.
(remap_decl): When var is initialized to 0, don't set default_def.
(expand_call_inline): Set entry_bb.
* tree-inline.h (copy_body_data): Add entry_bb.
Thomas Koenig [Thu, 3 Jan 2008 19:49:38 +0000 (19:49 +0000)]
re PR fortran/34565 (internal write to string array fails)
2008-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34565
* io/io.h: Adjust protoypes for open_internal(),
next_array_record() and init_loop_spec().
* io/list_read.c (next_char): Use argument "finished"
of next_array_record to check for end on internal file.
* io/unit.c: Calculate the offset for an array
internal file and supply this informatin to open_internal().
* io/unix.c (open_internal): Set the offset for the internal
file on open.
* io/transfer.c (init_loop_spec): Calculate the starting
record in case of negative strides. Return size of 0 for
an empty array.
(next_array_record): Use an extra flag to signal that the
array is finished.
(next_record_r): Use the new flag to next_array_record().
(next_record_w): Likewise.
2008-01-03 Thomas Koenig <tkoenig@gcc.gnu.org>
PR libfortran/34565
* gfortran.dg/internal_readwrite_1.f90: New test.
* gfortran.dg/internal_readwrite_2.f90: New test.
Jakub Jelinek [Thu, 3 Jan 2008 08:33:57 +0000 (09:33 +0100)]
re PR tree-optimization/29484 (tree-inline.c bug with local static vars)
PR tree-optimization/29484
* tree-inline.c (inline_forbidden_p_2): New function.
(inline_forbidden_p): Disallow inlining if some static var
has an address of a local LABEL_DECL in its initializer.
* doc/extend.texi (Labels as Values): Document &&foo behaviour
vs. inlining.
* gcc.c-torture/execute/20071220-1.c: New test.
* gcc.c-torture/execute/20071220-2.c: New test.