1. 18 Jun, 2020 1 commit
  2. 17 Jun, 2020 6 commits
    • Add 'dg-do run' to 'libgomp.fortran/use_device_ptr-optional-3.f90' [PR94848] · 61c896d8
      Fix-up for r279858/commit f760c0c7 "Fortran]
      OpenMP/OpenACC – fix more issues with OPTIONAL".
      
      With offloading enabled, we then saw:
      
          PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O0  (test for excess errors)
          PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O0  execution test
          PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O1  (test for excess errors)
          PASS: libgomp.fortran/use_device_ptr-optional-3.f90   -O1  execution test
          FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O2  (test for excess errors)
          UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O2  compilation failed to produce executable
          FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess errors)
          UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions  compilation failed to produce executable
          FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -g  (test for excess errors)
          UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -O3 -g  compilation failed to produce executable
          FAIL: libgomp.fortran/use_device_ptr-optional-3.f90   -Os  (test for excess errors)
          UNRESOLVED: libgomp.fortran/use_device_ptr-optional-3.f90   -Os  compilation failed to produce executable
      
       ... due to:
      
          /tmp/cciVc43I.o:(.gnu.offload_vars+0x10): undefined reference to `A.12.4064'
          [...]
      
      ..., but after the recent PR94848, PR95551 changes, that problem is now gone.
      
      	libgomp/
      	PR lto/94848
      	* testsuite/libgomp.fortran/use_device_ptr-optional-3.f90: Add
      	'dg-do run'.
      
      (cherry picked from commit 5864930754f63e2dcef9606f2514ae20e80f436e)
      Thomas Schwinge committed
    • hurd: libgcc unwinding support over signal trampolines · a2b187c1
      	libgcc/
      	* config.host (md_unwind_header) <i[34567]86-*-gnu*>: Set to
      	'i386/gnu-unwind.h'
      	* config/i386/gnu-unwind.h: New file.
      
      Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
      (cherry picked from commit 5e2eebc80d6eeca24745c27a925afdb64292ed22)
      Samuel Thibault committed
    • [HSA] Avoid ICE when "HSA does not implement indirect calls" · ad3f0ec1
      Made apparent by recent commit dc703151d4f4560e647649506d5b4ceb0ee11e90
      "openmp: Implement discovery of implicit declare target to clauses":
      
          +FAIL: libgomp.c/target-39.c (internal compiler error)
          +FAIL: libgomp.c/target-39.c (test for excess errors)
          +UNRESOLVED: libgomp.c/target-39.c compilation failed to produce executable
      
      This is in a '--enable-offload-targets=[...],hsa' build, with '-foffload=hsa'
      enabled (by default).
      
          during GIMPLE pass: hsagen
          source-gcc/libgomp/testsuite/libgomp.c/target-39.c: In function ‘main._omp_fn.0.hsa.0’:
          source-gcc/libgomp/testsuite/libgomp.c/target-39.c:23:11: internal compiler error: Segmentation fault
             23 |   #pragma omp target map(from:err)
                |           ^~~
          [...]
      
      GDB:
      
          Program received signal SIGSEGV, Segmentation fault.
          fndecl_built_in_p (node=0x0, name=BUILT_IN_PREFETCH) at [...]/source-gcc/gcc/tree.h:6267
          6267      return (fndecl_built_in_p (node, BUILT_IN_NORMAL)
          (gdb) bt
          #0  fndecl_built_in_p (node=0x0, name=BUILT_IN_PREFETCH) at [...]/source-gcc/gcc/tree.h:6267
          #1  0x0000000000b19739 in gen_hsa_insns_for_call (stmt=stmt@entry=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at [...]/source-gcc/gcc/hsa-gen.c:5304
          #2  0x0000000000b1aca7 in gen_hsa_insns_for_gimple_stmt (stmt=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at [...]/source-gcc/gcc/hsa-gen.c:5770
          #3  0x0000000000b1bd21 in gen_body_from_gimple () at [...]/source-gcc/gcc/hsa-gen.c:5999
          #4  0x0000000000b1dbd2 in generate_hsa (kernel=<optimized out>) at [...]/source-gcc/gcc/hsa-gen.c:6596
          #5  0x0000000000b1de66 in (anonymous namespace)::pass_gen_hsail::execute (this=0x2a2aac0) at [...]/source-gcc/gcc/hsa-gen.c:6680
          #6  0x0000000000d06f90 in execute_one_pass (pass=pass@entry=0x2a2aac0) at [...]/source-gcc/gcc/passes.c:2502
          [...]
          (gdb) up
          #1  0x0000000000b19739 in gen_hsa_insns_for_call (stmt=stmt@entry=0x7ffff693b200, hbb=hbb@entry=0x2b152c0) at /home/thomas/tmp/source/gcc/build/track-slim-omp/source-gcc/gcc/hsa-gen.c:5304
          5304          if (fndecl_built_in_p (function_decl, BUILT_IN_PREFETCH))
          (gdb) print function_decl
          $1 = (tree) 0x0
          (gdb) list
          5299      if (!gimple_call_builtin_p (stmt, BUILT_IN_NORMAL))
          5300        {
          5301          tree function_decl = gimple_call_fndecl (stmt);
          5302          /* Prefetch pass can create type-mismatching prefetch builtin calls which
          5303             fail the gimple_call_builtin_p test above.  Handle them here.  */
          5304          if (fndecl_built_in_p (function_decl, BUILT_IN_PREFETCH))
          5305            return;
          5306
          5307          if (function_decl == NULL_TREE)
          5308            {
      
      The problem is present already since 2016-11-23 commit
      56b1c60e (r242761) "Merge from HSA branch to
      trunk", and the fix obvious enough.
      
      	gcc/
      	* hsa-gen.c (gen_hsa_insns_for_call): Move 'function_decl ==
      	NULL_TREE' check earlier.
      	gcc/testsuite/
      	* c-c++-common/gomp/hsa-indirect-call-1.c: New file.
      
      (cherry picked from commit 973bce0fb50bbfd91f47238b82b99935525716ad)
      Thomas Schwinge committed
    • PR fortran/95088 - Buffer overflows with PDTs, submodules and long symbols · 55838f7f
      With PDTs (parameterized derived types) and submodules, name mangling
      results in variably long internal symbols.  Instead of using a fixed-size
      intermediate buffer, which is actually not really needed, just use a
      pointer to strings.
      
      2020-06-14  Harald Anlauf  <anlauf@gmx.de>
      
      gcc/fortran/
      	PR fortran/95088
      	* class.c (get_unique_type_string): Replace use of fixed size
      	buffer by internally passing a pointer to strings.
      
      (cherry picked from commit 3ee9d82484bdc0ae5b1b21f4a3d8ff46d40e36fd)
      Harald Anlauf committed
    • c++: ICE with IMPLICIT_CONV_EXPR in array subscript [PR95508] · 1bab254f
      Since r10-7096 convert_like, when called in a template, creates an
      IMPLICIT_CONV_EXPR when we're converting to/from array type.
      
      In this test, we have e[f], and we're converting f (of type class A) to
      int, so convert_like in build_new_op_1 created the IMPLICIT_CONV_EXPR
      that got into cp_build_array_ref which calls maybe_constant_value.  My
      patch above failed to adjust this spot to call fold_non_dependent_expr
      instead, which can handle codes like I_C_E in a template.  Fixed by
      using a new function maybe_fold_non_dependent_expr, which, if the expr
      can't be evaluated to a constant, returns the original expression.
      
      gcc/cp/ChangeLog:
      
      	PR c++/95508
      	* constexpr.c (maybe_fold_non_dependent_expr): New.
      	* cp-tree.h (maybe_fold_non_dependent_expr): Declare.
      	* typeck.c (cp_build_array_ref): Call maybe_fold_non_dependent_expr
      	instead of maybe_constant_value.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95508
      	* g++.dg/template/conv16.C: New test.
      Marek Polacek committed
    • Daily bump. · f00c9e97
      GCC Administrator committed
  3. 16 Jun, 2020 6 commits
    • arm: Fix the MVE ACLE vbicq intrinsics. · 29e9bc10
      Following MVE intrinsic testcases are failing in GCC testsuite.
      
      Directory: gcc.target/arm/mve/intrinsics/
      Testcases: vbicq_f16.c, vbicq_f32.c, vbicq_s16.c, vbicq_s32.c, vbicq_s8.c
      ,vbicq_u16.c, vbicq_u32.c and vbicq_u8.c.
      
      This patch fixes the vbicq intrinsics by modifying the intrinsic parameters
      and polymorphic variants in "arm_mve.h" header file.
      
      	Backported from mainline
      	2020-06-04  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
      
      gcc/
      	* config/arm/arm_mve.h (__arm_vbicq_n_u16): Correct the intrinsic
      	arguments.
      	(__arm_vbicq_n_s16): Likewise.
      	(__arm_vbicq_n_u32): Likewise.
      	(__arm_vbicq_n_s32): Likewise.
      	(__arm_vbicq): Modify polymorphic variant.
      
      gcc/testsuite/
      	* gcc.target/arm/mve/intrinsics/vbicq_f16.c: Modify.
      	* gcc.target/arm/mve/intrinsics/vbicq_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_n_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_n_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_n_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_n_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_s8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vbicq_u8.c: Likewise.
      Srinath Parvathaneni committed
    • arm: Correct the grouping of operands in MVE vector scatter store intrinsics (PR94735). · aac5ae14
      The operands in RTL patterns of MVE vector scatter store intrinsics are
      wrongly grouped, because of which few vector loads and stores instructions
      are wrongly getting optimized out with -O2.
      
      A new predicate "mve_scatter_memory" is defined in this patch, this predicate
      returns TRUE on matching: (mem(reg)) for MVE scatter store intrinsics.
      This patch fixes the issue by adding define_expand pattern with
      "mve_scatter_memory" predicate and calls the corresponding define_insn by
      passing register_operand as first argument. This register_operand is extracted
      from the operand with "mve_scatter_memory" predicate in define_expand pattern.
      
      	Backported from mainline
      	2020-06-04  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
      
      gcc/
      	PR target/94735
      	* config/arm/predicates.md (mve_scatter_memory): Define to
      	match (mem (reg)) for scatter store memory.
      	* config/arm/mve.md (mve_vstrbq_scatter_offset_<supf><mode>): Modify
      	define_insn to define_expand.
      	(mve_vstrbq_scatter_offset_p_<supf><mode>): Likewise.
      	(mve_vstrhq_scatter_offset_<supf><mode>): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_p_<supf><mode>): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_<supf><mode>): Likewise.
      	(mve_vstrdq_scatter_offset_p_<supf>v2di): Likewise.
      	(mve_vstrdq_scatter_offset_<supf>v2di): Likewise.
      	(mve_vstrdq_scatter_shifted_offset_p_<supf>v2di): Likewise.
      	(mve_vstrdq_scatter_shifted_offset_<supf>v2di): Likewise.
      	(mve_vstrhq_scatter_offset_fv8hf): Likewise.
      	(mve_vstrhq_scatter_offset_p_fv8hf): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_fv8hf): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_p_fv8hf): Likewise.
      	(mve_vstrwq_scatter_offset_fv4sf): Likewise.
      	(mve_vstrwq_scatter_offset_p_fv4sf): Likewise.
      	(mve_vstrwq_scatter_offset_p_<supf>v4si): Likewise.
      	(mve_vstrwq_scatter_offset_<supf>v4si): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_fv4sf): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_p_fv4sf): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_p_<supf>v4si): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_<supf>v4si): Likewise.
      	(mve_vstrbq_scatter_offset_<supf><mode>_insn): Define insn for scatter
      	stores.
      	(mve_vstrbq_scatter_offset_p_<supf><mode>_insn): Likewise.
      	(mve_vstrhq_scatter_offset_<supf><mode>_insn): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_p_<supf><mode>_insn): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_<supf><mode>_insn): Likewise.
      	(mve_vstrdq_scatter_offset_p_<supf>v2di_insn): Likewise.
      	(mve_vstrdq_scatter_offset_<supf>v2di_insn): Likewise.
      	(mve_vstrdq_scatter_shifted_offset_p_<supf>v2di_insn): Likewise.
      	(mve_vstrdq_scatter_shifted_offset_<supf>v2di_insn): Likewise.
      	(mve_vstrhq_scatter_offset_fv8hf_insn): Likewise.
      	(mve_vstrhq_scatter_offset_p_fv8hf_insn): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_fv8hf_insn): Likewise.
      	(mve_vstrhq_scatter_shifted_offset_p_fv8hf_insn): Likewise.
      	(mve_vstrwq_scatter_offset_fv4sf_insn): Likewise.
      	(mve_vstrwq_scatter_offset_p_fv4sf_insn): Likewise.
      	(mve_vstrwq_scatter_offset_p_<supf>v4si_insn): Likewise.
      	(mve_vstrwq_scatter_offset_<supf>v4si_insn): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_fv4sf_insn): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_p_fv4sf_insn): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_p_<supf>v4si_insn): Likewise.
      	(mve_vstrwq_scatter_shifted_offset_<supf>v4si_insn): Likewise.
      
      gcc/testsuite/
      	PR target/94735
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_base.c: New test.
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_base_p.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_offset.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_offset_p.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_shifted_offset.c:
      	Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstore_scatter_shifted_offset_p.c:
      	Likewise.
      Srinath Parvathaneni committed
    • arm: Fix unintentional fall throughs in arm.c · 1aabb312
      This small patch fix some unintentional fall-throughs in
      `mve_vector_mem_operand'.
      
      	Backported from mainline
      	2020-05-28  Andrea Corallo  <andrea.corallo@arm.com>
      
      gcc/
      	* config/arm/arm.c (mve_vector_mem_operand): Fix unwanted
      	fall-throughs.
      Srinath Parvathaneni committed
    • arm: Fix the wrong code-gen generated by MVE vector load/store intrinsics (PR94959). · 32c348ce
      Few MVE intrinsics like vldrbq_s32, vldrhq_s32 etc., the assembler instructions
      generated by current compiler are wrong.
      eg: vldrbq_s32 generates an assembly instructions `vldrb.s32 q0,[ip]`.
      But as per Arm-arm second argument in above instructions must also be a low
      register (<= r7). This patch fixes this issue by creating a new predicate
      "mve_memory_operand" and constraint "Ux" which allows low registers as arguments
      to the generated instructions depending on the mode of the argument. A new constraint
      "Ul" is created to handle loading to PC-relative addressing modes for vector
      store/load intrinsiscs.
      All the corresponding MVE intrinsic generating wrong code-gen as vldrbq_s32
      are modified in this patch.
      
      	Backported from mainline
      	2020-05-20  Srinath Parvathaneni  <srinath.parvathaneni@arm.com>
      
      gcc/
      	PR target/94959
      	* config/arm/arm-protos.h (arm_mode_base_reg_class): Function
      	declaration.
      	(mve_vector_mem_operand): Likewise.
      	* config/arm/arm.c (thumb2_legitimate_address_p): For MVE target check
      	the load from memory to a core register is legitimate for give mode.
      	(mve_vector_mem_operand): Define function.
      	(arm_print_operand): Modify comment.
      	(arm_mode_base_reg_class): Define.
      	* config/arm/arm.h (MODE_BASE_REG_CLASS): Modify to add check for
      	TARGET_HAVE_MVE and expand to arm_mode_base_reg_class on TRUE.
      	* config/arm/constraints.md (Ux): Likewise.
      	(Ul): Likewise.
      	* config/arm/mve.md (mve_mov): Replace constraint Us with Ux and also
      	add support for missing Vector Store Register and Vector Load Register.
      	Add a new alternative to support load from memory to PC (or label) in
      	vector store/load.
      	(mve_vstrbq_<supf><mode>): Modify constraint Us to Ux.
      	(mve_vldrbq_<supf><mode>): Modify constriant Us to Ux, predicate to
      	mve_memory_operand and also modify the MVE instructions to emit.
      	(mve_vldrbq_z_<supf><mode>): Modify constraint Us to Ux.
      	(mve_vldrhq_fv8hf): Modify constriant Us to Ux, predicate to
      	mve_memory_operand and also modify the MVE instructions to emit.
      	(mve_vldrhq_<supf><mode>): Modify constriant Us to Ux, predicate to
      	mve_memory_operand and also modify the MVE instructions to emit.
      	(mve_vldrhq_z_fv8hf): Likewise.
      	(mve_vldrhq_z_<supf><mode>): Likewise.
      	(mve_vldrwq_fv4sf): Likewise.
      	(mve_vldrwq_<supf>v4si): Likewise.
      	(mve_vldrwq_z_fv4sf): Likewise.
      	(mve_vldrwq_z_<supf>v4si): Likewise.
      	(mve_vld1q_f<mode>): Modify constriant Us to Ux.
      	(mve_vld1q_<supf><mode>): Likewise.
      	(mve_vstrhq_fv8hf): Modify constriant Us to Ux, predicate to
      	mve_memory_operand.
      	(mve_vstrhq_p_fv8hf): Modify constriant Us to Ux, predicate to
      	mve_memory_operand and also modify the MVE instructions to emit.
      	(mve_vstrhq_p_<supf><mode>): Likewise.
      	(mve_vstrhq_<supf><mode>): Modify constriant Us to Ux, predicate to
      	mve_memory_operand.
      	(mve_vstrwq_fv4sf): Modify constriant Us to Ux.
      	(mve_vstrwq_p_fv4sf): Modify constriant Us to Ux and also modify the MVE
      	instructions to emit.
      	(mve_vstrwq_p_<supf>v4si): Likewise.
      	(mve_vstrwq_<supf>v4si): Likewise.Modify constriant Us to Ux.
      	* config/arm/predicates.md (mve_memory_operand): Define.
      
      gcc/testsuite/
      	PR target/94959
      	* gcc.target/arm/mve/intrinsics/mve_vector_float2.c: Modify.
      	* gcc.target/arm/mve/intrinsics/mve_vldr.c: New test.
      	* gcc.target/arm/mve/intrinsics/mve_vldr_z.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstr.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/mve_vstr_p.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_f16.c: Modify.
      	* gcc.target/arm/mve/intrinsics/vld1q_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_s8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_u8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_f16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_s8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vld1q_z_u8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrbq_s8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrbq_u8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrbq_z_s8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrbq_z_u8.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_s64.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_u64.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_s64.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrdq_gather_base_wb_z_u64.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_f16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_z_f16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_z_s16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_z_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_z_u16.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrhq_z_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_z_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_z_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_gather_base_wb_z_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_z_f32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_z_s32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vldrwq_z_u32.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vuninitializedq_float.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vuninitializedq_float1.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vuninitializedq_int.c: Likewise.
      	* gcc.target/arm/mve/intrinsics/vuninitializedq_int1.c: Likewise.
      
      Co-Authored-By: Andre Vieira  <andre.simoesdiasvieira@arm.com>
      Srinath Parvathaneni committed
    • testsuite: Add offloading_enabled check and use it for xfail (PR95622) · 7d249d84
      gcc/testsuite/ChangeLog:
      
      	PR middle-end/95622
      	* lib/target-supports.exp (check_effective_target_offloading_enabled):
      	New.
      	* c-c++-common/goacc/kernels-alias-ipa-pta-2.c: Use it for xfail.
      	* c-c++-common/goacc/kernels-alias-ipa-pta-4.c: Likewise.
      	* c-c++-common/goacc/kernels-alias-ipa-pta.c: Likewise.
      
      Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
      (cherry picked from commit e70fbee1a3dd9fdeb661366dbf3096d76c4e2d6e)
      Tobias Burnus committed
    • Daily bump. · 32f2eef9
      GCC Administrator committed
  4. 15 Jun, 2020 4 commits
  5. 14 Jun, 2020 14 commits
    • coroutines: Handle lambda closure pointers like 'this'. · fbd1bae3
      It was agreed amongst the implementors that the correct
      interpretation of the standard is that lambda closure pointers
      should be treated in the same manner as class object pointers.
      
      gcc/cp/ChangeLog:
      
      	* coroutines.cc (instantiate_coro_traits): Pass a reference
      	to lambda closure objects to traits instantiation.
      	(morph_fn_to_coro): Likewise for promise parameter
      	preview and allocator lookup.
      
      (cherry picked from commit 1c140cfbfa4b465a29ef26f1fdfef04c671e3c9c)
      Iain Sandoe committed
    • PR fortran/95544 - Fix ICE in NULL() argument to intrinsics · b0feef39
      Fortran 2018: An argument to an intrinsic procedure other than ASSOCIATED,
      NULL, or PRESENT shall be a data object.  An EXPR_NULL is not a data
      object.  Add checks for intrinsics.
      
      2020-06-11  Steven G. Kargl  <kargl@gcc.gnu.org>
      	    Harald Anlauf  <anlauf@gmx.de>
      
      gcc/fortran/
      	PR fortran/95544
      	* check.c (invalid_null_arg): Rename to gfc_invalid_null_arg.
      	(gfc_check_associated, gfc_check_kind, gfc_check_merge)
      	(gfc_check_shape, gfc_check_size, gfc_check_spread)
      	(gfc_check_transfer): Adjust.
      	(gfc_check_len_lentrim, gfc_check_trim): Check for NULL() argument.
      	* gfortran.h: Declare gfc_invalid_null_arg ().
      	* intrinsic.c (check_arglist): Check for NULL() argument.
      
      (cherry picked from commit 7fd614ee818983274eb5e47cbb8ec68b20994963)
      Harald Anlauf committed
    • PR fortran/93366 - ICE on invalid, reject invalid use of NULL() as argument · 29410519
      gcc/fortran/ChangeLog:
      
      2020-05-05  Steve Kargl  <kargl@gcc.gnu.org>
      	    Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/93366
      	* check.c (gfc_check_associated, invalid_null_arg): Factorize
      	check for presence of invalid NULL() argument.
      	(gfc_check_kind, gfc_check_merge, gfc_check_shape)
      	(gfc_check_sizeof, gfc_check_spread, gfc_check_transfer): Use this
      	check for presence of invalid NULL() arguments.
      
      gcc/testsuite/ChangeLog:
      
      2020-05-05  Harald Anlauf  <anlauf@gmx.de>
      
      	PR fortran/93366
      	* gfortran.dg/pr93366.f90: New test.
      
      (cherry picked from commit 5a26ea7e0f8b9a00a2eb0a5e8f70efa04056f167)
      Harald Anlauf committed
    • PR fortran/95503 - Fix ICE in gfc_is_simply_contiguous, at fortran/expr.c:5844 · 8c810281
      The check for assigning a pointer that cannot be determined to be simply
      contiguous at compile time to a contiguous pointer does not need to be
      invoked if the lhs of the assignment is known to have conflicting attributes.
      
      2020-06-11  Harald Anlauf  <anlauf@gmx.de>
      
      gcc/fortran/
      	PR fortran/95503
      	* expr.c (gfc_check_pointer_assign): Skip contiguity check of rhs
      	of pointer assignment if lhs cannot be simply contiguous.
      
      gcc/testsuite/
      	PR fortran/95503
      	* gfortran.dg/pr95503.f90: New test.
      
      (cherry picked from commit 87af4f40453a9c84363bde5d9a58466de7fbee2e)
      Harald Anlauf committed
    • When avoiding double deallocation, look at namespace, expression and component. · 0c39742d
      Our finalization handling is a mess.  Really, we should get to try and get
      this fixed for gcc 11.
      
      In the meantime, here is a patch which fixes a regression I introduced
      when fixing a regression with a memory leak.  The important thing
      here is to realize that we do not need to finalize (and deallocate)
      multiple times for the same expression and the same component
      in the same namespace.  It might cause code size regressions, but
      better big code than wrong code...
      
      Backported from r11-1296-g1af22e455584ef5fcad2b4474c1efc3fd26f6cb3 .
      
      gcc/fortran/ChangeLog:
      
      	PR fortran/94109
      	* class.c (finalize_component): Return early if finalization has
      	already happened for expression and component within namespace.
      	* gfortran.h (gfc_was_finalized): New type.
      	(gfc_namespace): Add member was_finalzed.
      	(gfc_expr): Remove finalized.
      	* symbol.c (gfc_free_namespace): Free was_finalized.
      
      gcc/testsuite/ChangeLog:
      
      	PR fortran/94109
      	* gfortran.dg/finalize_34.f90: Adjust free counts.
      	* gfortran.dg/finalize_36.f90: New test.
      Thomas Koenig committed
    • c++: Fix initlist-array12.C · a44761a6
      	* g++.dg/cpp0x/initlist-array12.C: Fix the definition of
      	initializer_list for ilp32 target.
      
      (cherry picked from commit 4833c1adc3c7b125bf1c59e8bd8d802ac3b0d205)
      Marek Polacek committed
    • c-family: Fix up MEM_REF printing [PR95580] · b2229175
      The C FE in the MEM_REF printing ICEs if the type of the first argument
      (which due to useless pointer conversions can be an arbitrary type) is a
      pointer to an incomplete type.  The code just wants to avoid printing a cast
      if it is a pointer to single byte elements.
      
      2020-06-09  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c/95580
      	* c-pretty-print.c (c_pretty_printer::unary_expression): Handle the
      	case when MEM_REF's first argument has type pointer to incomplete type.
      
      	* gcc.dg/pr95580.c: New test.
      
      (cherry picked from commit d6dbb71e468d0db561cc9eca99eeaca1efb81c11)
      Jakub Jelinek committed
    • forwprop: Ignore scalar mode vectors in simplify_vector_constructor [PR95528] · c75a2abc
      As mentioned in the PR, the problem is that at least the x86 backend asumes
      that the vec_unpack* and vec_pack* optabs with integral modes are for the
      AVX512-ish vector masks rather than for very small vectors done in GPRs.
      The only other target that seems to have a scalar mode vec_{,un}pack* optab
      is aarch64 as discussed in the PR, so there is also a condition for that.
      All other targets have just vector mode optabs.
      
      2020-06-08  Jakub Jelinek  <jakub@redhat.com>
      
      	PR target/95528
      	* tree-ssa-forwprop.c (simplify_vector_constructor): Don't use
      	VEC_UNPACK*_EXPR or VEC_PACK_TRUNC_EXPR with scalar modes unless the
      	type is vector boolean.
      
      	* g++.dg/opt/pr95528.C: New test.
      
      (cherry picked from commit 8be374e02761c9d63d2753d71e4bd4874a1577b1)
      Jakub Jelinek committed
    • c++: Try to complete decomp types [PR95328] · 808f30b0
      Two years ago Paolo has added the
        else if (processing_template_decl && !COMPLETE_TYPE_P (type))
          pedwarn (...);
      lines into cp_finish_decomp.  For type dependent decl we punt much earlier,
      but even for types which aren't type dependent COMPLETE_TYPE_P might be
      false as this testcase shows, so this patch tries to complete_type first
      (the reason for writing it that way is that it is then followed by another
      else if and if complete_type returns error_mark_node, we shouldn't report
      anything, as a bug should have been reported already.
      
      2020-05-28  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/95328
      	* decl.c (cp_finish_decomp): Call complete_type before checking
      	COMPLETE_TYPE_P.
      
      	* g++.dg/cpp1z/decomp53.C: New test.
      
      (cherry picked from commit 3d8d5ddb539a5254c7ef83414377f4c74c7701d4)
      Jakub Jelinek committed
    • openmp: Ensure copy ctor for composite distribute parallel for class iterators… · 6d6df84d
      openmp: Ensure copy ctor for composite distribute parallel for class iterators is instantiated [PR95197]
      
      During gimplification omp_finish_clause langhook is called in several places
      to add the language specific info to the clause like what default/copy ctors,
      dtors and assignment operators should be used.
      
      Unfortunately, if it refers to some not yet instantiated method, during
      gimplification it is too late and the methods will not be instantiated
      anymore.  For other cases, the genericizer has code to detect those and
      instantiate whatever is needed, this change adds the same for
      distribute parallel for class iterators where we under the hood need
      a copy constructor for the iterator to implement it.
      
      2020-05-26  Jakub Jelinek  <jakub@redhat.com>
      
      	PR c++/95197
      	* gimplify.c (find_combined_omp_for): Move to omp-general.c.
      	* omp-general.h (find_combined_omp_for): Declare.
      	* omp-general.c: Include tree-iterator.h.
      	(find_combined_omp_for): New function, moved from gimplify.c.
      
      	* cp-gimplify.c: Include omp-general.h.
      	(cp_genericize_r) <case OMP_DISTRIBUTE>: For class iteration
      	variables in composite distribute parallel for, instantiate copy
      	ctor of their types.
      
      (cherry picked from commit f1f862aec2c3b93dbd6adfc35b0e1b6034e59c21)
      Jakub Jelinek committed
    • openmp: Fix placement of 2nd+ preparation statement for PHIs in simd clone lowering [PR95108] · e09d6265
      For normal stmts, preparation statements are inserted before the stmt, so if we need multiple,
      they are in the correct order, but for PHIs we emit them after labels in the entry successor
      bb, and we used to emit them in the reverse order that way.
      
      2020-05-14  Jakub Jelinek  <jakub@redhat.com>
      
      	PR middle-end/95108
      	* omp-simd-clone.c (struct modify_stmt_info): Add after_stmt member.
      	(ipa_simd_modify_stmt_ops): For PHIs, only add before first stmt in
      	entry block if info->after_stmt is NULL, otherwise add after that stmt
      	and update it after adding each stmt.
      	(ipa_simd_modify_function_body): Initialize info.after_stmt.
      
      	* gcc.dg/gomp/pr95108.c: New test.
      
      (cherry picked from commit d0fb9ffc1b8f3b86bbdf0e915cec2136141b329b)
      Jakub Jelinek committed
    • Fix -fcompare-debug issue in purge_dead_edges [PR95080] · 16710ff9
      The following testcase fails with -fcompare-debug, the bug used to be latent
      since introduction of -fcompare-debug.
      The loop at the start of purge_dead_edges behaves differently between -g0
      and -g - if the last insn is a DEBUG_INSN, then it skips not just
      DEBUG_INSNs but also NOTEs until it finds some other real insn (or bb head),
      while with -g0 it will not skip any NOTEs, so if we have
      real_insn
      note
      debug_insn // not present with -g0
      then with -g it might remove useless REG_EH_REGION from real_insn, while
      with -g0 it will not.
      
      Yet another option would be not skipping NOTE_P in the loop; I couldn't find
      in history rationale for why it is done.
      
      2020-05-13  Jakub Jelinek  <jakub@redhat.com>
      
      	PR debug/95080
      	* cfgrtl.c (purge_dead_edges): Skip over debug and note insns even
      	if the last insn is a note.
      
      	* g++.dg/opt/pr95080.C: New test.
      
      (cherry picked from commit 18edc195442291525e04f0fa4d5ef972155117da)
      Jakub Jelinek committed
    • testsuite: Re-add gdc.test prefix in test names (PR testsuite/95575) · 892b4f74
      gcc/testsuite/ChangeLog:
      
      	PR testsuite/95575
      	* lib/gdc-utils.exp (gdc-do-test): Re-add $subdir link and inclusion
      	in filename.
      
      (cherry picked from commit 4a557dc45650bbe500276680674afa18d291fdcc)
      Iain Buclaw committed
    • Daily bump. · 94ccc380
      GCC Administrator committed
  6. 13 Jun, 2020 3 commits
    • coroutines: Make call argument handling more robust [PR95440] · b8849820
      build_new_method_call is supposed to be able to handle a null
      arguments list pointer (when the method has no parms).  There
      were a couple of places where uses of the argument list pointer
      were not defended against NULL.
      
      gcc/cp/ChangeLog:
      
      	PR c++/95440
      	* call.c (add_candidates): Use vec_safe_length() for
      	testing the arguments list.
      	(build_new_method_call_1): Use vec_safe_is_empty() when
      	checking for an empty args list.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95440
      	* g++.dg/coroutines/pr95440.C: New test.
      
      (cherry picked from commit a9eec9625ea7165292958be04899b057804192fb)
      Iain Sandoe committed
    • c++: constrained class template friend [PR93467] · 652ec7e8
      This fixes two issues in our handling of constrained class template
      friend declarations.
      
      The first issue is that we fail to set the constraints on the injected
      class template declaration during tsubst_friend_class.
      
      The second issue is that the template parameter levels within the parsed
      constraints of a class template friend declaration are shifted if the
      enclosing class is a template, and this shift leads to spurious
      constraint mismatch errors in associate_classtype_constraints if the
      friend declaration refers to an already declared class template.
      
      gcc/cp/ChangeLog:
      
      	PR c++/93467
      	* constraint.cc (associate_classtype_constraints): If there is a
      	discrepancy between the current template depth and the template
      	depth of the original declaration, then adjust the template
      	parameter depth within the current constraints appropriately.
      	* pt.c (tsubst_friend_class): Substitute into and set the
      	constraints on the injected declaration.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/93467
      	* g++.dg/cpp2a/concepts-friend6.C: New test.
      	* g++.dg/cpp2a/concepts-friend7.C: New test.
      
      (cherry picked from commit 11c7261128ad3ee136508703b20e45cbe04f8dd0)
      Patrick Palka committed
    • Daily bump. · 3af22062
      GCC Administrator committed
  7. 12 Jun, 2020 5 commits
    • go.test: update issue4085b.go to version from Go 1.13 · 703f9d86
      This lets the test pass on AIX.
      
      Not updating to master because we get slightly different error messages,
      so that is a more complex change.
      Ian Lance Taylor committed
    • coroutines: Correct handling of references in parm copies [PR95350]. · 284f809e
      Adjust to handle rvalue refs the same way as clang, and to correct
      the handling of moves when a copy CTOR is present.  This is one area
      where we could make things easier for the end-user (as was implemented
      before this change), however there needs to be agreement about when the
      full statement containing a coroutine call ends (i.e. when the ramp
      terminates or when the coroutine terminates).
      
      gcc/cp/ChangeLog:
      
      	PR c++/95350
      	* coroutines.cc (struct param_info): Remove rv_ref field.
      	(build_actor_fn): Remove specifial rvalue ref handling.
      	(morph_fn_to_coro): Likewise.
      
      gcc/testsuite/ChangeLog:
      
      	PR c++/95350
      	* g++.dg/coroutines/torture/func-params-08.C: Adjust test to
      	reflect that all rvalue refs are dangling.
      	* g++.dg/coroutines/torture/func-params-09-awaitable-parms.C:
      	Likewise.
      	* g++.dg/coroutines/pr95350.C: New test.
      
      (cherry picked from commit 88f48e2967ead9be262483618238efa9c7c842ec)
      Iain Sandoe committed
    • asan: fix RTX emission for ilp32 · e1d68582
      gcc/ChangeLog:
      
      	PR sanitizer/95634
      	* asan.c (asan_emit_stack_protection): Fix emission for ilp32
      	by using Pmode instead of ptr_mode.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      (cherry picked from commit 8cff672cb9a132d3d3158c2edfc9a64b55292b80)
      Martin Liska committed
    • Add missing store in emission of asan_stack_free. · 036b288c
      gcc/ChangeLog:
      
      2020-05-19  Martin Liska  <mliska@suse.cz>
      
      	PR sanitizer/94910
      	* asan.c (asan_emit_stack_protection): Emit
      	also **SavedFlagPtr(FakeStack, class_id) = 0 in order to release
      	a stack frame.
      
      (cherry picked from commit 8b6731e674c76cb48a417f2eef74ced92a17f469)
      Martin Liska committed
    • Daily bump. · d78c4732
      GCC Administrator committed
  8. 11 Jun, 2020 1 commit
    • c++: Fix ICE in check_local_shadow with enum [PR95560] · 23dd4256
      Another indication that perhaps this warning is emitted too early.  We
      crash because same_type_p gets a null type: we have an enumerator
      without a fixed underlying type and finish_enum_value_list hasn't yet
      run.  So check if the type is null before calling same_type_p.
      
      	PR c++/95560
      	* name-lookup.c (check_local_shadow): Check if types are
      	non-null before calling same_type_p.
      
      	* g++.dg/warn/Wshadow-local-3.C: New test.
      Marek Polacek committed