Eric Botcazou [Fri, 16 Dec 2011 23:38:34 +0000 (23:38 +0000)]
sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
* config/sparc/sparc.md (UNSPEC_FRAME_BLOCKAGE): New constant.
(frame_blockage): New expander.
(frame_blockage<P:mode>): New instruction.
* config/sparc/sparc.c (sparc_expand_prologue): When the sequence of
instructions establishing the frame isn't atomic, emit frame blockage.
Eric Botcazou [Tue, 13 Dec 2011 22:03:05 +0000 (22:03 +0000)]
lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets.
* lto-streamer-in.c (lto_read_body): Likewise.
(lto_input_toplevel_asms): Likewise.
* lto-section-in.c (lto_create_simple_input_block): Likewise.
* lto-opts.c (lto_read_file_options): Likewise.
* ipa-prop.c (ipa_prop_read_section): Likewise.
* df.h (DF_NOTE): Fix typo in comment.
lto/
* lto.h (lto_parse_hex): Delete.
* lto.c (lto_read_decls): Use 'int' for offsets.
(lto_parse_hex): Make static and return proper 64-bit host type.
(lto_resolution_read): Use proper 64-bit host type.
Eric Botcazou [Mon, 12 Dec 2011 18:24:31 +0000 (18:24 +0000)]
re PR tree-optimization/50569 (unaligned memory accesses generated for memcpy)
PR tree-optimization/50569
* tree-sra.c (build_ref_for_model): Replicate a chain of COMPONENT_REFs
in the expression of MODEL instead of just the last one.
Tobias Burnus [Sun, 11 Dec 2011 21:37:55 +0000 (22:37 +0100)]
re PR fortran/50923 (No warning if function return value is not set)
2011-12-11 Tobias Burnus <burnus@net-b.de>
PR fortran/50923
* trans-decl.c (generate_local_decl): Set TREE_NO_WARNING only
if the front end has printed a warning.
(gfc_generate_function_code): Fix unset-result warning.
Teresa Johnson [Thu, 8 Dec 2011 15:44:14 +0000 (15:44 +0000)]
backport: i386.md (*movdi_internal_rex64): Use "!o" constraint instead of "!m" for operand 0, alternative 4.
Backport from mainline:
2011-08-05 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*movdi_internal_rex64): Use "!o" constraint
instead of "!m" for operand 0, alternative 4.
(*movdf_internal_rex64): Ditto for operand 0, alernative 6.
Jakub Jelinek [Thu, 8 Dec 2011 13:36:40 +0000 (14:36 +0100)]
backport: re PR middle-end/51323 (g++ confuses this with function argument in optimized call)
Backport from mainline
2011-12-05 Jakub Jelinek <jakub@redhat.com>
Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/51323
PR middle-end/50074
* calls.c (internal_arg_pointer_exp_state): New variable.
(internal_arg_pointer_based_exp_1,
internal_arg_pointer_exp_scan): New functions.
(internal_arg_pointer_based_exp): New function.
(mem_overlaps_already_clobbered_arg_p): Use it.
(expand_call): Free internal_arg_pointer_exp_state.cache vector
and clear internal_arg_pointer_exp_state.scan_start.
Jakub Jelinek [Thu, 8 Dec 2011 13:33:58 +0000 (14:33 +0100)]
backport: re PR rtl-optimization/48721 (ICE: verify_flow_info failed: missing barrier after block 6 with -foptimize-sibling-calls -fsched2-use-superblocks)
Backport from mainline
2011-11-30 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/48721
* sched-deps.c (sched_analyze_insn): For SIBLING_CALL_P set
reg_pending_barrier to TRUE_BARRIER.
Eric Botcazou [Thu, 8 Dec 2011 09:12:12 +0000 (09:12 +0000)]
re PR tree-optimization/51315 (unaligned memory accesses generated with -ftree-sra)
PR tree-optimization/51315
* tree-sra.c (tree_non_mode_aligned_mem_p): Rename to...
(tree_non_aligned_mem_p): ...this. Add ALIGN parameter. Look into
MEM_REFs and use get_object_or_type_alignment for them.
(build_accesses_from_assign): Adjust for above change.
(access_precludes_ipa_sra_p): Likewise.
ada/
Backport from mainline
2011-09-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not promote
the alignment if this doesn't prevent BLKmode access to the object.
Alan Modra [Tue, 6 Dec 2011 03:47:37 +0000 (14:17 +1030)]
re PR target/50906 (e500 exception unwinding under "-Os" causes SIGSEGV)
PR target/50906
* config/rs6000/rs6000.c (rs6000_emit_prologue <TARGET_SPE_ABI>):
Do not mark r11 setup as frame-related. Pass correct offset to
rs6000_emit_savres_rtx. Correct out-of-line rs6000_frame_related
arguments. Correct sp_offset. Remove "offset" fudge from
in-line rs6000_frame_related call. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <TARGET_SPE_ABI>): Always set frame_reg_rtx
to r11 in out-of-line case. Correct sp_offset. Pass correct
offset to rs6000_emit_savres_rtx. Rename misleading variable.
Fix comments and whitespace. Tidy some expressions.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Add sp_offset
adjustment when !saving_GPRs_inline. Correct register mode
used in address calcs.
(rs6000_emit_epilogue <non-TARGET_SPE_ABI>): Similarly when
!restoring_GPRs_inline.
re PR target/51002 (SP_H register is used even on targets that do not have it (eg attiny26))
PR target/51002
PR target/51345
* config/avr/libgcc.S (__prologue_saves__, __epilogue_restores__):
Enclose parts using __SP_H__ in !defined (__AVR_HAVE_8BIT_SP__).
Add FIXME comments.
* config/avr/avr.md (movhi_sp_r_irq_off, movhi_sp_r_irq_on): Set
insn condition to !AVR_HAVE_8BIT_SP.
* config/avr/avr.c (output_movhi): "clr%B0" instead of "in
%B0,__SP_H__" if AVR_HAVE_8BIT_SP.
(avr_file_start): Only print "__SP_H__ = 0x3e" if !AVR_HAVE_8BIT_SP.
* config/avr/avr-devices.c (avr_mcu_types): ATtiny4313 and
AT86RF401 have a 16-bit SP (their manual is bogus).
Tobias Burnus [Fri, 25 Nov 2011 17:18:05 +0000 (18:18 +0100)]
re PR fortran/50408 (ICE in transfer_expr)
2011-11-25 Tobias Burnus <burnus@net-b.de>
PR fortran/50408
* trans-decl.c (gfc_get_module_backend_decl): Also copy
ts.u.derived from the gsym if the ts.type is BT_CLASS.
(gfc_get_extern_function_decl): Copy also the backend_decl
for the symbol's ts.u.{derived,cl} from the gsym.
* trans-types.c (gfc_copy_dt_decls_ifequal): Directly
return if "from" and "to" are the same.
backport: re PR debug/48190 ([regression?] Huge memory use while compiling qemu-0.4.0)
gcc/
Backport from mainline:
2011-03-29 Richard Sandiford <richard.sandiford@linaro.org>
PR debug/48190
* dwarf2out.c (dw_loc_list_node): Add resolved_addr and replaced.
(cached_dw_loc_list_def): New structure.
(cached_dw_loc_list): New typedef.
(cached_dw_loc_list_table): New variable.
(cached_dw_loc_list_table_hash): New function.
(cached_dw_loc_list_table_eq): Likewise.
(add_location_or_const_value_attribute): Take a bool cache_p.
Cache the list when the parameter is true.
(gen_formal_parameter_die): Update caller.
(gen_variable_die): Likewise.
(dwarf2out_finish): Likewise.
(dwarf2out_abstract_function): Nullify cached_dw_loc_list_table
while generating debug info for the decl.
(dwarf2out_function_decl): Clear cached_dw_loc_list_table.
(dwarf2out_init): Initialize cached_dw_loc_list_table.
(resolve_addr): Cache the result of resolving a chain of
location lists.
Tobias Burnus [Thu, 24 Nov 2011 20:44:28 +0000 (21:44 +0100)]
re PR fortran/51218 (Potential optimization bug due to implicit_pure?)
2011-11-24 Tobias Burnus <burnus@net-b.de>
PR fortran/51218
* resolve.c (pure_subroutine): If called subroutine is
impure, unset implicit_pure.
(resolve_function): Move impure check to simplify code.
Iain Sandoe [Mon, 21 Nov 2011 09:04:08 +0000 (09:04 +0000)]
backport: re PR target/50678 (FAIL: c52104y on x86_64-apple-darwin10)
gcc/ada:
Backport from mainline r181474
PR target/50678
* init.c (__gnat_error_handler) [Darwin]: Move work-around to the
bug filed as radar #10302855 from __gnat_error_handler ...
... to (__gnat_adjust_context_for_raise) [Darwin]: New.
(HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE) [Darwin]: Define.
(__gnat_error_handler) [Darwin]: Use __gnat_adjust_context_for_raise.
Iain Sandoe [Sun, 13 Nov 2011 14:25:58 +0000 (14:25 +0000)]
backport: Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link s-oscons.ads.
ada:
Backport from mainline r181319
* gcc-interface/Makefile.in (stamp-gnatlib-$(RTSDIR)): Don't link
s-oscons.ads.
(OSCONS_CPP, OSCONS_EXTRACT): New.
(./bldtools/oscons/xoscons): New Target.
($(RTSDIR)/s-oscons.ads): New Target.
(gnatlib): Depend on $(RTSDIR)/s-oscons.ads.
* Make-generated.in: Remove machinery to generate xoscons and
ada/s-oscons.ads.
libada:
Backport from mainline r181319
Makefile.in: Change dependency on oscons to depend on the generator
tool.
Iain Sandoe [Sun, 13 Nov 2011 13:58:43 +0000 (13:58 +0000)]
re PR target/48108 (lto should be containerized in a single mach-o section on darwin)
gcc:
PR target/48108
Backport from mainline r180523
* config/darwin.c (top level): Amend comments concerning LTO output.
(lto_section_num): New variable. (darwin_lto_section_e): New GTY.
(LTO_SECTS_SECTION, LTO_INDEX_SECTION): New.
(LTO_NAMES_SECTION): Rename.
(darwin_asm_named_section): Record LTO section counts and switches
in a vec of darwin_lto_section_e.
(darwin_file_start): Remove unused code.
(darwin_file_end): Put an LTO section termination label. Handle
output of the wrapped LTO sections, index and names table.
libiberty:
PR target/48108
Backport from mainline r180523
* simple-object-mach-o.c (GNU_WRAPPER_SECTS, GNU_WRAPPER_INDEX,
GNU_WRAPPER_NAMES): New macros.
(simple_object_mach_o_segment): Handle wrapper scheme.
(simple_object_mach_o_write_section_header): Allow the segment name
to be supplied.
(simple_object_mach_o_write_segment): Handle wrapper scheme. Ensure
that the top-level segment name in the load command is empty.
(simple_object_mach_o_write_to_file): Determine the number of
sections during segment output, use that in writing the header.