Ian Lance Taylor [Wed, 10 Jun 2009 02:01:06 +0000 (02:01 +0000)]
system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if compiling with C++.
* system.h (HAVE_DESIGNATED_INITIALIZERS): Don't define if
compiling with C++.
* optabs.c (optab_table): Only use designated initializers if
HAVE_DESIGNATED_INITIALIZERS is defined.
(convert_optab_table): Likewise.
(init_optabs): Always call init_insn_codes if
HAVE_DESIGNATED_INITIALIZERS is not defined.
* inclhack.def (darwin_stdint_1, darwin_stdint_2,
darwin_stdint_3, darwin_stdint_4): New fixes.
* tests/base/stdint.h: Adjust test results for new fixes.
* fixincl.x: Regenerate.
Martin Jambor [Tue, 9 Jun 2009 16:52:57 +0000 (18:52 +0200)]
re PR tree-optimization/40351 (ice in generate_subtree_copies for Linux kernel build)
2009-06-09 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/40351
* tree-sra.c (propagate_subacesses_accross_link): Check that a refrence
to a potential artifical subaccess can be constructed.
* testsuite/gcc.c-torture/compile/pr40351.c: New file.
Olivier Hainque [Tue, 9 Jun 2009 15:32:03 +0000 (15:32 +0000)]
utils2.c (build_call_alloc_dealloc_proc): New helper for build_call_alloc_dealloc with arguments to be interpreted...
ada/
* gcc-interface/utils2.c (build_call_alloc_dealloc_proc): New
helper for build_call_alloc_dealloc with arguments to be interpreted
identically. Process the case where a GNAT_PROC to call is provided.
(maybe_wrap_malloc): New helper for build_call_alloc_dealloc, to build
and return an allocator for DATA_SIZE bytes aimed at containing a
DATA_TYPE object, using the default __gnat_malloc allocator. Honor
DATA_TYPE alignments greater than what the latter offers.
(maybe_wrap_free): New helper for build_call_alloc_dealloc, to
release a DATA_TYPE object designated by DATA_PTR using the
__gnat_free entry point.
(build_call_alloc_dealloc): Expect object data type instead of naked
alignment constraint. Use the new helpers.
(build_allocator): Remove special processing for the super-aligned
case, now handled by build_call_alloc_dealloc. Pass data type instead
of the former alignment argument, as expected by the new interface.
* gcc-interface/gigi.h (build_call_alloc_dealloc): Adjust prototype
and comment.
* gcc-interface/trans.c (gnat_to_gnu) <case N_Free_Statement>:
Remove special processing for the super-aligned case, now handled
by build_call_alloc_dealloc. Pass data type instead of the former
alignment argument, as expected by the new interface.
Jakub Jelinek [Mon, 8 Jun 2009 22:39:32 +0000 (00:39 +0200)]
dwarf2out.c (emit_cfa_remember): New variable.
* dwarf2out.c (emit_cfa_remember): New variable.
(add_fde_cfi): If emit_cfa_remember, recurse to add
DW_CFA_remember_state first.
(dwarf2out_begin_epilogue): Don't add_fde_cfi DW_CFA_remember_state,
instead just set emit_cfa_remember.
Jan Hubicka [Mon, 8 Jun 2009 19:21:33 +0000 (21:21 +0200)]
re PR middle-end/39834 (verify_cgraph_node failed with -O3 -Winline)
PR debug/39834
* gcc.dg/torture/pr39834.c
PR middle-end/39834
* cgraphunit.c (save_inline_function_body): Do not copy transform hooks
for saved inline bodies.
* ipa-passes.c (do_per_function): Do not add the hoks multiple times
for given function.
Paul Thomas [Mon, 8 Jun 2009 18:50:37 +0000 (18:50 +0000)]
trans-array.h: Replace prototypes for gfc_conv_descriptor_offset...
2009-06-08 Paul Thomas <pault@gcc.gnu.org>
* trans-array.h : Replace prototypes for
gfc_conv_descriptor_offset, gfc_conv_descriptor_stride,
gfc_conv_descriptor_lbound, gfc_conv_descriptor_ubound with new
prototypes of the same names with _get or _set appended.
* trans-array.c : Make the originals of the above static and
new functions for the _get and _set functions. Update all the
references to these descriptor access functions.
* trans-expr.c : Update references to the above descriptor
access functions.
* trans-intrinsic.c : The same.
* trans-openmp.c : The same.
* trans-stmt.c : The same.
Jan Hubicka [Mon, 8 Jun 2009 17:17:52 +0000 (19:17 +0200)]
re PR middle-end/40102 (Revision 147294 caused ICE: verify_cgraph_node)
PR middle-end/40102
* cgraph.c (cgraph_create_edge_including_clones): Also asume that the
original node might've been modified.
* tree-inline.c (copy_bb): Do not assume that all clones are the same.
PR middle-end/40102
* g++.dg/torture/pr40102.C: New testcase.
Jakub Jelinek [Mon, 8 Jun 2009 16:28:38 +0000 (18:28 +0200)]
tree-object-size.c (addr_object_size): Add OSI argument.
* tree-object-size.c (addr_object_size): Add OSI argument.
Handle also INDIRECT_REF with SSA_NAME inside of it as base address.
(compute_builtin_object_size, expr_object_size): Adjust callers.
(plus_stmt_object_size): Call addr_object_size instead of
compute_builtin_object_size.
Jakub Jelinek [Mon, 8 Jun 2009 16:26:01 +0000 (18:26 +0200)]
re PR c++/40370 (ICE with invalid array bound in template class)
PR c++/40370
PR c++/40372
* parser.c (cp_parser_direct_declarator): Don't set TREE_SIDE_EFFECTS
on error_mark_node. Check for VLAs outside of function context
before check whether to wrap bounds into a NOP_EXPR with
TREE_SIDE_EFFECTS.
* g++.dg/template/error41.C: New test.
* g++.dg/template/error42.C: New test.
* tree-ssa-loop-prefetch.c
(gather_memory_references): Introduced a counter for the number of
memory references.
(anything_to_prefetch_p): Introduced a counter for the number of
prefetches.
(is_loop_prefetching_profitable): New function with a cost model
for prefetching.
(loop_prefetch_arrays): Use the new cost model to determine if
prefetching is profitable.
* params.def (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
* params.h (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
* doc/invoke.texi (MIN_INSN_TO_PREFETCH_RATIO,
PREFETCH_MIN_INSN_TO_MEM_RATIO): New parameters.
Michael Matz [Mon, 8 Jun 2009 11:37:12 +0000 (11:37 +0000)]
re PR debug/40012 (Revision 146817 generated bad debug info for local variables)
PR debug/40012
* cfgexpand.c (set_rtl): Store place also in DECL_RTL, if all
partitions use the same.
(expand_one_var): Deal with DECL_RTL sometimes begin set also
for basevars of SSA_NAMEs.
(expand_used_vars): Reset TREE_USED for basevars of SSA_NAMEs,
to not expand them twice.
(gimple_expand_cfg): Clear DECL_RTL for those decls that have
multiple places.
* c-common.c (c_do_switch_warnings): Don't exit early for -Wswitch
with no default node. Change warning with %H to warning_at.
Don't clear warn_switch around case checking.
* doc/invoke.texi (Warning Options): Clarify distinction between
-Wswitch and -Wswitch-enum.
java/:
* jcf-parse.c (handle_constant): Change local variable 'kind' to
unsigned int.
testsuite/:
* g++.dg/warn/Wswitch-3.C: New testcase.
* gcc.dg/Wswitch.c: Adjust for -Wswitch change.
* gcc.dg/Wswitch-enum-error.c: Likewise.
* gcc.dg/Wswitch-error.c: Likewise.
Jerry DeLisle [Sun, 7 Jun 2009 19:00:47 +0000 (19:00 +0000)]
re PR fortran/40008 (F2008: Add NEWUNIT= for OPEN statement)
2009-06-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40008
* libgfortran.h: Define IOPARM_OPEN_HAS_NEWUNIT.
* io/open.c (st_open): Don't error on negative unit number if NEWUNIT
was specified. If NEWUNIT is specified, call new function to get the
unique unit number and assign it.
* io/io.h (st_parameter_open): Add pointer to newunit. Add prototype for
next_available_newunit. Add prototype for new function,
get_unique_unit_number.
* io/unit.c: Declare next_available_newunit. Define the first newunit
number. (init_units): Initialize next_available_unit.
(get_unique_unit_number): New function. Fix whitespace and comments.
* io/transfer.c (data_transfer_init): Update error message to not be
specific to OPEN statements.
Jerry DeLisle [Sun, 7 Jun 2009 18:57:43 +0000 (18:57 +0000)]
re PR fortran/40008 (F2008: Add NEWUNIT= for OPEN statement)
2009-05-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/40008
* gfortran.h (gfc_open): Add newunit expression to structure.
* io.c (io_tag): Add new unit tag and fix whitespace.
(match_open_element): Add matching for newunit.
(gfc_free_open): Free the newunit expression.
(gfc_resolve_open): Add newunit to resolution and check constraints.
(gfc_resolve_close): Add check for non-negative unit.
(gfc_resolve_filepos): Likewise.
(gfc_resolve_dt): Likewise.
* trans-io.c (set_parameter_value): Build runtime checks for unit
numbers within range of kind=4 integer. (gfc_trans_open) Set the
newunit parameter.
* ioparm.def (IOPARM): Define the newunit parameter as a pointer
to GFC_INTEGER_4, pint4.
extend.texi (Attribute Syntax): Document that C++ labels on empty statements can now have attributes.
./: * doc/extend.texi (Attribute Syntax): Document that C++ labels on
empty statements can now have attributes.
cp/:
* parser.c (cp_parser_label_for_labeled_statement): Support
attribute on labels if immediately followed by semicolon.
* semantics.c (finish_label_stmt): Return new label.
* pt.c (tsubst_expr): Handle attributes for LABEL_EXPR.
testsuite/:
* gcc.dg/Wunused-label-1.c: New test case.
* g++.dg/warn/Wunused-label-1.C: New test case.
* g++.dg/warn/Wunused-label-2.C: New test case.
* g++.dg/warn/Wunused-label-3.C: New test case.
Daniel Franke [Sat, 6 Jun 2009 18:51:29 +0000 (14:51 -0400)]
re PR fortran/32890 (Compile-time detect of LHS/RHS missmatch for PACK)
fortran/
2009-06-06 Daniel Franke <franke.daniel@gmail.com>
PR fortran/32890
* intrinsic.h (gfc_simplify_pack): New prototype.
* intrinsic.c (add_functions): Added simplifier-callback to PACK.
* simplify.c (is_constant_array_expr): Moved to beginning of file.
(gfc_simplify_pack): New.
* check.c (gfc_check_pack): Check that VECTOR has enough elements.
Added safeguards for empty arrays.
testsuite/
2009-06-06 Daniel Franke <franke.daniel@gmail.com>
Jakub Jelinek [Fri, 5 Jun 2009 15:35:13 +0000 (17:35 +0200)]
re PR middle-end/40340 (Fortification warning no longer emitted in inlines)
PR middle-end/40340
* tree-ssa-live.c (remove_unused_scope_block_p): Don't prune
inlined_function_outer_scope_p blocks for artificial inlines
even at -g0/-g1.
* tree.c (tree_nonartificial_location): Rewrite using
block_nonartificial_location.
* gcc.dg/pr40340-1.c: New test.
* gcc.dg/pr40340-2.c: New test.
* gcc.dg/pr40340-3.c: New test.
* gcc.dg/pr40340-4.c: New test.
* gcc.dg/pr40340-5.c: New test.
* gcc.dg/pr40340.h: New file.
Jakub Jelinek [Fri, 5 Jun 2009 11:41:45 +0000 (13:41 +0200)]
s390.c (global_not_special_regno_p): New static inline.
* config/s390/s390.c (global_not_special_regno_p): New static inline.
(save_gprs): Don't tell unwinder when a global register is saved.
(s390_emit_epilogue): Emit needed epilogue unwind info.
Alexandre Oliva [Fri, 5 Jun 2009 06:18:50 +0000 (06:18 +0000)]
dwarf2out.c (deferred_asm_name): New.
* dwarf2out.c (deferred_asm_name): New.
(add_name_and_src_coords_attributes): Defer creation of
DW_AT_MIPS_linkage_name attribute if DECL_ASSEMBLER_NAME was not
computed yet.
(move_linkage_attr): New.
(dwarf2out_finish): Revisit deferrals and emit attributes at the
right place.
Alexandre Oliva [Fri, 5 Jun 2009 06:09:43 +0000 (06:09 +0000)]
trans-decl.c (gfc_build_qualified_array): Don't skip generation of range types.
* trans-decl.c (gfc_build_qualified_array): Don't skip generation
of range types.
* trans.h (struct lang_type): Add base_decls.
(GFC_TYPE_ARRAY_BASE_DECL): New.
* trans-types.c (gfc_get_array_type_bounds): Initialize base decls
proactively and excessively.
(gfc_get_array_descr_info): Use existing base decls if available.
Daniel Franke [Thu, 4 Jun 2009 21:52:32 +0000 (17:52 -0400)]
re PR fortran/37203 (Check ORDER= of RESHAPE)
gcc/fortran/
2009-06-04 Daniel Franke <franke.daniel@gmail.com>
PR fortran/37203
* check.c (gfc_check_reshape): Additional checks for the
SHAPE and ORDER arguments.
* simplify.c (gfc_simplify_reshape): Converted argument checks
to asserts.
gcc/testsuite/
2009-06-04 Daniel Franke <franke.daniel@gmail.com>
* src/mips/ffi.c (USE__BUILTIN___CLEAR_CACHE):
Define (conditionally), and use it to include cachectl.h.
(ffi_prep_closure_loc): Fix cache flushing.
* src/mips/ffitarget.h (_ABIN32, _ABI64, _ABIO32): Define.
Uros Bizjak [Thu, 4 Jun 2009 08:32:52 +0000 (10:32 +0200)]
i386.h (X86_64_MS_REGPARM_MAX): Rename from X64_REGPARM_MAX.
* config/i386/i386.h (X86_64_MS_REGPARM_MAX): Rename from
X64_REGPARM_MAX.
(REGPARM_MAX): Use X86_64_MS_REGPARM_MAX.
(X86_64_MS_SSE_REGPARM_MAX): Rename from X64_SSE_REGPARM_MAX.
(SSE_REGPARM_MAX): Use X86_64_MS_SSE_REGPARM_MAX.
* config/i386/i386.c: Use X86_64_MS_REGPARM_MAX instead of
X64_REGPARM_MAX. Use X86_64_MS_SSE_REGPARM_MAX instead of
X64_SSE_REGPARM_MAX.
* config/i386/i386.md: Use X86_64_MS_SSE_REGPARM_MAX instead of
X64_SSE_REGPARM_MAX.