Skip to content
Snippets Groups Projects
  1. May 19, 2021
  2. May 18, 2021
    • Mike Frysinger's avatar
      sim: depend on gnulib · 17af39e1
      Mike Frysinger authored
      We're going to start using gnulib in the sim, so make sure it exists.
      
      ChangeLog:
      
      	* Makefile.def: Add configure-sim dependency on all-gnulib.
      	* Makefile.in: Regenerated.
      17af39e1
    • Bill Schmidt's avatar
      rs6000: Remove old psabi warnings · 79cf0004
      Bill Schmidt authored
      Long ago we were forced to make some small ABI breaks to correct errors
      in the implementation, and we added warning messages for the changes
      from GCC 4.9 to GCC 5.  Enough time has passed that these are now just
      irritants, so let's remove them.  Also clean up associated macros using
      rs6000_special_adjust_field_align_p, which has been always returning
      false for a long time.
      
      2021-05-18  Bill Schmidt  <wschmidt@linux.ibm.com>
      
      gcc/
      	* config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Remove call to
      	rs6000_special_adjust_field_align_p.
      	* config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
      	* config/rs6000/rs6000-call.c (rs6000_function_arg_boundary):
      	Remove ABI warning.
      	(rs6000_function_arg): Likewise.
      	* config/rs6000/rs6000-protos.h
      	(rs6000_special_adjust_field_align_p): Remove prototype.
      	* config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
      	Remove.
      	* config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Remove call to
      	rs6000_special_adjust_field_align_p.
      
      gcc/testsuite/
      	* gcc.target/powerpc/ppc64-abi-warn-1.c: Remove.
      	* gcc.target/powerpc/ppc64-abi-warn-2.c: Remove.
      	* gcc.target/powerpc/ppc64-abi-warn-3.c: Remove.
      79cf0004
    • Iain Buclaw's avatar
      d: Use filename_ncmp instead of strncmp · 5c66a1a3
      Iain Buclaw authored
      gcc/d/ChangeLog:
      
      	* d-incpath.cc (prefixed_path): Use filename_ncmp instead of strncmp.
      5c66a1a3
    • Iain Buclaw's avatar
      d: Use startswith function instead of strncmp · f87ce014
      Iain Buclaw authored
      gcc/d/ChangeLog:
      
      	* types.cc (TypeVisitor::visit (TypeEnum *)): Use startswith function
      	instead of strncmp.
      f87ce014
    • Iain Buclaw's avatar
      d: Revert "Come up with startswith function." · 3e0ad856
      Iain Buclaw authored
      This reverts changes to the DMD front-end in commit
      6ba3079d.
      
      Changes were incorrectly committed directly to the GCC repo instead of
      the master repository.
      
      gcc/d/ChangeLog:
      
      	* dmd/dinterpret.c (evaluateIfBuiltin): Revert last change.
      	* dmd/dmangle.c: Likewise.
      	* dmd/hdrgen.c: Likewise.
      	* dmd/identifier.c (Identifier::toHChars2): Likewise.
      3e0ad856
    • Marek Polacek's avatar
      c++: Prune dead functions. · fef7c899
      Marek Polacek authored
      I was looking at the LCOV coverage report for the C++ FE and
      found a bunch of unused functions that I think we can remove.
      Obviously, I left alone various dump_* and debug_* routines.
      I haven't removed cp_build_function_call although it is also
      currently unused.
      
      * lambda_return_type: was used in parser.c in GCC 7, unused since r255950,
      * classtype_has_non_deleted_copy_ctor: appeared in GCC 10, its usage
        was removed in c++/95350,
      * contains_wildcard_p: used in GCC 9, unused since r276764,
      * get_template_head_requirements: seems to never have been used,
      * check_constrained_friend: seems to never have been used,
      * subsumes_constraints: unused since r276764,
      * push_void_library_fn: usage removed in r248328,
      * get_template_parms_at_level: unused since r157857,
      * get_pattern_parm: unused since r275387.
      
      (Some of the seemingly unused functions, such as set_global_friend, are
      actually used in libcc1.)
      
      gcc/cp/ChangeLog:
      
      	* class.c (classtype_has_non_deleted_copy_ctor): Remove.
      	* constraint.cc (contains_wildcard_p): Likewise.
      	(get_template_head_requirements): Likewise.
      	(check_constrained_friend): Likewise.
      	(subsumes_constraints): Likewise.
      	* cp-tree.h (classtype_has_non_deleted_copy_ctor): Likewise.
      	(push_void_library_fn): Likewise.
      	(get_pattern_parm): Likewise.
      	(get_template_parms_at_level): Likewise.
      	(lambda_return_type): Likewise.
      	(get_template_head_requirements): Likewise.
      	(check_constrained_friend): Likewise.
      	(subsumes_constraints): Likewise.
      	* decl.c (push_void_library_fn): Likewise.
      	* lambda.c (lambda_return_type): Likewise.
      	* pt.c (get_template_parms_at_level): Likewise.
      	(get_pattern_parm): Likewise.
      fef7c899
    • Jason Merrill's avatar
      c++: non-static member, decltype, {} [PR100205] · 8c114759
      Jason Merrill authored
      This test was fixed by my second patch for PR93314, which distinguishes
      between constant-expression and potentially-constant-evaluated contexts in a
      way that my first patch did not.
      
      	PR c++/100205
      	PR c++/99314
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/decltype-nonstatic1.C: New test.
      8c114759
    • Jason Merrill's avatar
      c++: "perfect" implicitly deleted move [PR100644] · f71ca97d
      Jason Merrill authored
      Here we were ignoring the template constructor because the implicit move
      constructor had all perfect conversions.  But CWG1402 says that an
      implicitly deleted move constructor is ignored by overload resolution; we
      implement that instead by preferring any other candidate in joust, to get
      better diagnostics, but that means we need to handle that case here as well.
      
      gcc/cp/ChangeLog:
      
      	PR c++/100644
      	* call.c (perfect_candidate_p): An implicitly deleted move
      	is not perfect.
      
      gcc/testsuite/ChangeLog:
      
      	* g++.dg/cpp0x/implicit-delete1.C: New test.
      f71ca97d
    • David Malcolm's avatar
      analyzer: fix missing leak after call to strsep [PR100615] · cd323d97
      David Malcolm authored
      PR analyzer/100615 reports a missing leak diagnostic.
      The issue is that the code calls strsep which the analyzer doesn't
      have special knowledge of, and so conservatively assumes that it
      could free the pointer, so drops malloc state for it.
      
      Properly "teaching" the analyzer about strsep would require it
      to support bifurcating state at a call, which is currently fiddly to
      do, so for now this patch notes that strsep doesn't affect the
      malloc state machine, allowing the analyzer to correctly detect the leak.
      
      gcc/analyzer/ChangeLog:
      	PR analyzer/100615
      	* sm-malloc.cc: Include "analyzer/function-set.h".
      	(malloc_state_machine::on_stmt): Call unaffected_by_call_p and
      	bail on the functions it recognizes.
      	(malloc_state_machine::unaffected_by_call_p): New.
      
      gcc/testsuite/ChangeLog:
      	PR analyzer/100615
      	* gcc.dg/analyzer/pr100615.c: New test.
      cd323d97
    • Uros Bizjak's avatar
      i386: Implement 4-byte vector support [PR100637] · 46ca31d6
      Uros Bizjak authored
      Add infrastructure, logic and arithmetic support for 4-byte vectors.
      These can be used with SSE2 targets, where movd instructions from/to
      XMM registers are available.  x86_64 ABI passes 4-byte vectors in
      integer registers, so also add logic operations with integer registers.
      
      2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/
      	PR target/100637
      	* config/i386/i386.h (VALID_SSE2_REG_MODE):
      	Add V4QI and V2HI modes.
      	(VALID_INT_MODE_P): Ditto.
      	* config/i386/mmx.md (VI_32): New mode iterator.
      	(mmxvecsize): Handle V4QI and V2HI.
      	(Yv_Yw): Ditto.
      	(mov<VI_32:mode>): New expander.
      	(*mov<mode>_internal): New insn pattern.
      	(movmisalign<VI_32:mode>): New expander.
      	(neg<VI_32:mode>): New expander.
      	(<plusminus:insn><VI_32:mode>3): New expander.
      	(*<plusminus:insn><VI_32:mode>3): New insn pattern.
      	(mulv2hi3): New expander.
      	(*mulv2hi3): New insn pattern.
      	(one_cmpl<VI_32:mode>2): New expander.
      	(*andnot<VI_32:mode>3): New insn pattern.
      	(<any_logic:code><VI_32:mode>3): New expander.
      	(*<any_logic:code><VI_32:mode>3): New insn pattern.
      
      gcc/testsuite/
      
      	PR target/100637
      	* gcc.target/i386/pr100637-1b.c: New test.
      	* gcc.target/i386/pr100637-1w.c: Ditto.
      
      	* gcc.target/i386/pr92658-avx2-2.c: Do not XFAIL scan for pmovsxbq.
      	* gcc.target/i386/pr92658-avx2.c: Do not XFAIL scan for pmovzxbq.
      	* gcc.target/i386/pr92658-avx512vl.c: Do not XFAIL scan for vpmovdb.
      	* gcc.target/i386/pr92658-sse4-2.c: Do not XFAIL scan for
      	pmovsxbd and pmovsxwq.
      	* gcc.target/i386/pr92658-sse4.c: Do not XFAIL scan for
      	pmovzxbd and pmovzxwq.
      46ca31d6
    • Mike Frysinger's avatar
      config: delete unused sim macros · 7d3711a5
      Mike Frysinger authored
      Nothing in gcc or binutils or gdb or anything anywhere uses these.
      
      config/
      
      	* acinclude.m4 (CYG_AC_PATH_SIM, CYG_AC_PATH_DEVO): Delete.
      7d3711a5
    • Tobias Burnus's avatar
      Fortran/OpenMP: Add missing EXEC_OMP_DEPOBJ case val [PR100642] · cc193ac8
      Tobias Burnus authored
      	PR fortran/100642
      
      gcc/fortran/ChangeLog:
      
      	* openmp.c (omp_code_to_statement): Add missing EXEC_OMP_DEPOBJ.
      
      gcc/testsuite/ChangeLog:
      
      	* gfortran.dg/goacc-gomp/depobj.f90: New test.
      cc193ac8
    • Patrick Palka's avatar
      libstdc++: Fix access issue in elements_view::_Sentinel [PR100631] · 38751c4d
      Patrick Palka authored
      In the earlier commit r12-854 I forgot to also rewrite the other operator-
      overload in terms of the split-out member function _M_distance_from.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/100631
      	* include/std/ranges (elements_view::_Sentinel::operator-): Use
      	_M_distance_from in the other operator- overload too.
      	* testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
      38751c4d
    • Uros Bizjak's avatar
      i386: Fix <any_extend:insn>v4qiv4di2 expander · 8b9484c5
      Uros Bizjak authored
      Fix a mode mismatch.
      
      2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/
      	* config/i386/sse.md (<any_extend:insn>v4qiv4di2):
      	Fix a mode mismatch with operand 1.
      8b9484c5
    • Uros Bizjak's avatar
      i386: Fix split_double_mode with paradoxical subreg [PR100626] · d39fbed7
      Uros Bizjak authored
      split_double_mode calls simplify_gen_subreg, which fails for the
      high half of the paradoxical subreg.  Return temporary register
      instead of NULL RTX in this case.
      
      2021-05-18  Uroš Bizjak  <ubizjak@gmail.com>
      
      gcc/
      	PR target/100626
      	* config/i386/i386-expand.c (split_double_mode): Return
      	temporary register when simplify_gen_subreg fails with
      	the high half od the paradoxical subreg.
      d39fbed7
    • Richard Biener's avatar
      Avoid setting TREE_ADDRESSABLE on stack vars during RTL expansion · d3a0208e
      Richard Biener authored
      This avoids setting TREE_ADDRESSABLE on variables we want to force to
      the stack.  Instead track those in a temporary bitmap and force
      stack expansion that way, leaving TREE_ADDRESSABLE alone, not
      pessimizing future alias queries.
      
      2021-05-17  Richard Biener  <rguenther@suse.de>
      
      	* cfgexpand.c (expand_one_var): Pass in forced_stack_var
      	and honor it when expanding.
      	(expand_used_vars_for_block): Pass through forced_stack_var.
      	(expand_used_vars): Likewise.
      	(discover_nonconstant_array_refs_r): Set bits in
      	forced_stack_vars instead of marking vars TREE_ADDRESSABLE.
      	(avoid_type_punning_on_regs): Likewise.
      	(discover_nonconstant_array_refs): Likewise.
      	(pass_expand::execute): Create and pass down forced_stack_var
      	bitmap.  For parameters and returns temporarily set
      	TREE_ADDRESSABLE when expand_function_start.
      d3a0208e
    • Thomas Schwinge's avatar
      [libgomp, testsuite] Don't shadow global 'offload_targets' variable · b5c3145a
      Thomas Schwinge authored
      See local 'offload_targets' variable in
      'libgomp/testsuite/lib/libgomp.exp:libgomp_check_effective_target_offload_target'
      vs. global 'libgomp/testsuite/libgomp-test-support.exp.in:offload_targets'
      variable.
      
      	libgomp/
      	* testsuite/lib/libgomp.exp
      	(check_effective_target_offload_target_nvptx): Don't shadow global
      	'offload_targets' variable.
      b5c3145a
    • Thomas Schwinge's avatar
      'libgomp.c-c++-common/reduction-{5,6}.c': Restrict '-latomic' to nvptx offloading compilation · 937fa5fb
      Thomas Schwinge authored
      Fix-up for recent commit 33b64795
      "OpenMP: Fix SIMT for complex/float reduction with && and ||"; see
      commit d42088e4 "Avoid -latomic for amdgcn
      offloading".
      
      	libgomp/
      	* testsuite/libgomp.c-c++-common/reduction-5.c: Restrict
      	'-latomic' to nvptx offloading compilation.
      	* testsuite/libgomp.c-c++-common/reduction-6.c: Likewise.
      937fa5fb
    • Thomas Schwinge's avatar
      'libgomp.c/target-44.c': Restrict '-latomic' to nvptx offloading compilation · abf937ac
      Thomas Schwinge authored
      Fix-up for recent commit f87990a2
      "[openmp, simt] Disable SIMT for user-defined reduction"; see commit
      d42088e4 "Avoid -latomic for amdgcn
      offloading".
      
      	libgomp/
      	* testsuite/libgomp.c/target-44.c: Restrict '-latomic' to nvptx
      	offloading compilation.
      abf937ac
    • Thomas Schwinge's avatar
      Add 'dg-note', 'dg-lto-note' · 03eb7791
      Thomas Schwinge authored
      That's 'dg-message "note: [...]"' with a twist: inhibit default notes pruning,
      such that "if 'dg-note' is used at least once in a testcase, [notes] are not
      pruned and instead must *all* be handled explicitly".
      
      The rationale is that either you're not interested in notes at all (default
      behavior of pruning all notes), but often, when you're interested in one note,
      you're in fact interested in all notes, and especially interested if
      *additional* notes appear over time, as GCC evolves.
      
      	gcc/testsuite/
      	* lib/gcc-dg.exp: Implement 'dg-note'.
      	* lib/prune.exp: Likewise.
      	* gcc.dg/vect/nodump-vect-opt-info-2.c: Use 'dg-note', and
      	'dg-prune-output "note: ".
      	* gfortran.dg/goacc/routine-external-level-of-parallelism-2.f: Use
      	'dg-note', match up additional notes, one class of them with
      	XFAILed 'dg-bogus'.
      	* lib/lto.exp: Implement 'dg-lto-note'.
      	* g++.dg/lto/odr-1_0.C: Use 'dg-lto-note', match up additional
      	notes.
      	* g++.dg/lto/odr-1_1.C: Likewise.
      	* g++.dg/lto/odr-2_1.C: Likewise.
      	libstdc++-v3/
      	* testsuite/lib/prune.exp: Add note about 'dg-note'.
      	gcc/
      	* doc/sourcebuild.texi: Document 'dg-note'.
      03eb7791
    • Tobias Burnus's avatar
      gcc/configure.ac: Fix cross build by using $(CFLAGS-$@) [PR100598] · 5116b54e
      Tobias Burnus authored
      BUILD_CFLAGS is set by configure; by default, BUILD_CFLAGS = $(ALL_CFLAGS)
      is used. The latter contains (see gcc/Makefile.in) $(CFLAGS-$@), which is used
      to pass .o-file specific flags to the compiler.
      For cross builds, BUILD_CFLAGS is constructed in configure{,.ac} and missed
      the $(CFLAGS-$@) - despite the comment above ALL_CFLAGS that configure.ac
      might have to kept in sync.
      
      gcc/ChangeLog:
      
      	PR other/100598
      	* configure: Regenerate.
      	* configure.ac (BUILD_CFLAG, BUILD_CXXFLAGS): Add $(CFLAGS-$@).
      5116b54e
    • Thomas Schwinge's avatar
      [OMP] Tighten 'is_gimple_omp_oacc' · e1cca880
      Thomas Schwinge authored
      No overall change in behavior.
      
      	gcc/
      	* gimple.h (is_gimple_omp_oacc): Tighten.
      	* omp-low.c (check_omp_nesting_restrictions): Adjust.
      e1cca880
    • Richard Biener's avatar
      operand scanner TLC · 3e2c7158
      Richard Biener authored
      This applies some TLC to mark_address_taken which ends up setting
      TREE_ADDRESSABLE on nodes where it doesn't have any semantics.
      It also does work (incomplete) that get_base_address already does,
      likewise we'll never get WITH_SIZE_EXPR in this context and thus
      get_base_address never fails.
      
      2021-05-18  Richard Biener  <rguenther@suse.de>
      
      	* tree-ssa-operands.c (mark_address_taken): Simplify.
      3e2c7158
    • Martin Liska's avatar
      startswith: Fix offloading targets. · 6806469d
      Martin Liska authored
      gcc/ChangeLog:
      
      	* config/gcn/mkoffload.c (STR): Redefine.
      	* config/i386/intelmic-mkoffload.c (STR): Likewise.
      	* config/nvptx/mkoffload.c (STR): Likewise.
      6806469d
    • Jonathan Wakely's avatar
      gcc-changelog: Remove use of non-strict mode · 7b4bae0a
      Jonathan Wakely authored
      contrib/ChangeLog:
      
      	* gcc-changelog/git_email.py: Remove use of non-strict mode.
      7b4bae0a
    • Martin Liska's avatar
      Use startswith in targets. · c0129e2d
      Martin Liska authored
      gcc/ChangeLog:
      
      	* common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
      	Use startswith function instead of strncmp.
      	* common/config/bfin/bfin-common.c (bfin_handle_option): Likewise.
      	* common/config/riscv/riscv-common.c (riscv_subset_list::parse): Likewise.
      	* config/aarch64/aarch64-sve-builtins-shapes.cc (parse_type): Likewise.
      	* config/aarch64/aarch64.c (aarch64_process_one_target_attr): Likewise.
      	* config/alpha/alpha.c (alpha_elf_section_type_flags): Likewise.
      	* config/arm/aarch-common.c (arm_md_asm_adjust): Likewise.
      	* config/arm/arm.c (arm_file_start): Likewise.
      	(arm_valid_target_attribute_rec): Likewise.
      	(thumb1_md_asm_adjust): Likewise.
      	* config/arm/driver-arm.c (host_detect_local_cpu): Likewise.
      	* config/avr/avr.c (STR_PREFIX_P): Likewise.
      	(avr_set_current_function): Likewise.
      	(avr_handle_addr_attribute): Likewise.
      	(avr_asm_output_aligned_decl_common): Likewise.
      	(avr_asm_named_section): Likewise.
      	(avr_section_type_flags): Likewise.
      	(avr_asm_select_section): Likewise.
      	* config/c6x/c6x.c (c6x_in_small_data_p): Likewise.
      	(c6x_section_type_flags): Likewise.
      	* config/darwin-c.c (darwin_cfstring_ref_p): Likewise.
      	(darwin_objc_declare_unresolved_class_reference): Likewise.
      	(darwin_objc_declare_class_definition): Likewise.
      	* config/darwin.c (indirect_data): Likewise.
      	(darwin_encode_section_info): Likewise.
      	(darwin_objc2_section): Likewise.
      	(darwin_objc1_section): Likewise.
      	(machopic_select_section): Likewise.
      	(darwin_globalize_label): Likewise.
      	(darwin_label_is_anonymous_local_objc_name): Likewise.
      	(darwin_asm_named_section): Likewise.
      	(darwin_asm_output_dwarf_offset): Likewise.
      	* config/frv/frv.c (frv_string_begins_with): Likewise.
      	(frv_in_small_data_p): Likewise.
      	* config/gcn/mkoffload.c (STR): Likewise.
      	(main): Likewise.
      	* config/i386/i386-builtins.c (get_builtin_code_for_version): Likewise.
      	* config/i386/i386-options.c (ix86_option_override_internal): Likewise.
      	* config/i386/i386.c (x86_64_elf_section_type_flags): Likewise.
      	(ix86_md_asm_adjust): Likewise.
      	* config/i386/intelmic-mkoffload.c (STR): Likewise.
      	* config/i386/winnt.c (i386_pe_asm_named_section): Likewise.
      	(i386_pe_file_end): Likewise.
      	* config/ia64/ia64.c (ia64_in_small_data_p): Likewise.
      	(ia64_section_type_flags): Likewise.
      	* config/mips/driver-native.c (host_detect_local_cpu): Likewise.
      	* config/mips/mips.c (mips_handle_interrupt_attr): Likewise.
      	(mips16_stub_function_p): Likewise.
      	(mips_function_rodata_section): Likewise.
      	* config/msp430/msp430.c (msp430_mcu_name): Likewise.
      	(msp430_function_section): Likewise.
      	(msp430_section_type_flags): Likewise.
      	(msp430_expand_helper): Likewise.
      	* config/nios2/nios2.c (nios2_small_section_name_p): Likewise.
      	(nios2_valid_target_attribute_rec): Likewise.
      	* config/nvptx/mkoffload.c (process): Likewise.
      	(STR): Likewise.
      	* config/pa/som.h: Likewise.
      	* config/pdp11/pdp11.c (pdp11_output_ident): Likewise.
      	* config/riscv/riscv.c (riscv_elf_select_rtx_section): Likewise.
      	* config/rs6000/rs6000.c (VTABLE_NAME_P): Likewise.
      	(rs6000_inner_target_options): Likewise.
      	* config/s390/driver-native.c (s390_host_detect_local_cpu): Likewise.
      	* config/sparc/driver-sparc.c (host_detect_local_cpu): Likewise.
      	* config/vax/vax.c (vax_output_int_move): Likewise.
      	* config/vms/vms-ld.c (startswith): Likewise.
      	(process_args): Likewise.
      	(main): Likewise.
      	* config/vms/vms.c: Likewise.
      c0129e2d
    • Jakub Jelinek's avatar
      regcprop: Avoid DCE of asm goto [PR100590] · c81704b3
      Jakub Jelinek authored
      The following testcase ICEs, because copyprop_hardreg_forward_1 decides
      to DCE asm goto with REG_UNUSED notes (because the output is unused and
      asm isn't volatile).  But that DCE just removes the asm goto, leaving
      a bb with two successors and no insn at the end that would allow that.
      
      The following patch makes sure we drop that way only INSNs and not
      JUMP_INSNs or CALL_INSNs.
      
      2021-05-18  Jakub Jelinek  <jakub@redhat.com>
      
      	PR rtl-optimization/100590
      	* regcprop.c (copyprop_hardreg_forward_1): Only DCE dead sets if
      	they are NONJUMP_INSN_P.
      
      	* gcc.dg/pr100590.c: New test.
      c81704b3
    • Jakub Jelinek's avatar
      function: Set dummy DECL_ASSEMBLER_NAME in push_dummy_function [PR100580] · 978b62e5
      Jakub Jelinek authored
      Last year I've added cgraph_node::get_create calls for the dummy
      functions used for -fdump-passes, so that it interacts well with pass
      disabling/enabling which is cgraph uid based.
      Unfortunately, as the following testcase shows, when assembler hash
      is present, that wants to compute DECL_ASSEMBLER_NAME and the C++ FE
      is unprepared to handle it on the dummy functions which don't have
      DECL_NAME etc.
      The following patch fixes it by setting up a dummy DECL_ASSEMBLER_NAME
      on these, so that the FEs don't need to compute it.
      
      2021-05-18  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/100580
      	* function.c (push_dummy_function): Set DECL_ARTIFICIAL and
      	DECL_ASSEMBLER_NAME on the fn_decl.
      
      	* g++.dg/other/pr100580.C: New test.
      978b62e5
    • Jakub Jelinek's avatar
      phiopt: Optimize partial_ordering spaceship >= 0 -ffinite-math-only [PR94589] · 65061ea2
      Jakub Jelinek authored
      As mentioned earlier, spaceship_replacement didn't optimize partial_ordering
      >= 0 comparisons, because the possible values are -1, 0, 1, 2 and the
      >= comparison is implemented as (res & 1) == res to choose the 0 and 1
      cases from that.  As we optimize that only with -ffinite-math-only, the
      2 case is assumed not to happen and my earlier match.pd change optimizes
      (res & 1) == res into (res & ~1) == 0, so this patch pattern matches
      that case and handles it like res >= 0.
      
      2021-05-18  Jakub Jelinek  <jakub@redhat.com>
      
      	PR tree-optimization/94589
      	* tree-ssa-phiopt.c (spaceship_replacement): Pattern match
      	phi result used in (res & ~1) == 0 comparison as res >= 0 as
      	res == 2 would be UB with -ffinite-math-only.
      
      	* g++.dg/opt/pr94589-2.C: Adjust scan-tree-dump count from 14 to 12.
      65061ea2
    • Martin Liska's avatar
      genversion should depend on DATESTAMP · b2a09773
      Martin Liska authored
      gcc/ChangeLog:
      
      	* Makefile.in: genversion.o should depend on DATESTAMP.
      b2a09773
    • Claudiu Zissulescu's avatar
      arc: Fix typo in negv2si2 pattern · def010e4
      Claudiu Zissulescu authored
      
      gcc/
      2021-05-18  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/simdext.md (negv2si2): Remove round bracket.
      
      Signed-off-by: default avatarClaudiu Zissulescu <claziss@synopsys.com>
      def010e4
    • Richard Biener's avatar
      Fix gcc.target/i386/pr100582.c with AVX512 · 1e07091d
      Richard Biener authored
      Which generates vpblendmb.
      
      2021-05-18  Richard Biener  <rguenther@suse.de>
      
      gcc/testsuite/
      	* gcc.target/i386/pr100582.c: Adjust for AVX512.
      1e07091d
    • Richard Biener's avatar
      c/100522 - avoid invalid GIMPLE in GIMPLE parsing · 414fe08a
      Richard Biener authored
      This plugs a few easy holes avoiding ICEs down the route.
      
      2021-05-18  Richard Biener  <rguenther@suse.de>
      
      	PR c/100522
      gcc/c/
      	* gimple-parser.c (c_parser_gimple_postfix_expression_after_primary):
      	Diagnose calls to non-functions.
      	(c_parser_gimple_statement): Diagnose unexpected assignment RHS.
      
      gcc/testsuite/
      	* gcc.dg/gimplefe-error-10.c: New testcase.
      414fe08a
    • Richard Biener's avatar
      c/100547 - reject overly large vector_size attributes · 4054472b
      Richard Biener authored
      This rejects a number of vector components that does not fit an 'int'
      which is an internal limitation of RTVEC.  This requires adjusting
      gcc.dg/attr-vector_size.c which checks for much larger
      supported vectors.  Note that the RTVEC limitation is a host specific
      limitation (unless we change this 'int' to int32_t), but should be
      32bits in practice everywhere.
      
      2021-05-12  Richard Biener  <rguenther@suse.de>
      
      	PR c/100547
      gcc/c-family/
      	* c-attribs.c (type_valid_for_vector_size): Reject too large nunits.
      	Reword existing nunit diagnostic.
      
      gcc/testsuite/
      	* gcc.dg/pr100547.c: New testcase.
      	* gcc.dg/attr-vector_size.c: Adjust.
      4054472b
    • Andreas Krebbel's avatar
      IBM Z: Support vector _Bool language extension · 7e75d624
      Andreas Krebbel authored
      _Bool needs to be defined as macro in order to trigger the
      context-sensitive macro expansion mechanism.
      
      gcc/ChangeLog:
      
      	* config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Define
      	_Bool as macro expanding to _Bool.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/s390/zvector/vec-_Bool.c: New test.
      7e75d624
    • Andreas Krebbel's avatar
      PR100281 C++: Fix SImode pointer handling · 720dff97
      Andreas Krebbel authored
      The problem appears to be triggered by two locations in the front-end
      where non-POINTER_SIZE pointers aren't handled right now.
      
      1. An assertion in strip_typedefs is triggered because the alignment
      of the types don't match. This in turn is caused by creating the new
      type with build_pointer_type instead of taking the type of the
      original pointer into account.
      
      2. An assertion in cp_convert_to_pointer is triggered which expects
      the target type to always have POINTER_SIZE.
      
      gcc/cp/ChangeLog:
      
      	PR c++/100281
      	* cvt.c (cp_convert_to_pointer): Use the size of the target
      	pointer type.
      	* tree.c (cp_build_reference_type): Call
      	cp_build_reference_type_for_mode with VOIDmode.
      	(cp_build_reference_type_for_mode): Rename from
      	cp_build_reference_type.  Add MODE argument and invoke
      	build_reference_type_for_mode.
      	(strip_typedefs): Use build_pointer_type_for_mode and
      	cp_build_reference_type_for_mode for pointers and references.
      
      gcc/ChangeLog:
      
      	PR c++/100281
      	* tree.c (build_reference_type_for_mode)
      	(build_pointer_type_for_mode): Pick pointer mode if MODE argument
      	is VOIDmode.
      	(build_reference_type, build_pointer_type): Invoke
      	build_*_type_for_mode with VOIDmode.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/100281
      	* g++.target/s390/pr100281-1.C: New test.
      	* g++.target/s390/pr100281-2.C: New test.
      720dff97
    • Patrick Palka's avatar
      libstdc++: Fix up semiregular-box partial specialization [PR100475] · fe993b46
      Patrick Palka authored
      This makes the in-place constructor of our partial specialization of
      __box for already-semiregular types perform direct-non-list-initialization
      (in accordance with the specification of the primary template), and
      additionally makes the member function data() use std::__addressof.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/100475
      	* include/std/ranges (__box::__box): Use non-list-initialization
      	in member initializer list of in-place constructor of the
      	partial specialization for semiregular types.
      	(__box::operator->): Use std::__addressof.
      	* testsuite/std/ranges/adaptors/detail/semiregular_box.cc
      	(test02): New test.
      	* testsuite/std/ranges/single_view.cc (test04): New test.
      fe993b46
    • Patrick Palka's avatar
      libstdc++: Fix condition for memoizing reverse_view::begin() [PR100621] · 03cf8d54
      Patrick Palka authored
      A range being a random access range isn't a sufficient condition for
      ranges::next(iter, sent) to have constant time complexity -- it must
      also have a sized sentinel.  This adjusts the memoization condition for
      reverse_view accordingly.
      
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/100621
      	* include/std/ranges (reverse_view::_S_needs_cached_begin):
      	Set to true if the underlying non-common random-access range
      	doesn't have a sized sentinel.
      03cf8d54
    • Patrick Palka's avatar
      libstdc++: Fix miscellaneous issues with elements_view::_Sentinel [PR100631] · 2e2eef80
      Patrick Palka authored
      libstdc++-v3/ChangeLog:
      
      	PR libstdc++/100631
      	* include/std/ranges (elements_view::_Iterator): Also befriend
      	_Sentinel<!_Const>.
      	(elements_view::_Sentinel::_M_equal): Templatize.
      	(elements_view::_Sentinel::_M_distance_from): Split out from ...
      	(elements_view::_Sentinel::operator-): ... here.  Depend on
      	_Base2 instead of _Base in the return type.
      	* testsuite/std/ranges/adaptors/elements.cc (test06, test07):
      	New tests.
      2e2eef80
Loading