1. 27 May, 2019 9 commits
    • darwin, x86, testsuite - Match codegen · 9467fbc0
      For this test, we can match the codegen expected in the scan-asms
      by avoiding the extra indirection that's mandated by the ABI for
      common access and by using -mdynamic-no-pic for the 32b case.
      
      gcc/testsuite/
      
      2019-05-27  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/i386/pr22076.c: Adjust options to
      	match codegen expected by the scan-asms.
      
      From-SVN: r271670
      Iain Sandoe committed
    • dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index and… · 7e8ae6c8
      dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index and DW_OP_GNU_const_index opcodes.
      
      	* dwarf2out.c (resolve_args_picking_1): Deal with DW_OP_GNU_addr_index
      	and DW_OP_GNU_const_index opcodes.
      
      From-SVN: r271664
      Eric Botcazou committed
    • [testsuite,aarch64,arm] PR88440: Fix testcases · 63be21c8
      2019-05-27  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	PR tree-optimization/88440
      	gcc/testsuite/
      	* gcc.target/aarch64/sve/index_offset_1.c: Add -fno-tree-loop-distribute-patterns.
      	* gcc.target/aarch64/sve/single_1.c: Likewise.
      	* gcc.target/aarch64/sve/single_2.c: Likewise.
      	* gcc.target/aarch64/sve/single_3.c: Likewise.
      	* gcc.target/aarch64/sve/single_4.c: Likewise.
      	* gcc.target/aarch64/sve/vec_init_1.c: Likewise.
      	* gcc.target/aarch64/vect-fmovd-zero.c: Likewise.
      	* gcc.target/aarch64/vect-fmovf-zero.c: Likewise.
      	* gcc.target/arm/ivopts.c: Likewise.
      
      From-SVN: r271662
      Christophe Lyon committed
    • re PR tree-optimization/90637 (ICE in vect_loop_versioning, at tree-vect-loop-manip.c:3055) · d6b3654a
      2019-05-27  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90637
      	* tree-ssa-sink.c (statement_sink_location): Honor the
      	computed sink location for single-uses.
      
      	* gcc.dg/gomp/pr90637.c: New testcase.
      
      From-SVN: r271661
      Richard Biener committed
    • ada-builtin-types.def: New file. · b9778c45
      	* gcc-interface/ada-builtin-types.def: New file.
      	* gcc-interface/ada-builtins.def: Likewise.
      	* gcc-interface/ada-tree.h (BUILT_IN_LIKELY): New macro.
      	(BUILT_IN_UNLIKELY): Likewise.
      	* gcc-interface/trans.c (independent_iterations_p): Initialize the
      	auto-vector to 16 elements.
      	(Call_to_gnu): Remove local variable and change the vector of actual
      	parameters to an auto-vector.  Do not convert actual parameters to
      	the argument type for front-end built-in functions.  Add support for
      	front-end built-in functions.
      	(build_noreturn_cond): Use internal instead of built-in function.
      	* gcc-interface/utils.c (c_builtin_type): Include ada-builtin-types.def
      	(install_builtin_function_types): Likewise.
      	(install_builtin_functions): Include ada-builtins.def first.
      
      From-SVN: r271658
      Eric Botcazou committed
    • trans.c (Identifier_to_gnu): Minor tweaks. · eb0f4e48
      	* gcc-interface/trans.c (Identifier_to_gnu): Minor tweaks.
      	(gnat_to_gnu): Do not convert the result if it is a reference to an
      	unconstrained array used as the prefix of an attribute reference that
      	requires an lvalue.
      
      From-SVN: r271653
      Eric Botcazou committed
    • trans.c (Gigi_Types_Compatible): New predicate. · 3016ec8a
      	* gcc-interface/trans.c (Gigi_Types_Compatible): New predicate.
      	(Identifier_to_gnu): Use it to assert that the type of the identifier
      	and that of its entity are compatible for gigi.  Rename a couple of
      	local variables and separate the processing of the result type.
      
      From-SVN: r271650
      Eric Botcazou committed
    • trans.c (Call_to_gnu): Use the unpadded type when putting back an intermediate… · 7a0877c0
      trans.c (Call_to_gnu): Use the unpadded type when putting back an intermediate conversion the type of...
      
      	* gcc-interface/trans.c (Call_to_gnu): Use the unpadded type when
      	putting back an intermediate conversion the type of the actuals.
      
      From-SVN: r271647
      Eric Botcazou committed
    • re PR testsuite/90615 (several vector test cases fail starting with r271553) · 3aad84a4
      2019-05-27  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/90615
      	* gcc.dg/vect/costmodel/ppc/costmodel-vect-31b.c: Add
      	-fno-tree-loop-distribute-patterns.
      	* gcc.dg/vect/costmodel/ppc/costmodel-vect-33.c: Likewise.
      	* gcc.dg/vect/costmodel/ppc/costmodel-vect-76a.c: Likewise.
      	* gcc.dg/vect/costmodel/ppc/costmodel-vect-76b.c: Likewise.
      	* gcc.dg/vect/costmodel/ppc/costmodel-vect-76c.c: Likewise.
      	* gcc.target/powerpc/vsx-vectorize-1.c: Likewise.
      
      From-SVN: r271645
      Richard Biener committed
  2. 26 May, 2019 1 commit
    • darwin, x86, testsuite - Amend three PIE tests, · 2e776eff
      Darwin requires PIC code in order to support PIE, amend the test scan-asms
      to match this.
      
      2019-05-26  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/i386/pr39013-1.c: Adjust scan-asms for PIE to
      	account for PIC code on Darwin.
      	* gcc.target/i386/pr39013-2.c: Likewise.
      	* gcc.target/i386/pr64317.c: Likewise.
      
      From-SVN: r271634
      Iain Sandoe committed
  3. 25 May, 2019 4 commits
  4. 24 May, 2019 6 commits
    • tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_. · 6c7ae8c5
      	* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE__CONDTEMP_.
      	* tree.h (OMP_CLAUSE_DECL): Use OMP_CLAUSE__CONDTEMP_ instead of
      	OMP_CLAUSE__REDUCTEMP_.
      	* tree.c (omp_clause_num_ops, omp_clause_code_name): Add
      	OMP_CLAUSE__CONDTEMP_.
      	(walk_tree_1): Handle OMP_CLAUSE__CONDTEMP_.
      	* tree-pretty-print.c (dump_omp_clause): Likewise.
      	* tree-nested.c (convert_nonlocal_omp_clauses,
      	convert_local_omp_clauses): Likewise.
      	* gimplify.c (enum gimplify_omp_var_data): Use hexadecimal constants
      	instead of decimal.  Add GOVD_LASTPRIVATE_CONDITIONAL.
      	(gimplify_scan_omp_clauses): Don't reject lastprivate conditional
      	on OMP_FOR.
      	(gimplify_omp_for): Warn and disable conditional modifier from
      	lastprivate on loop iterators.
      	* omp-general.h (struct omp_for_data): Add lastprivate_conditional
      	member.
      	* omp-general.c (omp_extract_for_data): Initialize it.
      	* omp-low.c (struct omp_context): Add lastprivate_conditional_map
      	member.
      	(delete_omp_context): Delete it.
      	(lower_lastprivate_conditional_clauses): New function.
      	(lower_lastprivate_clauses): Add BODY_P and CSTMT_LIST arguments,
      	handle lastprivate conditional clauses.
      	(lower_reduction_clauses): Add CLIST argument, emit it into
      	the critical section if any.
      	(lower_omp_sections): Adjust lower_lastprivate_clauses and
      	lower_reduction_clauses callers.
      	(lower_omp_for_lastprivate): Add CLIST argument, pass it through
      	to lower_lastprivate_clauses.
      	(lower_omp_for): Call lower_lastprivate_conditional_clauses, adjust
      	lower_omp_for_lastprivate and lower_reduction_clauses callers, emit
      	clist into a critical section if not emitted there already by
      	lower_reduction_clauses.
      	(lower_omp_taskreg, lower_omp_teams): Adjust lower_reduction_clauses
      	callers.
      	(lower_omp_1): Handle GIMPLE_ASSIGNs storing into lastprivate
      	conditional variables.
      	* omp-expand.c (determine_parallel_type): Punt if OMP_CLAUSE__CONDTEMP_
      	clause is present.
      	(expand_omp_for_generic, expand_omp_for_static_nochunk,
      	expand_omp_for_static_chunk): Handle lastprivate conditional.
      	(expand_omp_for): Handle fd.lastprivate_conditional like
      	fd.have_reductemp.
      gcc/testsuite/
      	* c-c++-common/gomp/lastprivate-conditional-2.c (foo): Don't expect
      	sorry for omp for.
      	* c-c++-common/gomp/lastprivate-conditional-3.c: New test.
      libgomp/
      	* testsuite/libgomp.c-c++-common/lastprivate-conditional-1.c: New test.
      	* testsuite/libgomp.c-c++-common/lastprivate-conditional-2.c: New test.
      
      From-SVN: r271610
      Jakub Jelinek committed
    • re PR middle-end/90607 (gcc.dg/pr53265.c FAILs) · dbd59515
      2019-05-24  Richard Biener  <rguenther@suse.de>
      
      	PR testsuite/90607
      	* tree-loop-distribution.c (struct partition): Add location
      	member.
      	(partition_alloc): Initialize all fields.
      	(generate_memset_builtin): Use the location recorded in the
      	partition for the generated call.
      	(generate_memcpy_builtin): Likewise.
      	(classify_partition): Record the location of a single store
      	as location for the partition.
      
      	* gcc.dg/pr53265.c: Amend for new expected diagnostic.
      
      From-SVN: r271601
      Richard Biener committed
    • re PR tree-optimization/90106 (builtin sqrt() ignoring libm's sqrt call result) · 64124cef
      	PR tree-optimization/90106
      	PR testsuite/90517
      	* gcc.dg/cdce1.c: Don't scan-assembler, instead -fdump-tree-optimized
      	and scan-tree-dump for tail call.
      	* gcc.dg/cdce2.c: Likewise.
      
      From-SVN: r271598
      Jakub Jelinek committed
    • add missed Changelog. · 9453b779
      From-SVN: r271592
      Iain Sandoe committed
    • Darwin, x86, testsuite - Adjust test labels. · 4ef1d2e2
      A couple of the i386.exp tests fail because the label spelling used
      is different between ELF and Mach-O targets. Adjusted here.
      
      2019-05-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/i386/pr67985-2.c: Adjust label checks for
      	Darwin.
      	* gcc.target/i386/pr77881.c: Likewise.
      
      From-SVN: r271590
      Iain Sandoe committed
    • Darwin, x86, testsuite - Disable tests that cannot pass. · 3d61c31f
      A few of the i386.exp target tests cannot pass on Darwin
      because either the port doesn't support a feature, or the
      ABI demands sufficiently different codegen that matching
      the output with scan-asms would require a different test.
      
      Disabling those tests here.
      
      2019-05-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/i386/falign-functions-2.c: Skip for Darwin.
      	* gcc.target/i386/pr70738-7.c: Likewise.
      	* gcc.target/i386/pr24414.c: Likewise.
      
      From-SVN: r271589
      Iain Sandoe committed
  5. 23 May, 2019 13 commits
    • darwin, x86 - disable '-mfentry' for the port. · aa992ce7
      This can't work without special support because placing
      the call directly after the function label breaks the
      ABI requirement that call sites are 16byte aligned.
      
      gcc/
      
      2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>
      
             * config/i386/darwin.h: Reject -mfentry*.
             * doc/sourcebuild.texi: Document mfentry target support.
      
      gcc/testsuite/
      
      2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>
      
             * lib/target-supports.exp (check_effective_target_mfentry): New.
             * gcc.target/i386/fentry-override.c: Require effective target mfentry.
             * gcc/testsuite/gcc.target/i386/fentry.c: Likewise
             * gcc.target/i386/fentryname1.c: Likewise
             * gcc.target/i386/fentryname2.c: Likewise
             * gcc.target/i386/fentryname3.c: Likewise
             * gcc.target/i386/nop-mcount.c: Likewise
             * gcc.target/i386/pr82699-2.c: Likewise
             * gcc.target/i386/pr82699-4.c: Likewise
             * gcc.target/i386/pr82699-5.c: Likewise
             * gcc.target/i386/pr82699-6.c: Likewise
             * gcc.target/i386/returninst1.c: Likewise
             * gcc.target/i386/returninst2.c: Likewise
             * gcc.target/i386/returninst3.c : Likewise
      
      From-SVN: r271580
      Iain Sandoe committed
    • rs6000.c (rs6000_global_entry_point_needed_p): Rename to… · 99f84323
      rs6000.c (rs6000_global_entry_point_needed_p): Rename to rs6000_global_entry_point_prologue_needed_p.
      
      [gcc]
      
      2019-05-22  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      	* config/rs6000/rs6000.c (rs6000_global_entry_point_needed_p):
      	Rename to rs6000_global_entry_point_prologue_needed_p.  Return
      	false for PC-relative functions.
      	(rs6000_output_function_prologue): Change called function name to
      	rs6000_global_entry_point_prologue_needed_p.  Emit ".localentry
      	name,1" for PC-relative functions.
      	(rs6000_elf_declare_function_name): Change called function name to
      	rs6000_global_entry_point_prologue_needed_p.
      
      [gcc/testsuite]
      
      2019-05-22  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      	* gcc.target/powerpc/localentry-1.c: New file.
      
      From-SVN: r271577
      Bill Schmidt committed
    • re PR target/90552 (attribute((optimize(3))) not overriding -Os) · 103d91c7
      	PR target/90552
      	* config/i386/i386.c (gen_rtx_cost):
      	Use ix86_tune_cost instead of ix86_cost.
      
      testsuite/ChangeLog:
      
      	PR target/90552
      	* gcc.target/i386/pr90552.c: New test.
      
      From-SVN: r271576
      Uros Bizjak committed
    • fmt_f_default_field_width_1.f90: Hide REAL(16) behind __GFC_REAL_16__. · f58be48c
      2019-05-23  Mark Eggleston  <mark.eggleston@codethink.com>
      
      	* gfortran.dg/fmt_f_default_field_width_1.f90: Hide REAL(16) behind
      	__GFC_REAL_16__.  Add -cpp to dg-options.
      	* gfortran.dg/fmt_f_default_field_width_2.f90: Ditto.
      	* gfortran.dg/fmt_f_default_field_width_3.f90: Ditto.
      	* gfortran.dg/fmt_g_default_field_width_1.f90: Ditto.
      	* gfortran.dg/fmt_g_default_field_width_2.f90: Ditto.
      	* gfortran.dg/fmt_g_default_field_width_3.f90: Ditto.
      
      From-SVN: r271573
      Mark Eggleston committed
    • Add infrastructure to support -mcpu=future to represent a future · 5fa3b3cb
      architecture level, as yet unnamed.
      
      [gcc]
      
      2019-05-22  Bill Schmidt  <wschmidt@linux.ibm.com>
      	    Michael Meissner  <meissner@linux.ibm.com>
      	    Segher Boessenkool  <segher@kernel.crashing.org>
      
      	* config.gcc: Add future cpu.
      	* config/rs6000/driver-rs6000.c (asm_names): Add future cpu.
      	* config/rs6000/rs6000-cpus.def (ISA_FUTURE_MASKS_SERVER): New
      	#define.
      	(POWERPC_MASKS): Add OPTION_MASK_FUTURE.
      	(RS6000_CPU): New instantiation for future cpu.
      	* config/rs6000/rs6000-opts.h (enum processor_type): Add
      	PROCESSOR_FUTURE.
      	* config/rs6000/rs6000-string.c (expand_compare_loop): Treat
      	PROCESSOR_FUTURE like PROCESSOR_POWER9 for now.
      	* config/rs6000/rs6000-tables.opt: Regenerate.
      	* config/rs6000/rs6000.c (rs6000_option_override_internal): Treat
      	PROCESSOR_FUTURE similarly to PROCESSOR_POWER9 for now.
      	(rs6000_machine_from_flags): Handle future cpu.
      	(rs6000_reassociation_width): Treat PROCESSOR_FUTURE like
      	PROCESSOR_POWER9 for now.
      	(rs6000_adjust_cost): Likewise.
      	(rs6000_issue_rate): Likewise.
      	(rs6000_register_move_cost): Likewise.
      	(rs6000_opt_mask): Add entry for future.
      	* config/rs6000/rs6000.h (ASM_CPU_SPEC): Add future cpu.
      	(MASK_FUTURE): New #define.
      	* config/rs6000/rs6000.md (define_attr "cpu"): Add future cpu.
      	* config/rs6000/rs6000.opt (mfuture): New target option.
      	* doc/invoke.texi (mcpu): Add future cpu.
      
      [gcc/testsuite]
      
      2019-05-22  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      	* gcc.target/powerpc/cpu-future.c: New test.
      
      
      Co-Authored-By: Michael Meissner <meissner@linux.ibm.com>
      Co-Authored-By: Segher Boessenkool <segher@kernel.crashing.org>
      
      From-SVN: r271567
      Bill Schmidt committed
    • re PR tree-optimization/88440 (size optimization of memcpy-like code) · 5879ab5f
      2019-05-23  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/88440
      	* opts.c (default_options_table): Enable -ftree-loop-distribute-patterns
      	at -O[2s]+.
      	* tree-loop-distribution.c (generate_memset_builtin): Fold the
      	generated call.
      	(generate_memcpy_builtin): Likewise.
      	(distribute_loop): Pass in whether to only distribute patterns.
      	(prepare_perfect_loop_nest): Also allow size optimization.
      	(pass_loop_distribution::execute): When optimizing a loop
      	nest for size allow pattern replacement.
      
      	* gcc.dg/tree-ssa/ldist-37.c: New testcase.
      	* gcc.dg/tree-ssa/ldist-38.c: Likewise.
      	* gcc.dg/vect/vect.exp: Add -fno-tree-loop-distribute-patterns.
      	* gcc.dg/tree-ssa/ldist-37.c: Adjust.
      	* gcc.dg/tree-ssa/ldist-38.c: Likewise.
      	* g++.dg/tree-ssa/pr78847.C: Likewise.
      	* gcc.dg/autopar/pr39500-1.c: Likewise.
      	* gcc.dg/autopar/reduc-1char.c: Likewise.
      	* gcc.dg/autopar/reduc-7.c: Likewise.
      	* gcc.dg/tree-ssa/ivopts-lt-2.c: Likewise.
      	* gcc.dg/tree-ssa/ivopts-lt.c: Likewise.
      	* gcc.dg/tree-ssa/predcom-dse-1.c: Likewise.
      	* gcc.dg/tree-ssa/predcom-dse-2.c: Likewise.
      	* gcc.dg/tree-ssa/predcom-dse-3.c: Likewise.
      	* gcc.dg/tree-ssa/predcom-dse-4.c: Likewise.
      	* gcc.dg/tree-ssa/prefetch-7.c: Likewise.
      	* gcc.dg/tree-ssa/prefetch-8.c: Likewise.
      	* gcc.dg/tree-ssa/prefetch-9.c: Likewise.
      	* gcc.dg/tree-ssa/scev-11.c: Likewise.
      	* gcc.dg/vect/costmodel/i386/costmodel-vect-31.c: Likewise.
      	* gcc.dg/vect/costmodel/i386/costmodel-vect-33.c: Likewise.
      	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c: Likewise.
      	* gcc.dg/vect/costmodel/x86_64/costmodel-vect-33.c: Likewise.
      	* gcc.target/i386/pr30970.c: Likewise.
      	* gcc.target/i386/vect-double-1.c: Likewise.
      	* gcc.target/i386/vect-double-2.c: Likewise.
      	* gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
      	* gcc.dg/tree-ssa/gen-vect-26.c: Likewise.
      	* gcc.dg/tree-ssa/gen-vect-28.c: Likewise.
      	* gcc.dg/tree-ssa/gen-vect-32.c: Likewise.
      	* gfortran.dg/vect/vect-5.f90: Likewise.
      	* gfortran.dg/vect/vect-8.f90: Likewise.
      
      From-SVN: r271553
      Richard Biener committed
    • Do not instrument static target_expr for use-after-scope (PR sanitizer/90570). · 832ece86
      2019-05-23  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/90570
      	* gimplify.c (gimplify_target_expr): Skip TREE_STATIC target
      	expression similarly to gimplify_decl_expr.
      2019-05-23  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/90570
      	* g++.dg/asan/pr90570.C: New test.
      
      From-SVN: r271548
      Martin Liska committed
    • * gnat.dg/opt78.ad[sb]: New test. · 02b73313
      From-SVN: r271545
      Eric Botcazou committed
    • x86, testsuite - update fuse-caller-save tests. · 8f5b46e9
      These tests had started to XPASS on pic targets where
      the codegen is now as expected.
      
      gcc/testsuite/
      
      2019-05-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	PR rtl-optimisation/64895
      	* gcc.target/i386/fuse-caller-save-rec.c: Remove XFAILs.
      	* gcc.target/i386/fuse-caller-save.c: Likewise.
      	* gcc.target/i386/fuse-caller-save-xmm.c: Adjust tests for
      	PIC cases, remove XFAILs.
      
      From-SVN: r271544
      Iain Sandoe committed
    • [PR90510] Adjust 'brig.dg/test/gimple/packed.hsail' · 1ccd0ccb
      ... for r271463 "Fix PR90510, VEC_PERM -> BIT_INSERT folding".
      
      	gcc/testsuite/
      	PR middle-end/90510
      	* brig.dg/test/gimple/packed.hsail: Adjust.
      
      From-SVN: r271540
      Thomas Schwinge committed
    • * g++.dg/cpp2a/is-constant-evaluated8.C: New test. · 07bcb2b4
      From-SVN: r271538
      Jakub Jelinek committed
    • There was a regression for gfortran.dg/fmt_en.f90 for cris-elf that on... · 6dac25d1
      There was a regression for gfortran.dg/fmt_en.f90 for cris-elf
      that on inspection was due to it having acquired a truncation
      call through the runtime.  I updated that and the new tests that
      had "Fortran runtime error: required ftruncate or chsize support
      not present" messages in gfortran.log, ran past cris-elf and
      committed as obvious.  See also
      <https://gcc.gnu.org/ml/gcc-patches/2008-05/msg00975.html> from
      which I copy-pasted most of this message.  (Yep, 11 years ago.)
      
      gcc/testsuite:
      	* gfortran.dg/dec_io_1.f90, gfortran.dg/dtio_1.f90,
      	gfortran.dg/dtio_12.f90, gfortran.dg/fmt_en.f90,
      	gfortran.dg/namelist_89.f90: Gate test on effective_target
      	fd_truncate.
      
      From-SVN: r271536
      Hans-Peter Nilsson committed
    • Bulletproof -fdiagnostics-format=json against bad locations (PR c++/90462) · 30d3ba51
      PR c++/90462 reports an ICE with -fdiagnostics-format=json when
      attempting to serialize a malformed location to JSON.
      
      The compound location_t in question has meaningful "caret" and "start"
      locations, but has UNKNOWN_LOCATION for its "finish" location,
      leading to a NULL pointer dereference when attempting to build a JSON
      string for the filename.
      
      This patch bulletproofs the JSON output so that attempts to write
      a JSON object for a location with a NULL file will lead to an object
      with no "file" key, and attempts to write a compound location with
      UNKNOWN_LOCATION for its start or finish will lead to the corresponding
      JSON child object being omitted.
      
      This patch also adds a json::object::get member function, for self-testing
      the above.
      
      gcc/ChangeLog:
      	PR c++/90462
      	* diagnostic-format-json.cc: Include "selftest.h".
      	(json_from_expanded_location): Only add "file" key for non-NULL
      	file strings.
      	(json_from_location_range): Don't add "start" and "finish"
      	children if they are UNKNOWN_LOCATION.
      	(selftest::test_unknown_location): New selftest.
      	(selftest::test_bad_endpoints): New selftest.
      	(selftest::diagnostic_format_json_cc_tests): New function.
      	* json.cc (json::object::get): New function.
      	(selftest::test_object_get): New selftest.
      	(selftest::json_cc_tests): Call it.
      	* json.h (json::object::get): New decl.
      	* selftest-run-tests.c (selftest::run_tests): Call
      	selftest::diagnostic_format_json_cc_tests.
      	* selftest.h (selftest::diagnostic_format_json_cc_tests): New
      	decl.
      
      gcc/testsuite/ChangeLog:
      	PR c++/90462
      	* g++.dg/pr90462.C: New test.
      
      From-SVN: r271535
      David Malcolm committed
  6. 22 May, 2019 7 commits
    • udlit-char-template-neg.C: Expect the error on a different line. · dd2ce663
      	* g++.dg/cpp1y/udlit-char-template-neg.C: Expect the error on a
      	different line.  Check the column number too.
      
      From-SVN: r271530
      Marek Polacek committed
    • vect-signbitf.c (dg-final): Improve scan-assembler-not string to avoid false… · 9ee0fb4c
      vect-signbitf.c (dg-final): Improve scan-assembler-not string to avoid false matching on 32bit targets.
      
      	* gcc.target/i386/vect-signbitf.c (dg-final): Improve
      	scan-assembler-not string to avoid false matching on 32bit targets.
      
      From-SVN: r271520
      Uros Bizjak committed
    • x86: Don't allocate stack frame nor align stack if not needed · c2080a1f
      get_frame_size () returns used stack slots during compilation, which
      may be optimized out later.  This patch does the followings:
      
      1. Add stack_frame_required to machine_function to indicate that the
      function needs a stack frame.
      2. Change ix86_find_max_used_stack_alignment to set stack_frame_required.
      3. Always call ix86_find_max_used_stack_alignment to check if stack
      frame is needed.
      
      Tested on i686 and x86-64 with
      
      --with-arch=native --with-cpu=native
      
      Tested on AVX512 machine configured with
      
      --with-arch=native --with-cpu=native
      
      gcc/
      
      	PR target/88483
      	* config/i386/i386-options.c (ix86_init_machine_status): Set
      	stack_frame_required to true.
      	* config/i386/i386.c (ix86_get_frame_size): New function.
      	(ix86_frame_pointer_required): Replace get_frame_size with
      	ix86_get_frame_size.
      	(ix86_compute_frame_layout): Likewise.
      	(ix86_find_max_used_stack_alignment): Changed to void.  Set
      	stack_frame_required.
      	(ix86_finalize_stack_frame_flags): Always call
      	ix86_find_max_used_stack_alignment.  Replace get_frame_size with
      	ix86_get_frame_size.
      	* config/i386/i386.h (machine_function): Add stack_frame_required.
      
      gcc/testsuite/
      
      	PR target/88483
      	* gcc.target/i386/stackalign/pr88483-1.c: New test.
      	* gcc.target/i386/stackalign/pr88483-2.c: Likewise.
      
      From-SVN: r271517
      H.J. Lu committed
    • Fix new coarray failures. · ee49c5a4
      2019-05-22  Andrew Stubbs  <ams@codesourcery.com>
      
      	gcc/testsuite/
      	* gfortran.dg/coarray_lock_7.f90: Fix output patterns.
      
      From-SVN: r271513
      Andrew Stubbs committed
    • fortran/89100: Default widths with -fdec-format-defaults · 88a8126a
      gcc/fortran ChangeLog:
      
      2019-05-22  Jeff Law  <law@redhat.com>
                  Mark Eggleston  <mark.eggleston@codethink.com>
      
              PR fortran/89100
              * gfortran.texi: Add Default widths for F, G and I format
              descriptors to Extensions section.
              * invoke.texi: Add -fdec-format-defaults
              * io.c (check_format): Use default widths for i, f and g when
              flag_dec_format_defaults is enabled.
              * lang.opt: Add new option.
              * options.c (set_dec_flags): Add SET_BITFLAG for
              flag_dec_format_defaults.
      
      
      gcc/testsuite ChangeLog:
      
      2019-05-22  Mark Eggleston  <mark.eggleston@codethink.com>
      
              PR fortran/89100
              * gfortran.dg/fmt_f_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_f_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_f_default_field_width_3.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_g_default_field_width_3.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_1.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_2.f90: New test.
              * gfortran.dg/fmt_i_default_field_width_3.f90: New test.
      
      
      libgfortran ChangeLog:
      
      2019-05-22  Jeff Law  <law@redhat.com>
      
              PR fortran/89100
              * io/format.c (parse_format_list): set default width when the
              IOPARM_DT_DEC_EXT flag is set for i, f and g.
              * io/io.h: add default_width_for_integer, default_width_for_float
              and default_precision_for_float.
              * io/write.c (write_boz): extra parameter giving length of data
              corresponding to the type's kind.
              (write_b): pass data length as extra parameter in calls to
              write_boz.
              (write_o): pass data length as extra parameter in calls to
              write_boz.
              (write_z): pass data length as extra parameter in calls to
              write_boz.
              (size_from_kind): also set size is default width is set.
              * io/write_float.def (build_float_string): new paramter inserted
              before result parameter. If default width use values passed
              instead of the values in fnode.
              (FORMAT_FLOAT): macro modified to check for default width and
              calls to build_float_string to pass in default width.
              (get_float_string): set width and precision to defaults when
              needed.
      
      From-SVN: r271511
      Janne Blomqvist committed
    • Do not use quotes in tests (PR testsuite/90564). · a6149853
      2019-05-22  Martin Liska  <mliska@suse.cz>
      
      	PR testsuite/90564
      	* gcc.target/powerpc/pr80315-1.c: Remove usage of quotes.
      	* gcc.target/powerpc/pr80315-2.c: Likewise.
      	* gcc.target/powerpc/pr80315-3.c: Likewise.
      	* gcc.target/powerpc/pr80315-4.c: Likewise.
      
      From-SVN: r271509
      Martin Liska committed
    • Fix wrong escaping of brackets (PR testsuite/90564). · 0872c677
      2019-05-22  Martin Liska  <mliska@suse.cz>
      
      	PR testsuite/90564
      	* gcc.target/powerpc/pr80315-1.c: Add one extra \ to escape
      	brackets.
      	* gcc.target/powerpc/pr80315-2.c: Likewise.
      	* gcc.target/powerpc/pr80315-3.c: Likewise.
      	* gcc.target/powerpc/pr80315-4.c: Likewise.
      
      From-SVN: r271508
      Martin Liska committed