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.
Tobias Burnus [Wed, 3 Jun 2009 20:32:23 +0000 (22:32 +0200)]
gfortran.texi: Add mixed-language programming...
2009-06-03 Tobias Burnus <burnus@net-b.de>
* gfortran.texi: Add mixed-language programming, mention
varying string lengths, some clean up of introduction parts.
* intrinsic.texi (instrinsic modules): Create @menu for
* subsections.
(ISO_C_BINDING): Support ISOCBINDING_INT_FAST128_T.
* libgfortran.h: Comment to rember to keep gfortran.texi in
* sync.
* iso-c-binding.def: Support ISOCBINDING_INT_FAST128_T.
* Makefile.in (dummy-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
(cc1-checksum.o): Likewise.
gcc/cp/:
* Make-lang.in (cc1plus-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
gcc/objc/:
* Make-lang.in (cc1obj-checksum.o): Depend upon $(CONFIG_H) and
$(SYSTEM_H).
gcc/objcp/:
* Make-lang.in (cc1objplus-checksum.o): Depend upon $(CONFIG_H)
and $(SYSTEM_H).
statistics.c (statistics_counter_event): Do not record event in pass dump if its number == -1.
* statistics.c (statistics_counter_event): Do not record event
in pass dump if its number == -1.
(curr_statistics_hash): Add assert that we never get passes
with static number == -1.
Eric Botcazou [Wed, 3 Jun 2009 10:52:40 +0000 (10:52 +0000)]
decl.c (gnat_to_gnu_entity): When adjusting the discriminant nodes in an extension...
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: When
adjusting the discriminant nodes in an extension, use the full view
of the parent subtype if it is of a private kind.
Eric Botcazou [Wed, 3 Jun 2009 10:39:42 +0000 (10:39 +0000)]
decl.c (gnat_to_gnu_entity): Add the _Parent field, if any, to the record before adding the other fields.
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Add the
_Parent field, if any, to the record before adding the other fields.
<E_Record_Subtype>: Put the _Controller field before the other fields
except for the _Tag or _Parent fields.
(components_to_record): Likewise. Retrieve the _Parent field from the
record type.
Eric Botcazou [Wed, 3 Jun 2009 10:26:20 +0000 (10:26 +0000)]
decl.c (substitution_list): Rename to build_subst_list, remove unused parameter and simplify.
* gcc-interface/decl.c (substitution_list): Rename to build_subst_list,
remove unused parameter and simplify.
(gnat_to_gnu_entity) <E_Record_Type>: Do not set TYPE_FIELDS. Factor
common predicate. Rewrite loop for clarity. Use GNU_TYPE directly
as context for all discriminants. Fix formatting nits.
<E_Record_Subtype>: Add cosmetic 'break'. Test Has_Discriminants
before Discriminant_Constraint. Adjust for above renaming. Do not
set GNU_TYPE more than once.
(elaborate_entity): Test Has_Discriminants on the entity and use
Implementation_Base_Type.
(components_to_record): Rename component_list to gnat_component_list.
Retrieve the _Parent field from the list. Fix nits in comments.
Clarify logic in loop. Pass correct arguments to create_field_decl.
Uros Bizjak [Wed, 3 Jun 2009 06:33:31 +0000 (08:33 +0200)]
driver-i386.c (describe_cache): Optimize concatenation of strings.
* config/i386/driver-i386.c (describe_cache): Optimize
concatenation of strings. Use snprintf instead of sprintf.
(host_detect_local_cpu): Ditto. Ignore -march and -mtune for native
target when not compiling with GCC.
gcc/
* Makefile.in (libgcc.mvars): Add TARGET_SYSTEM_ROOT.
* config/rs6000/aix.h (LINK_SYSCALLS_SPEC): Add %R to the
!CROSS_DIRECTORY_STRUCTURE alternative and use it for
CROSS_DIRECTORY_STRUCTURE too.
(LINK_LIBG_SPEC): Likewise.
(LIB_SPEC): Add %R to sysroot paths.
* config/rs6000/aix43.h (CPP_SPEC): Add %R to sysroot paths.
(CPLUSPLUS_CPP_SPEC, LIB_SPEC): Likewise.
* config/rs6000/aix51.h: As for aix43.h.
* config/rs6000/aix52.h: Likewise.
* config/rs6000/aix53.h: Likewise.
* config/rs6000/aix61.h: Likewise.
* config/rs6000/t-aix52 (SHLIB_LINK): Add $(TARGET_SYSTEM_ROOT)
to the beginning of sysroot paths.
Alexandre Oliva [Tue, 2 Jun 2009 17:47:33 +0000 (17:47 +0000)]
loop-unroll.c (struct iv_to_split): Add pointer to next.
* loop-unroll.c (struct iv_to_split): Add pointer to next.
(struct var_to_expand): Likewise.
(struct opt_info): Add head and tail for linked lists of the above.
(analyze_insn_to_expand_var): Initialize next.
(analyze_iv_to_split_insn): Likewise.
(analyze_insns_in_loop): Create linked lists.
(allocate_basic_variable): Simplify for use without hash table.
(insert_var_expansion_initialization): Likewise, make it type-safer.
(combine_var_copies_in_loop_exit): Likewise.
(apply_opt_in_copies): Walk lists rather than hash tables.
(release_var_copies): Simplified and inlined by hand into...
(free_opt_info): ... this function.
Jason Merrill [Tue, 2 Jun 2009 17:02:38 +0000 (13:02 -0400)]
re PR c++/40308 (Brace initialization fails for member initializers in constructor for class templates)
PR c++/40308
PR c++/40311
* typeck.c (cp_build_modify_expr): Always pass init-lists to the
conversion code.
* call.c (implicit_conversion): Allow init-list conversion to scalar
during direct-initialization, too. Mark the conversion bad if it
has too many levels of braces.
(convert_like_real): And give a helpful error.
Jason Merrill [Tue, 2 Jun 2009 17:02:27 +0000 (13:02 -0400)]
re PR c++/40306 (ICE when using auto to declare a local copy inside a member function)
PR c++/40306
PR c++/40307
* decl.c (cp_finish_decl): Handle auto deduction from ().
* typeck.c (build_x_indirect_ref): Handle dereferencing an operand
with dependent type that is known to be a pointer.
Jakub Jelinek [Mon, 1 Jun 2009 19:49:57 +0000 (21:49 +0200)]
i386.c (queued_cfa_restores): New static variable.
* config/i386/i386.c (queued_cfa_restores): New static variable.
(ix86_add_cfa_restore_note, ix86_add_queued_cfa_restore_notes): New
functions.
(pro_epilogue_adjust_stack): Call ix86_add_queued_cfa_restore_notes.
(ix86_emit_restore_reg_using_pop): Add RED_OFFSET argument.
Set RTX_FRAME_RELATED_P immediately after adding a REG_CFA_* note.
Call ix86_add_cfa_restore_note instead of adding REG_CFA_OFFSET
note unconditionally.
(ix86_emit_restore_regs_using_mov): Likewise.
(ix86_emit_restore_sse_regs_using_mov): Likewise.
(ix86_emit_restore_regs_using_pop): Add RED_OFFSET argument, pass
it through to ix86_emit_restore_reg_using_pop.
(ix86_emit_leave): Add RED_OFFSET argument. Call
ix86_add_queued_cfa_restore_notes. Call ix86_add_cfa_restore_note
instead of adding REG_CFA_OFFSET note unconditionally.
(ix86_expand_epilogue): Compute RED_OFFSET, pass it down to
the above functions. Call ix86_add_queued_cfa_restore_notes when
needed.
Jakub Jelinek [Mon, 1 Jun 2009 19:43:24 +0000 (21:43 +0200)]
dwarf2out.c (dwarf2out_cfi_label): Add FORCE argument...
* dwarf2out.c (dwarf2out_cfi_label): Add FORCE argument, if true,
force output of the label even for dwarf2out_do_cfi_asm.
(add_fde_cfi): If -g2 and above and cfi might change CFA,
force creation of CFI label and chain DW_CFA_set_loc jumping to it
for convert_cfa_to_fb_loc_list. Adjust other dwarf2out_cfi_label
caller.
(dwarf2out_stack_adjust, dwarf2out_frame_debug,
dwarf2out_begin_epilogue, dwarf2out_frame_debug_restore_state): Adjust
dwarf2out_cfi_label callers.
* tree.h (dwarf2out_cfi_label): Adjust prototype.
* config/arm/arm.c (thumb_pushpop, thumb1_output_function_prologue):
Adjust dwarf2out_cfi_label callers.
* config/vax/vax.c (vax_output_function_prologue): Likewise.
Jakub Jelinek [Mon, 1 Jun 2009 19:41:43 +0000 (21:41 +0200)]
i386.h (struct machine_cfa_state, [...]): Guard with ifndef USED_FOR_TARGET instead of not IN_LIBGCC2 and not in...
* config/i386/i386.h (struct machine_cfa_state,
struct machine_function): Guard with ifndef USED_FOR_TARGET
instead of not IN_LIBGCC2 and not in IN_TARGET_LIBS.
Jakub Jelinek [Mon, 1 Jun 2009 17:13:04 +0000 (19:13 +0200)]
re PR middle-end/40316 (Revision 147995 breaks gcc.target/i386/lea.c)
PR middle-end/40316
* recog.c (peep2_reinit_state): New function.
(peephole2_init_state): Use it at the end of a basic block and also
when seeing a RTX_FRAME_RELATED_P insn.