1. 21 Mar, 2019 16 commits
    • hash-table.h (hash_table): Add Lazy template parameter defaulted to false... · 36a3a7a3
      	* hash-table.h (hash_table): Add Lazy template parameter defaulted
      	to false, if true, don't alloc_entries during construction, but defer
      	it to the first method that needs m_entries allocated.
      	(hash_table::hash_table, hash_table::~hash_table,
      	hash_table::alloc_entries, hash_table::find_empty_slot_for_expand,
      	hash_table::too_empty_p, hash_table::expand, hash_table::empty_slow,
      	hash_table::clear_slot, hash_table::traverse_noresize,
      	hash_table::traverse, hash_table::iterator::slide): Adjust all methods.
      	* hash-set.h (hash_set): Add Lazy template parameter defaulted to
      	false.
      	(hash_set::contains): If Lazy is true, use find_slot_with_hash with
      	NO_INSERT instead of find_with_hash.
      	(hash_set::traverse, hash_set::iterator, hash_set::iterator::m_iter,
      	hash_set::m_table): Add Lazy to template params of hash_table.
      	(gt_ggc_mx, gt_pch_nx): Use false as Lazy in hash_set template param.
      	* attribs.c (test_attribute_exclusions): Likewise.
      	* hash-set-tests.c (test_set_of_strings): Add iterator tests for
      	hash_set.  Add tests for hash_set with Lazy = true.
      c-family/
      	* c-common.c (per_file_includes_t): Use false as Lazy in hash_set
      	template param.
      jit/
      	* jit-recording.c (reproducer::m_set_identifiers): Use false as Lazy
      	in hash_set template param.
      
      From-SVN: r269859
      Jakub Jelinek committed
    • [PR72741] Properly handle clauses specifying the level of parallelism for… · 2e4182ae
      [PR72741] Properly handle clauses specifying the level of parallelism for 'external' Fortran OpenACC routines
      
      ..., so as to also for these enable the generic middle end OMP code to verify
      proper nesting of loops/routines regarding their levels of parallelism.
      
      	gcc/fortran/
      	PR fortran/72741
      	* openmp.c (gfc_match_oacc_routine): Set the level of parallelism
      	for all variants.
      	(gfc_resolve_oacc_routines): Call gfc_add_omp_declare_target.
      	gcc/testsuite/
      	PR fortran/72741
      	* c-c++-common/goacc/routine-3-extern.c: New file.
      	* c-c++-common/goacc/routine-3.c: Adjust.
      	* c-c++-common/goacc/routine-4-extern.c: New file.
      	* c-c++-common/goacc/routine-4.c: Adjust.
      	* gfortran.dg/goacc/routine-module-3.f90: New file.
      	* gfortran.dg/goacc/routine-external-level-of-parallelism-1.f: New
      	file.
      	* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f:
      	Likewise.
      
      Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
      
      From-SVN: r269858
      Thomas Schwinge committed
    • [PR89773] Fortran OpenACC 'routine' directive refuses procedures with implicit EXTERNAL attribute · f6bf4bc1
      	gcc/fortran/
      	PR fortran/89773
      	* gfortran.h (gfc_oacc_routine_name): Add loc member.
      	(gfc_resolve_oacc_routines): Declare.
      	* openmp.c (gfc_match_oacc_routine): Move some error checking
      	into...
      	(gfc_resolve_oacc_routines): ... this new function.
      	* resolve.c (resolve_codes): Call it.
      	gcc/testsuite/
      	PR fortran/89773
      	* gfortran.dg/goacc/pr89773.f90: New file.
      	* gfortran.dg/goacc/pr77765.f90: Adjust.
      	* gfortran.dg/goacc/routine-6.f90: Adjust, and extend.
      
      From-SVN: r269857
      Thomas Schwinge committed
    • [PR72741] The name in a Fortran OpenACC 'routine' directive refers to the… · 8ced98c6
      [PR72741] The name in a Fortran OpenACC 'routine' directive refers to the containing subroutine or function
      
      	gcc/fortran/
      	PR fortran/72741
      	* openmp.c (gfc_match_oacc_routine): Clarify.
      	gcc/testsuite/
      	PR fortran/72741
      	* gfortran.dg/goacc/routine-module-mod-1.f90: Update.
      
      From-SVN: r269856
      Thomas Schwinge committed
    • [PR72741] Encode OpenACC 'routine' directive's level of parallelism inside Fortran module files · 64a40f13
      If 'use'ing with an old GCC a new module file (with OpenACC 'routine'
      directive's level of parallelism encoded), then that expectedly fails as
      follows:
      
          f951: Fatal Error: Reading module 'routine_module_mod_1' at line 27 column 21: find_enum(): Enum not found
      
      If 'use'ing with a new GCC an old module file (without OpenACC 'routine'
      directive's level of parallelism encoded), then that (silently) continues to
      accept the module file, and will proceed with the previous, erroneous behavior.
      
      These seem to be acceptable compromises, instead of incrementing 'MOD_VERSION'.
      
      	gcc/fortran/
      	PR fortran/72741
      	* module.c (verify_OACC_ROUTINE_LOP_NONE): New function.
      	(enum ab_attribute): Add AB_OACC_ROUTINE_LOP_GANG,
      	AB_OACC_ROUTINE_LOP_WORKER, AB_OACC_ROUTINE_LOP_VECTOR,
      	AB_OACC_ROUTINE_LOP_SEQ.
      	(attr_bits): Add these.
      	(mio_symbol_attribute): Handle these.
      	gcc/testsuite/
      	PR fortran/72741
      	* gfortran.dg/goacc/routine-module-1.f90: New file.
      	* gfortran.dg/goacc/routine-module-2.f90: Likewise.
      	* gfortran.dg/goacc/routine-module-mod-1.f90: Likewise.
      
      From-SVN: r269855
      Thomas Schwinge committed
    • [testsuite, Fortran] Provide 'dg-compile-aux-modules' in 'gfortran.dg/goacc/goacc.exp' · 33fc9dc9
      ..., as yet another copy from 'gfortran.dg/dg.exp', which there are a few
      already.
      
      	gcc/testsuite/
      	* gfortran.dg/goacc/goacc.exp (dg-compile-aux-modules): New proc.
      
      From-SVN: r269854
      Thomas Schwinge committed
    • [testsuite] Fix 'dg-compile-aux-modules' diagnostic · a7745743
      	gcc/testsuite/
      	PR fortran/56408
      	* gcc.target/powerpc/ppc-fortran/ppc-fortran.exp
      	(dg-compile-aux-modules): Fix diagnostic.
      	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Likewise.
      	* gfortran.dg/dg.exp (dg-compile-aux-modules): Likewise.
      
      From-SVN: r269851
      Thomas Schwinge committed
    • [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to… · 4c1595d2
      [testsuite, Fortran] Apply DejaGnu 1.4.4 work-around also to 'gfortran.dg/coarray/caf.exp:dg-compile-aux-modules'
      
      See trunk r215293.  This unifies all 'dg-compile-aux-modules' instances.
      
      	gcc/testsuite/
      	PR fortran/56408
      	* gfortran.dg/coarray/caf.exp (dg-compile-aux-modules): Workaround
      	missing nexted dg-test call support in dejaGNU 1.4.4.
      
      From-SVN: r269848
      Thomas Schwinge committed
    • [testsuite, Fortran] Consistently set 'DEFAULT_FFLAGS' · bcb68daa
      In the same 'runtest' instance, 'global' variables persist from one '*.exp'
      file to another.
      
      All other '*.exp' files are using " -pedantic-errors" instead of the empty
      string as the default for 'DEFAULT_FFLAGS'.  Thus this setting of
      'DEFAULT_FFLAGS' is not idempotent, depends on whether
      'gfortran.dg/ieee/ieee.exp', or an other defining '*.exp' file is executed
      first.
      
      	gcc/testsuite/
      	PR fortran/29383
      	* gfortran.dg/ieee/ieee.exp (DEFAULT_FFLAGS): Set the same as in
      	other '*.exp' files.
      
      From-SVN: r269845
      Thomas Schwinge committed
    • re PR middle-end/89779 (internal compiler error: tree check: expected class… · 6d1a7fd4
      re PR middle-end/89779 (internal compiler error: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in tree_nop_conversion_p, at tree.c:12798)
      
      2019-03-21  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/89779
      	* tree.c (tree_nop_conversion): Consolidate and fix defensive
      	checks with respect to released SSA names now having error_mark_node
      	type.
      	* fold-const.c (operand_equal_p): Likewise.
      
      	* gcc.dg/torture/pr89779.c: New testcase.
      
      From-SVN: r269838
      Richard Biener committed
    • In C++17 <math.h> should not put special functions in global namespace · e2186cd8
      IS 29124 8.2 [sf.mathh] says that <math.h> should add the names of the
      special functions to the global namespace.  However, C++17 Annex D
      [depr.c.headers] excludes those functions explicitly, so they should not
      be placed in the global namespace unconditionally for C++17.
      
      Only add them to the global namespace when IS 29124 is explicitly
      requested via the __STDCPP_WANT_MATH_SPEC_FUNCS__ macro.
      
      	* include/c_compatibility/math.h [!__STDCPP_WANT_MATH_SPEC_FUNCS__]
      	(assoc_laguerre, assoc_laguerref, assoc_laguerrel, assoc_legendre)
      	(assoc_legendref, assoc_legendrel, beta, betaf, betal, comp_ellint_1)
      	(comp_ellint_1f, comp_ellint_1l, comp_ellint_2, comp_ellint_2f)
      	(comp_ellint_2l, comp_ellint_3, comp_ellint_3f, comp_ellint_3l)
      	(cyl_bessel_i, cyl_bessel_if, cyl_bessel_il, cyl_bessel_j)
      	(cyl_bessel_jf, cyl_bessel_jl, cyl_bessel_k, cyl_bessel_kf)
      	(cyl_bessel_kl, cyl_neumann, cyl_neumannf, cyl_neumannl, ellint_1)
      	(ellint_1f, ellint_1l, ellint_2, ellint_2f, ellint_2l, ellint_3)
      	(ellint_3f, ellint_3l, expint, expintf, expintl, hermite, hermitef)
      	(hermitel, laguerre, laguerref, laguerrel, legendre, legendref)
      	(legendrel, riemann_zeta, riemann_zetaf, riemann_zetal, sph_bessel)
      	(sph_besself, sph_bessell, sph_legendre, sph_legendref, sph_legendrel)
      	(sph_neumann, sph_neumannf, sph_neumannl): Only add using-declarations
      	when the special functions IS is enabled, not for C++17.
      	* testsuite/26_numerics/headers/cmath/functions_global_c++17.cc:
      	Replace with ...
      	* testsuite/26_numerics/headers/cmath/functions_global.cc: New test,
      	without checks for special functions in C++17.
      	* testsuite/26_numerics/headers/cmath/special_functions_global.cc:
      	New test.
      
      From-SVN: r269837
      Jonathan Wakely committed
    • PR libstdc++/88066 Use <> for includes not "" · 42d9f14b
      These headers were missed in the previous commit for this bug.
      
      There are also several "" includes in the profile mode headers, but
      because they're deprecated I'm not fixing them.
      
      	* include/backward/hash_map: Use <> for includes not "".
      	* include/backward/hash_set: Likewise.
      	* include/backward/strstream: Likewise.
      	* include/tr1/bessel_function.tcc: Likewise.
      	* include/tr1/exp_integral.tcc: Likewise.
      	* include/tr1/legendre_function.tcc: Likewise.
      	* include/tr1/modified_bessel_func.tcc: Likewise.
      	* include/tr1/riemann_zeta.tcc: Likewise.
      
      From-SVN: r269835
      Jonathan Wakely committed
    • re PR c++/78645 (ICE on invalid code (Segmentation fault, cxx_eval_call_expression)) · 6f5df5fd
      2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/78645
      	* g++.dg/cpp0x/constexpr-ice20.C: New.
      
      From-SVN: r269834
      Paolo Carlini committed
    • re PR c++/89571 (ICE in nothrow_spec_p, at cp/except.c:1238) · c6ecc13a
      /cp
      2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/89571
      	* method.c (after_nsdmi_defaulted_late_checks): Avoid passing
      	error_mark_node to comp_except_specs.
      
      /testsuite
      2019-03-21  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/89571
      	* g++.dg/cpp0x/noexcept37.C: New.
      
      From-SVN: r269832
      Paolo Carlini committed
    • Daily bump. · 2aecb44b
      From-SVN: r269831
      GCC Administrator committed
  2. 20 Mar, 2019 6 commits
    • d: Fix ICE force_type_die, at dwarf2out.c using nested types · 9dddefef
      In functions whose return type is instantiated from a nested template,
      make sure that all members of the instance are emitted before finishing
      the outer function, otherwise they will be removed during the
      prune_unused_types pass.
      
      gcc/d/ChangeLog:
      
      2019-03-21  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	PR d/89017
      	* d-codegen.cc (d_decl_context): Skip over template instances when
      	finding the context.
      	* decl.cc (DeclVisitor::visit(TemplateDeclaration)): New override.
      	(build_type_decl): Include parameters in name of template types.
      
      gcc/testsuite/ChangeLog:
      
      2019-03-21  Iain Buclaw  <ibuclaw@gdcproject.org>
      
      	PR d/89017
      	* gdc.dg/pr89017.d: New test.
      
      From-SVN: r269828
      Iain Buclaw committed
    • re PR fortran/71861 ([F03] ICE in write_symbol(): bad module symbol) · 5d2df818
      fix PR 71861
      
      2019-03-20  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/71861
      	* symbol.c (check_conflict): ABSTRACT attribute conflicts with
      	INTRINSIC attribute.
      
      2019-03-20  Janus Weil  <janus@gcc.gnu.org>
      
      	PR fortran/71861
      	* gfortran.dg/interface_abstract_5.f90: New test case.
      
      From-SVN: r269827
      Janus Weil committed
    • PR c++/87480 - decltype of member access in default template arg · 292a8bbb
      The issue here is that declval<T>().d is considered instantiation-dependent
      within a template, as the access to 'd' might depend on the particular
      specialization.  But when we're deducing template arguments for a call, we
      know that the call and the arguments are non-dependent, so we can do the
      substitution as though we aren't in a template.  Which strictly speaking we
      aren't, since the default argument is considered a separate definition.
      
      	* pt.c (type_unification_real): Accept a dependent result in
      	template context.
      
      From-SVN: r269826
      Jason Merrill committed
    • S/390: Fix PR89775. Stackpointer save/restore instructions removed · 3ad7fed1
      Even if a global register is being clobbered in a function we usually
      do not save and restore it. However, we still have to do this if it is
      a special register. Most of the places in the backend handle this
      correctly but not the prologue/epilogue optimization.
      
      gcc/ChangeLog:
      
      2019-03-20  Andreas Krebbel  <krebbel@linux.ibm.com>
      
      	PR target/89775
      	* config/s390/s390.c (global_not_special_regno_p): Move to make it
      	available to ...
      	(s390_optimize_register_info): Use global_not_special_regno_p to
      	check for global regs.
      
      2019-03-20  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/89775
      	* gcc.target/s390/pr89775-1.c: New test.
      	* gcc.target/s390/pr89775-2.c: New test.
      
      From-SVN: r269823
      Andreas Krebbel committed
    • re PR target/89752 (ICE in emit_move_insn, at expr.c:3723) · a5b821e4
      	PR target/89752
      	* lra-constraints.c (process_alt_operands) <reg>: For BLKmode, don't
      	update this_alternative nor this_alternative_set.
      
      	* g++.target/aarch64/aarch64.exp: New file.
      	* g++.target/aarch64/pr89752.C: New test.
      
      From-SVN: r269819
      Jakub Jelinek committed
    • Daily bump. · 7f129d6f
      From-SVN: r269817
      GCC Administrator committed
  3. 19 Mar, 2019 18 commits