1. 26 Oct, 2016 37 commits
    • Show INSN_UIDs in compact mode · 7574cfd4
      gcc/ChangeLog:
      	* print-rtl.c (rtx_writer::print_rtx_operand_code_u): Print
      	INSN_UIDs for all insns in compact mode.
      	(rtx_writer::print_rtx): Likewise.
      	* print-rtl.h (rtx_writer::flag_compact): Update comment.
      	* rtl-tests.c (selftest::test_dumping_insns): Update expected
      	output to include INSN_UID.
      	(selftest::test_uncond_jump): Likewise.
      
      From-SVN: r241593
      David Malcolm committed
    • re PR libstdc++/78110 (freestanding libstdc++ fails to compile) · a0019047
      2016-10-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR libstdc++/78110
              * libsupc++/new_opa.cc: Don't include <malloc.h> in a free standing
              environment.  Declare memalign directly in that case.
      
      From-SVN: r241591
      Bernd Edlinger committed
    • haifa-sched.c (call_used_regs_num): Rename to... · 6d5c37d0
      	* haifa-sched.c (call_used_regs_num): Rename to...
      	(call_saved_regs_num): ...this.
      	(fixed_regs_num): New variable.
      	(sched_pressure_start_bb): Subtract out fixed_regs. Scale call_saved 
      	regs not call_used.
      	(alloc_global_sched_pressure_data): Compute call_saved and fixed regs.
      
      From-SVN: r241590
      Pat Haugen committed
    • microblaze.c (tls_mentioned_p): Avoid fallthru. · eaa402fc
      	* config/microblaze/microblaze.c (tls_mentioned_p): Avoid
      	fallthru.
      
      From-SVN: r241587
      Jeff Law committed
    • Introduce class rtx_writer · 36cd856f
      gcc/ChangeLog:
      	* print-rtl-function.c (print_rtx_function): Rewrite in terms of
      	class rtx_writer.
      	* print-rtl.c (outfile): Delete global.
      	(sawclose): Likewise.
      	(indent): Likewise.
      	(in_call_function_usage): Likewise.
      	(flag_compact): Likewise.
      	(flag_simple): Likewise.
      	(rtx_writer::rtx_writer): New ctor.
      	(print_rtx_operand_code_0): Convert to...
      	(rtx_writer::print_rtx_operand_code_0): ...this.
      	(print_rtx_operand_code_e): Convert to...
      	(rtx_writer::print_rtx_operand_code_e): ...this.
      	(print_rtx_operand_codes_E_and_V): Convert to...
      	(rtx_writer::print_rtx_operand_codes_E_and_V): ...this.
      	(print_rtx_operand_code_i): Convert to...
      	(rtx_writer::print_rtx_operand_code_i): ...this.
      	(print_rtx_operand_code_r): Convert to...
      	(rtx_writer::print_rtx_operand_code_r): ...this.
      	(print_rtx_operand_code_u): Convert to...
      	(rtx_writer::print_rtx_operand_code_u): ...this.
      	(print_rtx_operand): Convert to...
      	(rtx_writer::print_rtx_operand): ...this.
      	(print_rtx): Convert to...
      	(rtx_writer::print_rtx): ...this.
      	(print_inline_rtx): Rewrite in terms of class rtx_writer.
      	(debug_rtx): Likewise.
      	(print_rtl): Convert to...
      	(rtx_writer::print_rtl): ...this.
      	(print_rtl): Reimplement in terms of class rtx_writer.
      	(print_rtl_single): Rewrite in terms of class rtx_writer.
      	(print_rtl_single_with_indent): Convert to..
      	(rtx_writer::print_rtl_single_with_indent): ...this.
      	(print_simple_rtl): Rewrite in terms of class rtx_writer.
      	* print-rtl.h (flag_compact): Delete decl.
      	(class rtx_writer): New class.
      	* rtl-tests.c (selftest::assert_rtl_dump_eq): Rewrite in terms of
      	class rtx_writer.
      
      From-SVN: r241586
      David Malcolm committed
    • arc.c (acr_print_operand): Adjust fallthru comment. · 3bbe0b82
      	* config/arc/arc.c (acr_print_operand): Adjust fallthru comment.
      	(check_if_valid_sleep_operand): Add missing fallthru comment.
      	(arc_register_move_cost): Increase buffer size.
      	* config/arc/arc.md (cbranch4si_scratch): Add missing fallthru
      	comment.
      	* config/arc/predicates.md (move_str_operand): Avoid fallthru.
      
      From-SVN: r241585
      Jeff Law committed
    • cr16.c (cr16_print_operand): Add missing fallthru comment. · f2b2b01c
      	* config/cr16/cr16.c (cr16_print_operand): Add missing fallthru
      	comment.  Add gcc_unreachable for path that should never happen.
      
      From-SVN: r241584
      Jeff Law committed
    • Fix test for recursive_directory_iterator::pop · 790207d6
      	* testsuite/experimental/filesystem/iterators/pop.cc: Remove
      	unreliable dependency on directory order.
      
      From-SVN: r241583
      Jonathan Wakely committed
    • epiphany.c (epiphany_print_operand): Adjust fallthru comment. · f34bf3d9
      	* config/epiphany/epiphany.c (epiphany_print_operand): Adjust
      	fallthru comment.
      
      From-SVN: r241582
      Jeff Law committed
    • re PR fortran/77973 (ICE in scan_omp_1_op, at omp-low.c:3841) · 3693a620
      	PR fortran/77973
      	* gimplify.c (gimplify_adjust_omp_clauses_1): For all added map
      	clauses with OMP_CLAUSE_SIZE being a decl, call omp_notice_variable
      	on outer context if any.
      
      	* gfortran.dg/gomp/pr77973.f90: New test.
      
      Co-Authored-By: Martin Liska <mliska@suse.cz>
      
      From-SVN: r241581
      Jakub Jelinek committed
    • gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p] by increment… · 984fa0ea
      gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p] by increment rather than double it.
      
      	* gen-pass-instances.awk (adjust_linenos): INcrement pass_lines[p]
      	by increment rather than double it.
      	(insert_remove_pass): Strip leading whitespace from args[3].  Don't
      	emit a space before args[4].
      	(END): Don't emit a space before with_arg.
      
      From-SVN: r241580
      Jakub Jelinek committed
    • Adapt atomic compare and swap to ARMv8-M Baseline · 3a5a75b5
      2016-10-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Add new ARMv8-M
          Baseline only alternatives to (i) hold store atomic success value in a
          return register rather than a scratch register, (ii) use a low register
          for it and to (iii) ensure the cbranchsi insn generated by the split
          respect the constraints of Thumb-1 cbranchsi4_insn and
          cbranchsi4_scratch.
          * config/arm/thumb1.md (cbranchsi4_insn): Add comment to indicate
          constraints must match those in atomic_compare_and_swap.
          (cbranchsi4_scratch): Likewise.
      
      From-SVN: r241578
      Thomas Preud'homme committed
    • Refactor atomic compare_and_swap to make it fit for ARMv8-M Baseline · 12286f25
      2016-10-26  Thomas Preud'homme  <thomas.preudhomme@arm.com>
      
          gcc/
          * config/arm/arm.c (arm_expand_compare_and_swap): Add new bdst local
          variable.  Add the new parameter to the insn generator.  Set that
          parameter to be CC flag for 32-bit targets, bval otherwise.  Set the
          return value from the negation of that parameter for Thumb-1, keeping
          the logic unchanged otherwise except for using bdst as the destination
          register of the compare_and_swap insn.
          (arm_split_compare_and_swap): Add explanation about how is the value
          returned to the function comment.  Rename scratch variable to
          neg_bval.  Adapt initialization of variables holding operands to the
          new operand numbers.  Use return register to hold result of store
          exclusive for Thumb-1, scratch register otherwise.  Construct the
          appropriate cbranch for Thumb-1 targets, keeping the logic unchanged
          for 32-bit targets.  Guard Z flag setting to restrict to 32bit targets.
          Use gen_cbranchsi4 rather than hand-written conditional branch to loop
          for strongly ordered compare_and_swap.
          * config/arm/predicates.md (cc_register_operand): New predicate.
          * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Use a
          match_operand with the new predicate to accept either the CC flag or a
          destination register for the boolean return value, restricting it to
          CC flag only via constraint.  Adapt operand numbers accordingly.
      
      From-SVN: r241577
      Thomas Preud'homme committed
    • frv.c (comparison_string): Do not fall through after an error. · 4f4bf94e
      	* config/frv/frv.c (comparison_string): Do not fall through after
      	an error.
      
      From-SVN: r241576
      Jeff Law committed
    • iq2000.c (iq2000_function_arg): Adjust fallthru comment. · 4b592619
      	* config/iq2000/iq2000.c (iq2000_function_arg): Adjust fallthru
      	comment.
      	(expand_one_builtin): Add missing break.
      
      From-SVN: r241573
      Jeff Law committed
    • m32c.c (encode_pattern_1): Add fallthru comment. · 0c57f4bf
      	* config/m32c/m32c.c (encode_pattern_1): Add fallthru comment.
      	(m32c_legitimate_address_p): Likewise.
      
      From-SVN: r241572
      Jeff Law committed
    • microblaze.c (microblaze_function_arg): Adjust fallthru comment. · 1cd20a8f
      	* config/microblaze/microblaze.c (microblaze_function_arg): Adjust
      	fallthru comment.
      
      From-SVN: r241568
      Jeff Law committed
    • msp430.c (msp430_legitimate_address_p): Adjust fallthru comment. · fcbe40f0
      	* config/msp430/msp430.c (msp430_legitimate_address_p): Adjust
      	fallthru comment.
      
      From-SVN: r241567
      Jeff Law committed
    • * config/nios2/nios2.c (nios2_rtx_costs): Avoid fallthru. · aa315f34
      From-SVN: r241566
      Jeff Law committed
    • rl78.c (rl78_calculate_death_notes): Add fallthru comment. · e741aaa3
      	* config/rl78/rl78.c (rl78_calculate_death_notes): Add fallthru
      	comment.
      	(rl78_asm_ctor_dtor): Increase buffer size.
      
      From-SVN: r241565
      Jeff Law committed
    • stormy16.c (xstormy16_asm_output_destrutor): Increase buffer size. · 42ee9611
      	* config/stormy16/stormy16.c (xstormy16_asm_output_destrutor): Increase
      	buffer size.
      	(xstormy16_asm_output_constructor): Likewise.
      
      From-SVN: r241564
      Jeff Law committed
    • Implement uniform_inside_sphere_distribution extension. · 10da5b7c
      2016-10-26  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	Implement uniform_inside_sphere_distribution extension.
      	* include/ext/random: Implement uniform_inside_sphere_distribution.
      	* include/ext/random.tcc: Ditto.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	cons/default.cc: New.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	cons/parms.cc: New.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	operators/equal.cc: New.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	operators/generate.cc: New.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	operators/inequal.cc: New.
      	* testsuite/ext/random/uniform_inside_sphere_distribution/
      	operators/serialize.cc: New.
      
      From-SVN: r241562
      Edward Smith-Rowland committed
    • pa.c (pa_asm_output_mi_thunk): Increase buffer size. · b2029ad6
      	* config/pa/pa.c (pa_asm_output_mi_thunk): Increase buffer
      	size.
      
      From-SVN: r241561
      Jeff Law committed
    • h8300.c (h8300_print_operand): Adjust FALLTHRU comment to silence warning. · 451c15c2
      	* config/h8300/h8300.c (h8300_print_operand): Adjust FALLTHRU
      	comment to silence warning.
      
      From-SVN: r241560
      Jeff Law committed
    • Add recursive_directory_iterator::pop(error_code&) · ec0b1056
      	* include/experimental/bits/fs_dir.h (recursive_directory_iterator):
      	Overload pop (LWG 2706).
      	* src/filesystem/dir.cc (recursive_directory_iterator::pop): Define
      	new overload.
      	* testsuite/experimental/filesystem/iterators/pop.cc: New test.
      
      From-SVN: r241559
      Jonathan Wakely committed
    • spu.c (spu_sched_reorder): Add missing fallthru comment. · ae51afc5
      	* config/spu/spu.c (spu_sched_reorder): Add missing fallthru comment.
      	(spu_legitimate_address_p): Fix logic error and add missing fallthru
      	comment.
      
      From-SVN: r241557
      Jeff Law committed
    • re PR fortran/78108 (Generic type-bound operator conflicts) · cd612e8a
      2016-10-26  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/78108
      	* resolve.c (resolve_typebound_intrinsic_op): For submodules
      	suppress the error and return if the same procedure symbol
      	is added more than once to the interface.
      
      2016-10-26  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/78108
      	* gfortran.dg/submodule_18.f08: New test.
      	* gfortran.dg/submodule_19.f08: New test.
      
      From-SVN: r241555
      Paul Thomas committed
    • Fix error handling in recursive_directory_iterator::increment · b4e7e6bf
      	* src/filesystem/dir.cc (recursive_directory_iterator::increment):
      	Reset state on error.
      	* testsuite/experimental/filesystem/iterators/
      	recursive_directory_iterator.cc: Check state after increment error.
      
      From-SVN: r241552
      Jonathan Wakely committed
    • fix pr78060 pr78061 pr78088 · 09844a5f
      	PR tree-optimization/78060
      	PR tree-optimization/78061
      	PR tree-optimization/78088
      	* tree-ssa-loop-split.c (easy_exit_values): New function.
      	(tree_ssa_split_loops): Use it.
      	(compute_new_first_bound): Change order of operations,
      	fix invalid use of types.
      
      testsuite/
      	* g++.dg/pr78060.C: New test.
      	* gfortran.dg/pr78061.f: New test.
      	* g++.dg/pr78088.C: New test.
      
      From-SVN: r241551
      Michael Matz committed
    • New I/O specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec. · 0ef33d44
      	gcc/fortran/
      	* gfortran.texi: Document.
      	* frontend-passes.c (gfc_code_walker): Add SHARE and CARRIAGECONTROL.
      	* io.c (gfc_free_open, gfc_resolve_open, gfc_match_open): Ditto.
      	* gfortran.h (gfc_open): Add SHARE, CARRIAGECONTROL, and READONLY.
      	* io.c (io_tag, match_open_element): Ditto.
      	* ioparm.def: Ditto.
      	* trans-io.c (gfc_trans_open): Ditto.
      	* io.c (match_dec_etag, match_dec_ftag): New functions.
      
      	libgfortran/io/
      	* libgfortran.h (IOPARM_OPEN_HAS_READONLY, IOPARM_OPEN_HAS_SHARE,
      	IOPARM_OPEN_HAS_CC): New for READONLY, SHARE, and CARRIAGECONTROL.
      	* close.c (st_close): Support READONLY.
      	* io.h (st_parameter_open, unit_flags): Support SHARE, CARRIAGECONTROL,
      	and READONLY.
      	* open.c (st_open): Ditto.
      	* transfer.c (data_transfer_init): Ditto.
      	* io.h (st_parameter_dt): New member 'cc' for CARRIAGECONTROL.
      	* write.c (write_check_cc, write_cc): New functions for CARRIAGECONTROL.
      	* transfer.c (next_record_cc): Ditto.
      	* file_pos.c (st_endfile): Support SHARE and CARRIAGECONTROL.
      	* io.h (st_parameter_inquire): Ditto.
      	* open.c (edit_modes, new_unit): Ditto.
      	* inquire.c (inquire_via_unit, inquire_via_filename): Ditto.
      	* io.h (unit_share, unit_cc, cc_fortran, IOPARM_INQUIRE_HAS_SHARE,
      	IOPARM_INQUIRE_HAS_CC): New for SHARE and CARRIAGECONTROL.
      	* open.c (share_opt, cc_opt): Ditto.
      	* read.c (read_x): Support CARRIAGECONTROL.
      	* transfer.c (read_sf, next_record_r, next_record_w): Ditto.
      	* write.c (list_formatted_write_scalar, write_a): Ditto.
      	* unix.h (close_share): New prototype.
      	* unix.c (open_share, close_share): New functions to handle SHARE.
      	* unix.c (open_external): Handle READONLY. Call open_share.
      	* close.c (st_close): Call close_share.
      
      	gcc/testsuite/
      	* dec_io_1.f90: New test.
              * dec_io_2.f90: New test.
              * dec_io_3.f90: New test.
              * dec_io_4.f90: New test.
              * dec_io_5.f90: New test.
              * dec_io_6.f90: New test.
      
      From-SVN: r241550
      Fritz Reese committed
    • PR78111 fix fallback code for filesystem::canonical · 9dbe100a
      	PR libstdc++/78111
      	* src/filesystem/ops.cc (canonical): Set error for non-existent path.
      
      From-SVN: r241549
      Jonathan Wakely committed
    • Add missing header in Filesystem TS configure tests · d955ae42
      2016-10-26  Uros Bizjak  <ubizjak@gmail.com>
      
      	* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Include <limits.h>
      	for PATH_MAX in realpath test.
      	* configure: Regenerate.
      
      From-SVN: r241548
      Uros Bizjak committed
    • gen-pass-instances.awk is sensitive to the order in which passes are added... · b6735d9a
      	gen-pass-instances.awk is sensitive to the order in which
      	passes are added; passes that appear later have to be added first.
      	PR target/71676
      	PR target/71678
      	* config/avr/avr-passes.def: Swap order of directives for
      	gen-pass-instances.awk.
      
      From-SVN: r241547
      Georg-Johann Lay committed
    • Daily bump. · 9e8b0bba
      From-SVN: r241545
      GCC Administrator committed
  2. 25 Oct, 2016 3 commits
    • vax.c (vad_address_cost_1): Add missing FALLTHRU comment. · 9443c717
      	* config/vax/vax.c (vad_address_cost_1): Add missing FALLTHRU comment.
      	(vax_notice_update_cc): Likewise.
      
      From-SVN: r241542
      Jeff Law committed
    • MAINTAINERS (Write After Approval): Add myself. · ac164b5b
      2016-10-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
      
      	* MAINTAINERS (Write After Approval): Add myself.
      
      From-SVN: r241541
      Will Schmidt committed
    • re PR fortran/45516 ([F08] allocatable compontents of recursive type) · bf9f15ee
      2016-10-25  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/45516
      	* class.c (gfc_find_derived_vtab): Detect recursive allocatable
      	derived type components. If present, add '_deallocate' field to
      	the vtable and build the '__deallocate' function.
      	* decl.c (build_struct): Allow recursive allocatable derived
      	type components for -std=f2008 or more.
      	(gfc_match_data_decl): Accept these derived types.
      	* expr.c (gfc_has_default_initializer): Ditto.
      	* resolve.c (resolve_component): Make sure that the vtable is
      	built for these derived types.
      	* trans-array.c(structure_alloc_comps) : Use the '__deallocate'
      	function for the automatic deallocation of these types.
      	* trans-expr.c : Generate the deallocate accessor.
      	* trans.h : Add its prototype.
      	* trans-types.c (gfc_get_derived_type): Treat the recursive
      	allocatable components in the same way as the corresponding
      	pointer components.
      
      2016-10-25  Paul Thomas  <pault@gcc.gnu.org>
      
      	PR fortran/45516
      	* gfortran.dg/class_2.f03: Set -std=f2003.
      	* gfortran.dg/finalize_21.f90: Modify tree-dump.
      	* gfortran.dg/recursive_alloc_comp_1.f08: New test.
      	* gfortran.dg/recursive_alloc_comp_2.f08: New test.
      	* gfortran.dg/recursive_alloc_comp_3.f08: New test.
      	* gfortran.dg/recursive_alloc_comp_4.f08: New test.
      
      From-SVN: r241539
      Paul Thomas committed