mirror of git://gcc.gnu.org/git/gcc.git
Merge remote-tracking branch 'origin/releases/gcc-10' into devel/omp/gcc-10
Merged up to a6c47f4ce2 (2020-09-28)
This commit is contained in:
commit
3a857fecdc
|
|
@ -1,3 +1,98 @@
|
|||
2020-09-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/97073
|
||||
* optabs.c (expand_binop, expand_absneg_bit, expand_unop,
|
||||
expand_copysign_bit): Check reg_overlap_mentioned_p between target
|
||||
and operand(s) and if it returns true, force a pseudo as target.
|
||||
|
||||
2020-09-25 Vladimir N. Makarov <vmakarov@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-06-04 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR middle-end/95464
|
||||
* lra.c (lra_emit_move): Add processing STRICT_LOW_PART.
|
||||
* lra-constraints.c (match_reload): Use STRICT_LOW_PART in output
|
||||
reload if the original insn has it too.
|
||||
|
||||
2020-09-25 Joe Ramsay <Joe.Ramsay@arm.com>
|
||||
|
||||
Backported from master:
|
||||
2020-08-20 Joe Ramsay <Joe.Ramsay@arm.com>
|
||||
|
||||
PR target/96683
|
||||
* config/arm/mve.md (mve_vst1q_f<mode>): Require MVE memory operand for
|
||||
destination.
|
||||
(mve_vst1q_<supf><mode>): Likewise.
|
||||
|
||||
2020-09-24 H.J. Lu <hjl.tools@gmail.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-16 H.J. Lu <hjl.tools@gmail.com>
|
||||
|
||||
PR target/97032
|
||||
* cfgexpand.c (asm_clobber_reg_kind): Set sp_is_clobbered_by_asm
|
||||
to true if the stack pointer is clobbered by asm statement.
|
||||
* emit-rtl.h (rtl_data): Add sp_is_clobbered_by_asm.
|
||||
* config/i386/i386.c (ix86_get_drap_rtx): Set need_drap to true
|
||||
if the stack pointer is clobbered by asm statement.
|
||||
|
||||
2020-09-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR target/97166
|
||||
* config/rs6000/rs6000-c.c (rs6000_target_modify_macros):
|
||||
Conditionally define __PCREL__.
|
||||
|
||||
2020-09-24 Andrea Corallo <andrea.corallo@arm.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-21 Andrea Corallo <andrea.corallo@arm.com>
|
||||
|
||||
* config/aarch64/aarch64-builtins.c
|
||||
(aarch64_general_expand_builtin): Use expand machinery not to
|
||||
alter the value of an rtx returned by force_reg.
|
||||
|
||||
2020-09-24 Alex Coplan <alex.coplan@arm.com>
|
||||
|
||||
* config/aarch64/aarch64-cores.def: Add Neoverse V1.
|
||||
* config/aarch64/aarch64-tune.md: Regenerate.
|
||||
* doc/invoke.texi: Document support for Neoverse V1.
|
||||
|
||||
2020-09-22 David Faust <david.faust@oracle.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-22 David Faust <david.faust@oracle.com>
|
||||
|
||||
* config/bpf/bpf.md: Add defines for signed div and mod operators.
|
||||
|
||||
2020-09-20 John David Anglin < danglin@gcc.gnu.org>
|
||||
|
||||
* config/pa/pa-hpux11.h (LINK_GCC_C_SEQUENCE_SPEC): Delete.
|
||||
* config/pa/pa64-hpux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
|
||||
(ENDFILE_SPEC): Link with libgcc_stub.a and mill.a.
|
||||
* config/pa/pa32-linux.h (ENDFILE_SPEC): Link with libgcc.a.
|
||||
|
||||
2020-09-17 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR preprocessor/96935
|
||||
* input.c (get_substring_ranges_for_loc): Return if start.column
|
||||
is less than 1.
|
||||
|
||||
2020-09-17 liuhongt <hongtao.liu@intel.com>
|
||||
|
||||
* common/config/i386/i386-common.c
|
||||
(OPTION_MASK_ISA_AVX_UNSET): Remove OPTION_MASK_ISA_XSAVE_UNSET.
|
||||
(OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_AVX_UNSET.
|
||||
|
||||
2020-09-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
20200917
|
||||
20200928
|
||||
|
|
|
|||
|
|
@ -232,7 +232,7 @@ static tree build_position_list (tree, bool, tree, tree, unsigned int, tree);
|
|||
static vec<subst_pair> build_subst_list (Entity_Id, Entity_Id, bool);
|
||||
static vec<variant_desc> build_variant_list (tree, vec<subst_pair>,
|
||||
vec<variant_desc>);
|
||||
static tree maybe_saturate_size (tree);
|
||||
static tree maybe_saturate_size (tree, unsigned int align);
|
||||
static tree validate_size (Uint, tree, Entity_Id, enum tree_code, bool, bool,
|
||||
const char *, const char *);
|
||||
static void set_rm_size (Uint, tree, Entity_Id);
|
||||
|
|
@ -4375,7 +4375,12 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
|
|||
/* If the size is self-referential, annotate the maximum value
|
||||
after saturating it, if need be, to avoid a No_Uint value. */
|
||||
if (CONTAINS_PLACEHOLDER_P (gnu_size))
|
||||
gnu_size = maybe_saturate_size (max_size (gnu_size, true));
|
||||
{
|
||||
const unsigned int align
|
||||
= UI_To_Int (Alignment (gnat_entity)) * BITS_PER_UNIT;
|
||||
gnu_size
|
||||
= maybe_saturate_size (max_size (gnu_size, true), align);
|
||||
}
|
||||
|
||||
/* If we are just annotating types and the type is tagged, the tag
|
||||
and the parent components are not generated by the front-end so
|
||||
|
|
@ -4411,7 +4416,8 @@ gnat_to_gnu_entity (Entity_Id gnat_entity, tree gnu_expr, bool definition)
|
|||
gnu_size = size_binop (PLUS_EXPR, gnu_size, offset);
|
||||
}
|
||||
|
||||
gnu_size = maybe_saturate_size (round_up (gnu_size, align));
|
||||
gnu_size
|
||||
= maybe_saturate_size (round_up (gnu_size, align), align);
|
||||
Set_Esize (gnat_entity, annotate_value (gnu_size));
|
||||
|
||||
/* Tagged types are Strict_Alignment so RM_Size = Esize. */
|
||||
|
|
@ -8851,15 +8857,21 @@ build_variant_list (tree qual_union_type, vec<subst_pair> subst_list,
|
|||
}
|
||||
|
||||
/* If SIZE has overflowed, return the maximum valid size, which is the upper
|
||||
bound of the signed sizetype in bits; otherwise return SIZE unmodified. */
|
||||
bound of the signed sizetype in bits, rounded down to ALIGN. Otherwise
|
||||
return SIZE unmodified. */
|
||||
|
||||
static tree
|
||||
maybe_saturate_size (tree size)
|
||||
maybe_saturate_size (tree size, unsigned int align)
|
||||
{
|
||||
if (TREE_CODE (size) == INTEGER_CST && TREE_OVERFLOW (size))
|
||||
size = size_binop (MULT_EXPR,
|
||||
fold_convert (bitsizetype, TYPE_MAX_VALUE (ssizetype)),
|
||||
build_int_cst (bitsizetype, BITS_PER_UNIT));
|
||||
{
|
||||
size
|
||||
= size_binop (MULT_EXPR,
|
||||
fold_convert (bitsizetype, TYPE_MAX_VALUE (ssizetype)),
|
||||
build_int_cst (bitsizetype, BITS_PER_UNIT));
|
||||
size = round_down (size, align);
|
||||
}
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2868,11 +2868,15 @@ asm_clobber_reg_is_valid (int regno, int nregs, const char *regname)
|
|||
as it was before, so no asm can validly clobber the stack pointer in
|
||||
the usual sense. Adding the stack pointer to the clobber list has
|
||||
traditionally had some undocumented and somewhat obscure side-effects. */
|
||||
if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM)
|
||||
&& warning (OPT_Wdeprecated, "listing the stack pointer register"
|
||||
" %qs in a clobber list is deprecated", regname))
|
||||
inform (input_location, "the value of the stack pointer after an %<asm%>"
|
||||
" statement must be the same as it was before the statement");
|
||||
if (overlaps_hard_reg_set_p (regset, Pmode, STACK_POINTER_REGNUM))
|
||||
{
|
||||
crtl->sp_is_clobbered_by_asm = true;
|
||||
if (warning (OPT_Wdeprecated, "listing the stack pointer register"
|
||||
" %qs in a clobber list is deprecated", regname))
|
||||
inform (input_location, "the value of the stack pointer after"
|
||||
" an %<asm%> statement must be the same as it was before"
|
||||
" the statement");
|
||||
}
|
||||
|
||||
return is_valid;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1976,14 +1976,14 @@ aarch64_general_expand_builtin (unsigned int fcode, tree exp, rtx target,
|
|||
return target;
|
||||
|
||||
case AARCH64_JSCVT:
|
||||
arg0 = CALL_EXPR_ARG (exp, 0);
|
||||
op0 = force_reg (DFmode, expand_normal (arg0));
|
||||
if (!target)
|
||||
target = gen_reg_rtx (SImode);
|
||||
else
|
||||
target = force_reg (SImode, target);
|
||||
emit_insn (GEN_FCN (CODE_FOR_aarch64_fjcvtzs) (target, op0));
|
||||
return target;
|
||||
{
|
||||
expand_operand ops[2];
|
||||
create_output_operand (&ops[0], target, SImode);
|
||||
op0 = expand_normal (CALL_EXPR_ARG (exp, 0));
|
||||
create_input_operand (&ops[1], op0, DFmode);
|
||||
expand_insn (CODE_FOR_aarch64_fjcvtzs, 2, ops);
|
||||
return ops[0].value;
|
||||
}
|
||||
|
||||
case AARCH64_SIMD_BUILTIN_FCMLA_LANEQ0_V2SF:
|
||||
case AARCH64_SIMD_BUILTIN_FCMLA_LANEQ90_V2SF:
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@ AARCH64_CORE("thunderx3t110", thunderx3t110, thunderx3t110, 8_3A, AARCH64_FL_
|
|||
|
||||
/* Arm ('A') cores. */
|
||||
AARCH64_CORE("zeus", zeus, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_SVE | AARCH64_FL_RCPC | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_PROFILE | AARCH64_FL_SSBS | AARCH64_FL_RNG, neoversen1, 0x41, 0xd40, -1)
|
||||
AARCH64_CORE("neoverse-v1", neoversev1, cortexa57, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_SVE | AARCH64_FL_RCPC | AARCH64_FL_I8MM | AARCH64_FL_BF16 | AARCH64_FL_F16 | AARCH64_FL_PROFILE | AARCH64_FL_SSBS | AARCH64_FL_RNG, neoversen1, 0x41, 0xd40, -1)
|
||||
|
||||
/* Qualcomm ('Q') cores. */
|
||||
AARCH64_CORE("saphira", saphira, saphira, 8_4A, AARCH64_FL_FOR_ARCH8_4 | AARCH64_FL_CRYPTO | AARCH64_FL_RCPC, saphira, 0x51, 0xC01, -1)
|
||||
|
|
|
|||
|
|
@ -334,12 +334,11 @@
|
|||
BUILTIN_VHSDF (UNOP, nearbyint, 2)
|
||||
BUILTIN_VHSDF (UNOP, rint, 2)
|
||||
BUILTIN_VHSDF (UNOP, round, 2)
|
||||
BUILTIN_VHSDF_DF (UNOP, frintn, 2)
|
||||
BUILTIN_VHSDF_HSDF (UNOP, frintn, 2)
|
||||
|
||||
VAR1 (UNOP, btrunc, 2, hf)
|
||||
VAR1 (UNOP, ceil, 2, hf)
|
||||
VAR1 (UNOP, floor, 2, hf)
|
||||
VAR1 (UNOP, frintn, 2, hf)
|
||||
VAR1 (UNOP, nearbyint, 2, hf)
|
||||
VAR1 (UNOP, rint, 2, hf)
|
||||
VAR1 (UNOP, round, 2, hf)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
;; -*- buffer-read-only: t -*-
|
||||
;; Generated automatically by gentune.sh from aarch64-cores.def
|
||||
(define_attr "tune"
|
||||
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa65,cortexa65ae,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55"
|
||||
"cortexa34,cortexa35,cortexa53,cortexa57,cortexa72,cortexa73,thunderx,thunderxt88p1,thunderxt88,octeontx,octeontxt81,octeontxt83,thunderxt81,thunderxt83,emag,xgene1,falkor,qdf24xx,exynosm1,phecda,thunderx2t99p1,vulcan,thunderx2t99,cortexa55,cortexa75,cortexa76,cortexa76ae,cortexa77,cortexa65,cortexa65ae,ares,neoversen1,neoversee1,octeontx2,octeontx2t98,octeontx2t96,octeontx2t93,octeontx2f95,octeontx2f95n,octeontx2f95mm,a64fx,tsv110,thunderx3t110,zeus,neoversev1,saphira,cortexa57cortexa53,cortexa72cortexa53,cortexa73cortexa35,cortexa73cortexa53,cortexa75cortexa55,cortexa76cortexa55"
|
||||
(const (symbol_ref "((enum attr_tune) aarch64_tune)")))
|
||||
|
|
|
|||
|
|
@ -6088,6 +6088,20 @@ vreinterpretq_u32_p128 (poly128_t __a)
|
|||
return (uint32x4_t)__a;
|
||||
}
|
||||
|
||||
__extension__ extern __inline float64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vreinterpretq_f64_p128 (poly128_t __a)
|
||||
{
|
||||
return (float64x2_t) __a;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly128_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vreinterpretq_p128_f64 (float64x2_t __a)
|
||||
{
|
||||
return (poly128_t) __a;
|
||||
}
|
||||
|
||||
/* vset_lane */
|
||||
|
||||
__extension__ extern __inline float16x4_t
|
||||
|
|
@ -12670,6 +12684,13 @@ vceqq_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
return (__a == __b);
|
||||
}
|
||||
|
||||
__extension__ extern __inline uint64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vceqq_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
return (__a == __b);
|
||||
}
|
||||
|
||||
/* vceq - scalar. */
|
||||
|
||||
__extension__ extern __inline uint32_t
|
||||
|
|
@ -12779,6 +12800,13 @@ vceqz_u64 (uint64x1_t __a)
|
|||
return (__a == __AARCH64_UINT64_C (0));
|
||||
}
|
||||
|
||||
__extension__ extern __inline uint64x1_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vceqz_p64 (poly64x1_t __a)
|
||||
{
|
||||
return (__a == __AARCH64_UINT64_C (0));
|
||||
}
|
||||
|
||||
__extension__ extern __inline uint32x4_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vceqzq_f32 (float32x4_t __a)
|
||||
|
|
@ -12856,6 +12884,13 @@ vceqzq_u64 (uint64x2_t __a)
|
|||
return (__a == __AARCH64_UINT64_C (0));
|
||||
}
|
||||
|
||||
__extension__ extern __inline uint64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vceqzq_p64 (poly64x2_t __a)
|
||||
{
|
||||
return (__a == __AARCH64_UINT64_C (0));
|
||||
}
|
||||
|
||||
/* vceqz - scalar. */
|
||||
|
||||
__extension__ extern __inline uint32_t
|
||||
|
|
@ -14054,6 +14089,48 @@ vclsq_s32 (int32x4_t __a)
|
|||
return __builtin_aarch64_clrsbv4si (__a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int8x8_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vcls_u8 (uint8x8_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv8qi ((int8x8_t) __a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int16x4_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vcls_u16 (uint16x4_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv4hi ((int16x4_t) __a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int32x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vcls_u32 (uint32x2_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv2si ((int32x2_t) __a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int8x16_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vclsq_u8 (uint8x16_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv16qi ((int8x16_t) __a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int16x8_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vclsq_u16 (uint16x8_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv8hi ((int16x8_t) __a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline int32x4_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vclsq_u32 (uint32x4_t __a)
|
||||
{
|
||||
return __builtin_aarch64_clrsbv4si ((int32x4_t) __a);
|
||||
}
|
||||
|
||||
/* vclz. */
|
||||
|
||||
__extension__ extern __inline int8x8_t
|
||||
|
|
@ -19613,6 +19690,13 @@ vld4q_p64 (const poly64_t * __a)
|
|||
return ret;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly128_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vldrq_p128 (const poly128_t * __ptr)
|
||||
{
|
||||
return *__ptr;
|
||||
}
|
||||
|
||||
/* vldn_dup */
|
||||
|
||||
__extension__ extern __inline int8x8x2_t
|
||||
|
|
@ -26003,6 +26087,13 @@ vrndmq_f64 (float64x2_t __a)
|
|||
|
||||
/* vrndn */
|
||||
|
||||
__extension__ extern __inline float32_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vrndns_f32 (float32_t __a)
|
||||
{
|
||||
return __builtin_aarch64_frintnsf (__a);
|
||||
}
|
||||
|
||||
__extension__ extern __inline float32x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vrndn_f32 (float32x2_t __a)
|
||||
|
|
@ -30104,6 +30195,13 @@ vst4q_p64 (poly64_t * __a, poly64x2x4_t __val)
|
|||
__builtin_aarch64_st4v2di ((__builtin_aarch64_simd_di *) __a, __o);
|
||||
}
|
||||
|
||||
__extension__ extern __inline void
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vstrq_p128 (poly128_t * __ptr, poly128_t __val)
|
||||
{
|
||||
*__ptr = __val;
|
||||
}
|
||||
|
||||
/* vsub */
|
||||
|
||||
__extension__ extern __inline int64_t
|
||||
|
|
@ -30491,6 +30589,17 @@ vtrn1q_u32 (uint32x4_t __a, uint32x4_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vtrn1q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {3, 1});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {0, 2});
|
||||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline uint64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vtrn1q_u64 (uint64x2_t __a, uint64x2_t __b)
|
||||
|
|
@ -30761,6 +30870,18 @@ vtrn2q_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vtrn2q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {2, 0});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {1, 3});
|
||||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline float16x4x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vtrn_f16 (float16x4_t __a, float16x4_t __b)
|
||||
|
|
@ -31407,6 +31528,17 @@ vuzp1q_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vuzp1q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {3, 1});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {0, 2});
|
||||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline float16x4_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vuzp2_f16 (float16x4_t __a, float16x4_t __b)
|
||||
|
|
@ -31666,6 +31798,17 @@ vuzp2q_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vuzp2q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {2, 0});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {1, 3});
|
||||
#endif
|
||||
}
|
||||
|
||||
__INTERLEAVE_LIST (uzp)
|
||||
|
||||
/* vzip */
|
||||
|
|
@ -31934,6 +32077,17 @@ vzip1q_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vzip1q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {3, 1});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {0, 2});
|
||||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline float16x4_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vzip2_f16 (float16x4_t __a, float16x4_t __b)
|
||||
|
|
@ -32198,6 +32352,17 @@ vzip2q_u64 (uint64x2_t __a, uint64x2_t __b)
|
|||
#endif
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute__ ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vzip2q_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
#ifdef __AARCH64EB__
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {2, 0});
|
||||
#else
|
||||
return __builtin_shuffle (__a, __b, (poly64x2_t) {1, 3});
|
||||
#endif
|
||||
}
|
||||
|
||||
__INTERLEAVE_LIST (zip)
|
||||
|
||||
#undef __INTERLEAVE_LIST
|
||||
|
|
@ -35659,6 +35824,55 @@ vusmmlaq_s32 (int32x4_t __r, uint8x16_t __a, int8x16_t __b)
|
|||
|
||||
#pragma GCC pop_options
|
||||
|
||||
__extension__ extern __inline poly8x8_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vadd_p8 (poly8x8_t __a, poly8x8_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly16x4_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vadd_p16 (poly16x4_t __a, poly16x4_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x1_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vadd_p64 (poly64x1_t __a, poly64x1_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly8x16_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vaddq_p8 (poly8x16_t __a, poly8x16_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly16x8_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vaddq_p16 (poly16x8_t __a, poly16x8_t __b)
|
||||
{
|
||||
return __a ^__b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly64x2_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vaddq_p64 (poly64x2_t __a, poly64x2_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
__extension__ extern __inline poly128_t
|
||||
__attribute ((__always_inline__, __gnu_inline__, __artificial__))
|
||||
vaddq_p128 (poly128_t __a, poly128_t __b)
|
||||
{
|
||||
return __a ^ __b;
|
||||
}
|
||||
|
||||
#undef __aarch64_vget_lane_any
|
||||
|
||||
#undef __aarch64_vdup_lane_any
|
||||
|
|
|
|||
|
|
@ -9330,7 +9330,7 @@
|
|||
[(set_attr "length" "4")])
|
||||
|
||||
(define_expand "mve_vst1q_f<mode>"
|
||||
[(match_operand:<MVE_CNVT> 0 "memory_operand")
|
||||
[(match_operand:<MVE_CNVT> 0 "mve_memory_operand")
|
||||
(unspec:<MVE_CNVT> [(match_operand:MVE_0 1 "s_register_operand")] VST1Q_F)
|
||||
]
|
||||
"TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT"
|
||||
|
|
@ -9340,7 +9340,7 @@
|
|||
})
|
||||
|
||||
(define_expand "mve_vst1q_<supf><mode>"
|
||||
[(match_operand:MVE_2 0 "memory_operand")
|
||||
[(match_operand:MVE_2 0 "mve_memory_operand")
|
||||
(unspec:MVE_2 [(match_operand:MVE_2 1 "s_register_operand")] VST1Q)
|
||||
]
|
||||
"TARGET_HAVE_MVE"
|
||||
|
|
|
|||
|
|
@ -165,6 +165,16 @@
|
|||
"div<msuffix>\t%0,%2"
|
||||
[(set_attr "type" "<mtype>")])
|
||||
|
||||
;; However, xBPF does provide a signed division operator, sdiv.
|
||||
|
||||
(define_insn "div<AM:mode>3"
|
||||
[(set (match_operand:AM 0 "register_operand" "=r,r")
|
||||
(div:AM (match_operand:AM 1 "register_operand" " 0,0")
|
||||
(match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
|
||||
"TARGET_XBPF"
|
||||
"sdiv<msuffix>\t%0,%2"
|
||||
[(set_attr "type" "<mtype>")])
|
||||
|
||||
;;; Modulus
|
||||
|
||||
;; Note that eBPF doesn't provide instructions for signed integer
|
||||
|
|
@ -178,6 +188,16 @@
|
|||
"mod<msuffix>\t%0,%2"
|
||||
[(set_attr "type" "<mtype>")])
|
||||
|
||||
;; Again, xBPF provides a signed version, smod.
|
||||
|
||||
(define_insn "mod<AM:mode>3"
|
||||
[(set (match_operand:AM 0 "register_operand" "=r,r")
|
||||
(mod:AM (match_operand:AM 1 "register_operand" " 0,0")
|
||||
(match_operand:AM 2 "reg_or_imm_operand" "r,I")))]
|
||||
"TARGET_XBPF"
|
||||
"smod<msuffix>\t%0,%2"
|
||||
[(set_attr "type" "<mtype>")])
|
||||
|
||||
;;; Logical AND
|
||||
(define_insn "and<AM:mode>3"
|
||||
[(set (match_operand:AM 0 "register_operand" "=r,r")
|
||||
|
|
|
|||
|
|
@ -6965,10 +6965,12 @@ ix86_update_stack_boundary (void)
|
|||
static rtx
|
||||
ix86_get_drap_rtx (void)
|
||||
{
|
||||
/* We must use DRAP if there are outgoing arguments on stack and
|
||||
/* We must use DRAP if there are outgoing arguments on stack or
|
||||
the stack pointer register is clobbered by asm statment and
|
||||
ACCUMULATE_OUTGOING_ARGS is false. */
|
||||
if (ix86_force_drap
|
||||
|| (cfun->machine->outgoing_args_on_stack
|
||||
|| ((cfun->machine->outgoing_args_on_stack
|
||||
|| crtl->sp_is_clobbered_by_asm)
|
||||
&& !ACCUMULATE_OUTGOING_ARGS))
|
||||
crtl->need_drap = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -154,11 +154,6 @@ along with GCC; see the file COPYING3. If not see
|
|||
%{!mt:%{!pthread:-a shared -lc -a archive}}}}\
|
||||
%{shared:%{mt|pthread:-lpthread}}"
|
||||
|
||||
/* The libgcc_stub.a library needs to come last. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC \
|
||||
"%G %{!nolibc:%L} %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}}}"
|
||||
|
||||
#undef STARTFILE_SPEC
|
||||
#define STARTFILE_SPEC \
|
||||
"%{!shared:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}} \
|
||||
|
|
|
|||
|
|
@ -57,6 +57,11 @@ call_ ## FUNC (void) \
|
|||
}
|
||||
#endif
|
||||
|
||||
/* We need to link against libgcc.a for __canonicalize_funcptr_for_compare
|
||||
and $$dyncall. */
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC GNU_USER_TARGET_ENDFILE_SPEC "libgcc.a%s"
|
||||
|
||||
#undef WCHAR_TYPE
|
||||
#define WCHAR_TYPE "long int"
|
||||
|
||||
|
|
|
|||
|
|
@ -103,12 +103,6 @@ along with GCC; see the file COPYING3. If not see
|
|||
%{shared:%{mt|pthread:-lpthread}}"
|
||||
#endif
|
||||
|
||||
/* The libgcc_stub.a and milli.a libraries need to come last. */
|
||||
#undef LINK_GCC_C_SEQUENCE_SPEC
|
||||
#define LINK_GCC_C_SEQUENCE_SPEC "\
|
||||
%G %{!nolibc:%L} %G %{!nostdlib:%{!nodefaultlibs:%{!shared:-lgcc_stub}\
|
||||
milli.a%s}}"
|
||||
|
||||
/* Under hpux11, the normal location of the `ld' and `as' programs is the
|
||||
/usr/ccs/bin directory. */
|
||||
|
||||
|
|
@ -335,8 +329,12 @@ do { \
|
|||
%{static:crtbeginT%O%s} %{!static:%{!shared:crtbegin%O%s} \
|
||||
%{shared:crtbeginS%O%s}}"
|
||||
#endif
|
||||
|
||||
/* The libgcc_stub.a and milli.a libraries must come last. We need
|
||||
to link with these libraries whenever start files are needed. */
|
||||
#undef ENDFILE_SPEC
|
||||
#define ENDFILE_SPEC "%{!shared:crtend%O%s} %{shared:crtendS%O%s}"
|
||||
#define ENDFILE_SPEC \
|
||||
"%{!shared:crtend%O%s libgcc_stub.a%s} %{shared:crtendS%O%s} milli.a%s"
|
||||
|
||||
/* Since HP uses the .init and .fini sections for array initializers
|
||||
and finalizers, we need different defines for INIT_SECTION_ASM_OP
|
||||
|
|
|
|||
|
|
@ -597,6 +597,9 @@ rs6000_target_modify_macros (bool define_p, HOST_WIDE_INT flags,
|
|||
/* Tell the user if we support the MMA instructions. */
|
||||
if ((flags & OPTION_MASK_MMA) != 0)
|
||||
rs6000_define_or_undefine_macro (define_p, "__MMA__");
|
||||
/* Whether pc-relative code is being generated. */
|
||||
if ((flags & OPTION_MASK_PCREL) != 0)
|
||||
rs6000_define_or_undefine_macro (define_p, "__PCREL__");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -17022,8 +17022,8 @@ performance of the code. Permissible values for this option are:
|
|||
@samp{cortex-a76}, @samp{cortex-a76ae}, @samp{cortex-a77},
|
||||
@samp{cortex-a65}, @samp{cortex-a65ae}, @samp{cortex-a34},
|
||||
@samp{ares}, @samp{exynos-m1}, @samp{emag}, @samp{falkor},
|
||||
@samp{neoverse-e1},@samp{neoverse-n1},@samp{qdf24xx}, @samp{saphira},
|
||||
@samp{phecda}, @samp{xgene1}, @samp{vulcan}, @samp{octeontx},
|
||||
@samp{neoverse-e1},@samp{neoverse-n1},@samp{neoverse-v1},@samp{qdf24xx},
|
||||
@samp{saphira}, @samp{phecda}, @samp{xgene1}, @samp{vulcan}, @samp{octeontx},
|
||||
@samp{octeontx81}, @samp{octeontx83},
|
||||
@samp{octeontx2}, @samp{octeontx2t98}, @samp{octeontx2t96}
|
||||
@samp{octeontx2t93}, @samp{octeontx2f95}, @samp{octeontx2f95n},
|
||||
|
|
|
|||
|
|
@ -275,6 +275,9 @@ struct GTY(()) rtl_data {
|
|||
pass_stack_ptr_mod has run. */
|
||||
bool sp_is_unchanging;
|
||||
|
||||
/* True if the stack pointer is clobbered by asm statement. */
|
||||
bool sp_is_clobbered_by_asm;
|
||||
|
||||
/* Nonzero if function being compiled doesn't contain any calls
|
||||
(ignoring the prologue and epilogue). This is set prior to
|
||||
register allocation in IRA and is valid for the remaining
|
||||
|
|
|
|||
|
|
@ -1,3 +1,41 @@
|
|||
2020-09-27 Mark Eggleston <markeggleston@gcc.gnu.org>
|
||||
|
||||
Backported from master:
|
||||
2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
Mark Eggleston <markeggleston@gcc.gnu.org>
|
||||
|
||||
PR fortran/95614
|
||||
* decl.c (gfc_get_common): Use gfc_match_common_name instead
|
||||
of match_common_name.
|
||||
* decl.c (gfc_bind_idents): Use gfc_match_common_name instead
|
||||
of match_common_name.
|
||||
* match.c : Rename match_common_name to gfc_match_common_name.
|
||||
* match.c (gfc_match_common): Use gfc_match_common_name instead
|
||||
of match_common_name.
|
||||
* match.h : Rename match_common_name to gfc_match_common_name.
|
||||
* resolve.c (resolve_common_vars): Check each symbol in a
|
||||
common block has a global symbol. If there is a global symbol
|
||||
issue an error if the symbol type is known as is not a common
|
||||
block name.
|
||||
|
||||
2020-09-18 Tobias Burnus <tobias@codesourcery.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-17 Tobias Burnus <tobias@codesourcery.com>
|
||||
|
||||
PR fortran/96041
|
||||
PR fortran/93423
|
||||
* decl.c (gfc_match_submod_proc): Avoid later double-free
|
||||
in the error case.
|
||||
|
||||
2020-09-18 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
Backported from master:
|
||||
2020-07-02 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
PR fortran/93423
|
||||
* resolve.c (resolve_symbol): Avoid NULL pointer dereference.
|
||||
|
||||
2020-09-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
|
|
|
|||
|
|
@ -9801,6 +9801,15 @@ gfc_match_submod_proc (void)
|
|||
|
||||
if (gfc_match_eos () != MATCH_YES)
|
||||
{
|
||||
/* Unset st->n.sym. Note: in reject_statement (), the symbol changes are
|
||||
undone, such that the st->n.sym->formal points to the original symbol;
|
||||
if now this namespace is finalized, the formal namespace is freed,
|
||||
but it might be still needed in the parent namespace. */
|
||||
gfc_symtree *st = gfc_find_symtree (gfc_current_ns->sym_root, sym->name);
|
||||
st->n.sym = NULL;
|
||||
gfc_free_symbol (sym->tlink);
|
||||
sym->tlink = NULL;
|
||||
sym->refs--;
|
||||
gfc_syntax_error (ST_MODULE_PROC);
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15926,7 +15926,7 @@ resolve_symbol (gfc_symbol *sym)
|
|||
if (formal)
|
||||
{
|
||||
sym->formal_ns = formal->sym->ns;
|
||||
if (sym->ns != formal->sym->ns)
|
||||
if (sym->formal_ns && sym->ns != formal->sym->ns)
|
||||
sym->formal_ns->refs++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1071,6 +1071,8 @@ match_reload (signed char out, signed char *ins, signed char *outs,
|
|||
if (find_reg_note (curr_insn, REG_UNUSED, out_rtx) == NULL_RTX)
|
||||
{
|
||||
start_sequence ();
|
||||
if (out >= 0 && curr_static_id->operand[out].strict_low)
|
||||
out_rtx = gen_rtx_STRICT_LOW_PART (VOIDmode, out_rtx);
|
||||
lra_emit_move (out_rtx, copy_rtx (new_out_reg));
|
||||
emit_insn (*after);
|
||||
*after = get_insns ();
|
||||
|
|
|
|||
|
|
@ -490,13 +490,16 @@ void
|
|||
lra_emit_move (rtx x, rtx y)
|
||||
{
|
||||
int old;
|
||||
|
||||
rtx_insn *insn;
|
||||
|
||||
if (GET_CODE (y) != PLUS)
|
||||
{
|
||||
if (rtx_equal_p (x, y))
|
||||
return;
|
||||
old = max_reg_num ();
|
||||
rtx_insn *insn = emit_move_insn (x, y);
|
||||
|
||||
insn = (GET_CODE (x) != STRICT_LOW_PART
|
||||
? emit_move_insn (x, y) : emit_insn (gen_rtx_SET (x, y)));
|
||||
/* The move pattern may require scratch registers, so convert them
|
||||
into real registers now. */
|
||||
if (insn != NULL_RTX)
|
||||
|
|
|
|||
14
gcc/optabs.c
14
gcc/optabs.c
|
|
@ -1395,6 +1395,8 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1,
|
|||
if (target == 0
|
||||
|| target == op0
|
||||
|| target == op1
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| reg_overlap_mentioned_p (target, op1)
|
||||
|| !valid_multiword_target_p (target))
|
||||
target = gen_reg_rtx (int_mode);
|
||||
|
||||
|
|
@ -1475,6 +1477,8 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1,
|
|||
if (target == 0
|
||||
|| target == op0
|
||||
|| target == op1
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| reg_overlap_mentioned_p (target, op1)
|
||||
|| !valid_multiword_target_p (target))
|
||||
target = gen_reg_rtx (int_mode);
|
||||
|
||||
|
|
@ -1533,6 +1537,8 @@ expand_binop (machine_mode mode, optab binoptab, rtx op0, rtx op1,
|
|||
|| target == op0
|
||||
|| target == op1
|
||||
|| !REG_P (target)
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| reg_overlap_mentioned_p (target, op1)
|
||||
|| !valid_multiword_target_p (target))
|
||||
target = gen_reg_rtx (int_mode);
|
||||
|
||||
|
|
@ -2670,6 +2676,7 @@ expand_absneg_bit (enum rtx_code code, scalar_float_mode mode,
|
|||
|
||||
if (target == 0
|
||||
|| target == op0
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| (nwords > 1 && !valid_multiword_target_p (target)))
|
||||
target = gen_reg_rtx (mode);
|
||||
|
||||
|
|
@ -2948,7 +2955,10 @@ expand_unop (machine_mode mode, optab unoptab, rtx op0, rtx target,
|
|||
int i;
|
||||
rtx_insn *insns;
|
||||
|
||||
if (target == 0 || target == op0 || !valid_multiword_target_p (target))
|
||||
if (target == 0
|
||||
|| target == op0
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| !valid_multiword_target_p (target))
|
||||
target = gen_reg_rtx (int_mode);
|
||||
|
||||
start_sequence ();
|
||||
|
|
@ -3469,6 +3479,8 @@ expand_copysign_bit (scalar_float_mode mode, rtx op0, rtx op1, rtx target,
|
|||
if (target == 0
|
||||
|| target == op0
|
||||
|| target == op1
|
||||
|| reg_overlap_mentioned_p (target, op0)
|
||||
|| reg_overlap_mentioned_p (target, op1)
|
||||
|| (nwords > 1 && !valid_multiword_target_p (target)))
|
||||
target = gen_reg_rtx (mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,79 @@
|
|||
2020-09-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-27 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/97073
|
||||
* gcc.c-torture/execute/pr97073.c: New test.
|
||||
|
||||
2020-09-27 Mark Eggleston <markeggleston@gcc.gnu.org>
|
||||
|
||||
Backported from master:
|
||||
2020-09-27 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
Mark Eggleston <markeggleston@gcc.gnu.org>
|
||||
|
||||
PR fortran/95614
|
||||
* gfortran.dg/pr95614_1.f90: New test.
|
||||
* gfortran.dg/pr95614_2.f90: New test.
|
||||
|
||||
2020-09-25 Vladimir N. Makarov <vmakarov@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-06-04 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR middle-end/95464
|
||||
* gcc.target/i386/pr95464.c: New.
|
||||
|
||||
2020-09-25 Joe Ramsay <Joe.Ramsay@arm.com>
|
||||
|
||||
Backported from master:
|
||||
2020-08-20 Joe Ramsay <Joe.Ramsay@arm.com>
|
||||
|
||||
PR target/96683
|
||||
* gcc.target/arm/mve/intrinsics/vst1q_f16.c: New test.
|
||||
* gcc.target/arm/mve/intrinsics/vst1q_s16.c: New test.
|
||||
* gcc.target/arm/mve/intrinsics/vst1q_s8.c: New test.
|
||||
* gcc.target/arm/mve/intrinsics/vst1q_u16.c: New test.
|
||||
* gcc.target/arm/mve/intrinsics/vst1q_u8.c: New test.
|
||||
|
||||
2020-09-24 H.J. Lu <hjl.tools@gmail.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-16 H.J. Lu <hjl.tools@gmail.com>
|
||||
|
||||
PR target/97032
|
||||
* gcc.target/i386/pr97032.c: New test.
|
||||
|
||||
2020-09-22 David Faust <david.faust@oracle.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-22 David Faust <david.faust@oracle.com>
|
||||
|
||||
* gcc.target/bpf/diag-sdiv.c: New test.
|
||||
* gcc.target/bpf/diag-smod.c: New test.
|
||||
* gcc.target/bpf/xbpf-sdiv-1.c: New test.
|
||||
* gcc.target/bpf/xbpf-smod-1.c: New test.
|
||||
|
||||
2020-09-18 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
Backported from master:
|
||||
2020-07-02 Harald Anlauf <anlauf@gmx.de>
|
||||
|
||||
PR fortran/93423
|
||||
* gfortran.dg/pr93423.f90: New file.
|
||||
|
||||
2020-09-17 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-16 Marek Polacek <polacek@redhat.com>
|
||||
|
||||
PR preprocessor/96935
|
||||
* gcc.dg/format/pr96935.c: New test.
|
||||
|
||||
2020-09-17 liuhongt <hongtao.liu@intel.com>
|
||||
|
||||
* gcc.target/i386/xsave-avx-1.c: New test.
|
||||
|
||||
2020-09-16 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
/* PR middle-end/97073 */
|
||||
/* { dg-additional-options "-mno-stv" { target i?86-*-* x86_64-*-* } } */
|
||||
|
||||
typedef unsigned long long L;
|
||||
union U { L i; struct T { unsigned k; L l; } j; } u;
|
||||
|
||||
__attribute__((noinline,noclone)) void
|
||||
foo (L x)
|
||||
{
|
||||
u.j.l = u.i & x;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
u.i = 5;
|
||||
foo (-1ULL);
|
||||
if (u.j.l != 5)
|
||||
__builtin_abort ();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -460,6 +460,8 @@ static void clean_results (void)
|
|||
#endif
|
||||
CLEAN(result, float, 32, 4);
|
||||
|
||||
AARCH64_ONLY(CLEAN(result, float, 64, 2));
|
||||
|
||||
#if defined(__aarch64__)
|
||||
/* On AArch64, make sure to return DefaultNaN to have the same
|
||||
results as on AArch32. */
|
||||
|
|
@ -544,7 +546,8 @@ static void clean_results (void)
|
|||
DECL_VARIABLE(VAR, poly, 16, 8); \
|
||||
DECL_VARIABLE_CRYPTO(VAR, poly, 64, 2); \
|
||||
DECL_VARIABLE(VAR, float, 16, 8); \
|
||||
DECL_VARIABLE(VAR, float, 32, 4)
|
||||
DECL_VARIABLE(VAR, float, 32, 4); \
|
||||
AARCH64_ONLY(DECL_VARIABLE(VAR, float, 64, 2))
|
||||
#else
|
||||
#define DECL_VARIABLE_128BITS_VARIANTS(VAR) \
|
||||
DECL_VARIABLE_128BITS_SIGNED_VARIANTS(VAR); \
|
||||
|
|
@ -552,7 +555,8 @@ static void clean_results (void)
|
|||
DECL_VARIABLE(VAR, poly, 8, 16); \
|
||||
DECL_VARIABLE(VAR, poly, 16, 8); \
|
||||
DECL_VARIABLE_CRYPTO(VAR, poly, 64, 2); \
|
||||
DECL_VARIABLE(VAR, float, 32, 4)
|
||||
DECL_VARIABLE(VAR, float, 32, 4); \
|
||||
AARCH64_ONLY(DECL_VARIABLE(VAR, float, 64, 2))
|
||||
#endif
|
||||
/* Declare all variants. */
|
||||
#define DECL_VARIABLE_ALL_VARIANTS(VAR) \
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@ VECT_VAR_DECL(vreint_expected_q_p128_f32,poly,64,2) [] = { 0xc1700000c1800000,
|
|||
0xc1500000c1600000 };
|
||||
VECT_VAR_DECL(vreint_expected_q_p128_f16,poly,64,2) [] = { 0xca80cb00cb80cc00,
|
||||
0xc880c900c980ca00 };
|
||||
#ifdef __aarch64__
|
||||
VECT_VAR_DECL(vreint_expected_q_p128_f64,poly,64,2) [] = { 0xc030000000000000,
|
||||
0xc02e000000000000 };
|
||||
#endif
|
||||
|
||||
/* Expected results: vreinterpretq_*_p128. */
|
||||
VECT_VAR_DECL(vreint_expected_q_s8_p128,int,8,16) [] = { 0xf0, 0xff, 0xff, 0xff,
|
||||
|
|
@ -75,6 +79,10 @@ VECT_VAR_DECL(vreint_expected_q_f16_p128,hfloat,16,8) [] = { 0xfff0, 0xffff,
|
|||
0xffff, 0xffff,
|
||||
0xfff1, 0xffff,
|
||||
0xffff, 0xffff };
|
||||
#ifdef __aarch64__
|
||||
VECT_VAR_DECL(vreint_expected_q_f64_p128,hfloat,64,2) [] = { 0xfffffffffffffff0,
|
||||
0xfffffffffffffff1 };
|
||||
#endif
|
||||
|
||||
int main (void)
|
||||
{
|
||||
|
|
@ -90,6 +98,10 @@ int main (void)
|
|||
#endif
|
||||
VLOAD(vreint_vector, buffer, q, float, f, 32, 4);
|
||||
|
||||
#ifdef __aarch64__
|
||||
VLOAD(vreint_vector, buffer, q, float, f, 64, 2);
|
||||
#endif
|
||||
|
||||
/* vreinterpretq_p128_* tests. */
|
||||
#undef TEST_MSG
|
||||
#define TEST_MSG "VREINTERPRETQ_P128_*"
|
||||
|
|
@ -121,6 +133,10 @@ int main (void)
|
|||
#endif
|
||||
TEST_VREINTERPRET128(q, poly, p, 128, 1, float, f, 32, 4, vreint_expected_q_p128_f32);
|
||||
|
||||
#ifdef __aarch64__
|
||||
TEST_VREINTERPRET128(q, poly, p, 128, 1, float, f, 64, 2, vreint_expected_q_p128_f64);
|
||||
#endif
|
||||
|
||||
/* vreinterpretq_*_p128 tests. */
|
||||
#undef TEST_MSG
|
||||
#define TEST_MSG "VREINTERPRETQ_*_P128"
|
||||
|
|
@ -161,5 +177,8 @@ int main (void)
|
|||
#endif
|
||||
TEST_VREINTERPRET_FP_FROM_P128(q, float, f, 32, 4, poly, p, 128, 1, vreint_expected_q_f32_p128);
|
||||
|
||||
#ifdef __aarch64__
|
||||
TEST_VREINTERPRET_FP_FROM_P128(q, float, f, 64, 2, poly, p, 128, 1, vreint_expected_q_f64_p128);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -73,11 +73,8 @@ void exec_vtrn_half (void)
|
|||
/* Input vector can only have 64 bits. */
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector);
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector2);
|
||||
DECL_VARIABLE(vector, float, 64, 2);
|
||||
DECL_VARIABLE(vector2, float, 64, 2);
|
||||
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector_res);
|
||||
DECL_VARIABLE(vector_res, float, 64, 2);
|
||||
|
||||
clean_results ();
|
||||
/* We don't have vtrn1_T64x1, so set expected to the clean value. */
|
||||
|
|
|
|||
|
|
@ -70,11 +70,8 @@ void exec_vuzp_half (void)
|
|||
/* Input vector can only have 64 bits. */
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector);
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector2);
|
||||
DECL_VARIABLE(vector, float, 64, 2);
|
||||
DECL_VARIABLE(vector2, float, 64, 2);
|
||||
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector_res);
|
||||
DECL_VARIABLE(vector_res, float, 64, 2);
|
||||
|
||||
clean_results ();
|
||||
/* We don't have vuzp1_T64x1, so set expected to the clean value. */
|
||||
|
|
|
|||
|
|
@ -73,11 +73,8 @@ void exec_vzip_half (void)
|
|||
/* Input vector can only have 64 bits. */
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector);
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector2);
|
||||
DECL_VARIABLE(vector, float, 64, 2);
|
||||
DECL_VARIABLE(vector2, float, 64, 2);
|
||||
|
||||
DECL_VARIABLE_ALL_VARIANTS(vector_res);
|
||||
DECL_VARIABLE(vector_res, float, 64, 2);
|
||||
|
||||
clean_results ();
|
||||
/* We don't have vzip1_T64x1, so set expected to the clean value. */
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
poly64x2_t
|
||||
foo (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vtrn1q_p64 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
foo1 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vtrn2q_p64 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
foo2 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vuzp1q_p64 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
foo3 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vuzp2q_p64 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
foo4 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vzip1q_p64 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
foo5 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vzip2q_p64 (a, b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times {zip1\tv0.2d, v0.2d, v1.2d} 3 } } */
|
||||
/* { dg-final { scan-assembler-times {zip2\tv0.2d, v0.2d, v1.2d} 3 } } */
|
||||
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
poly8x8_t
|
||||
foo (poly8x8_t a, poly8x8_t b)
|
||||
{
|
||||
return vadd_p8 (a, b);
|
||||
}
|
||||
|
||||
poly16x4_t
|
||||
foo16 (poly16x4_t a, poly16x4_t b)
|
||||
{
|
||||
return vadd_p16 (a, b);
|
||||
}
|
||||
|
||||
poly64x1_t
|
||||
foo64 (poly64x1_t a, poly64x1_t b)
|
||||
{
|
||||
return vadd_p64 (a, b);
|
||||
}
|
||||
|
||||
poly8x16_t
|
||||
fooq (poly8x16_t a, poly8x16_t b)
|
||||
{
|
||||
return vaddq_p8 (a, b);
|
||||
}
|
||||
|
||||
poly16x8_t
|
||||
fooq16 (poly16x8_t a, poly16x8_t b)
|
||||
{
|
||||
return vaddq_p16 (a, b);
|
||||
}
|
||||
|
||||
poly64x2_t
|
||||
fooq64 (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vaddq_p64 (a, b);
|
||||
}
|
||||
|
||||
poly128_t
|
||||
fooq128 (poly128_t a, poly128_t b)
|
||||
{
|
||||
return vaddq_p128 (a, b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "eor\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b, v\[0-9\]+\.8b" 3 } } */
|
||||
/* { dg-final { scan-assembler-times "eor\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b, v\[0-9\]+\.16b" 3 } } */
|
||||
/* { dg-final { scan-assembler-times "eor\\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
uint64x2_t
|
||||
foo (poly64x2_t a, poly64x2_t b)
|
||||
{
|
||||
return vceqq_p64 (a, b);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" 1 } } */
|
||||
|
||||
uint64x1_t
|
||||
fooz (poly64x1_t a)
|
||||
{
|
||||
return vceqz_p64 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cmeq\\td\[0-9\]+, d\[0-9\]+, #0" 1 } } */
|
||||
|
||||
uint64x2_t
|
||||
fooqz (poly64x2_t a)
|
||||
{
|
||||
return vceqzq_p64 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, #0" 1 } } */
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
int16x8_t
|
||||
test_16x8 (uint16x8_t a)
|
||||
{
|
||||
return vclsq_u16 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
|
||||
|
||||
|
||||
int8x16_t
|
||||
test_8x16 (uint8x16_t a)
|
||||
{
|
||||
return vclsq_u8 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
|
||||
|
||||
int32x4_t
|
||||
test_32x4 (uint32x4_t a)
|
||||
{
|
||||
return vclsq_u32 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
|
||||
|
||||
int16x4_t
|
||||
test_16x4 (uint16x4_t a)
|
||||
{
|
||||
return vcls_u16 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 1 } } */
|
||||
|
||||
int8x8_t
|
||||
test_8x8 (uint8x8_t a)
|
||||
{
|
||||
return vcls_u8 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 1 } } */
|
||||
|
||||
int32x2_t
|
||||
test32x2 (uint32x2_t a)
|
||||
{
|
||||
return vcls_u32 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "cls\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
poly128_t
|
||||
test (poly128_t * p)
|
||||
{
|
||||
return vldrq_p128 (p);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times {ldp.*x0,.*x1,.*[x0]} 1 } } */
|
||||
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
float32_t
|
||||
test (float32_t a)
|
||||
{
|
||||
return vrndns_f32 (a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times "frintn\\ts\[0-9\]+, s\[0-9\]+" 1 } } */
|
||||
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-O" } */
|
||||
|
||||
#include <arm_neon.h>
|
||||
|
||||
void
|
||||
test (poly128_t *ptr, poly128_t a)
|
||||
{
|
||||
vstrq_p128 (ptr, a);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler-times {stp.*x2,.*x3,.*[x0]} 1 } } */
|
||||
|
|
@ -10,12 +10,16 @@ foo (float16_t * addr, float16x8_t value)
|
|||
vst1q_f16 (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
|
||||
void
|
||||
foo1 (float16_t * addr, float16x8_t value)
|
||||
{
|
||||
vst1q (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
/* { dg-final { scan-assembler-times "vstrh.16" 2 } } */
|
||||
|
||||
void
|
||||
foo2 (float16_t a, float16x8_t x)
|
||||
{
|
||||
vst1q (&a, x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,16 @@ foo (int16_t * addr, int16x8_t value)
|
|||
vst1q_s16 (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
|
||||
void
|
||||
foo1 (int16_t * addr, int16x8_t value)
|
||||
{
|
||||
vst1q (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
/* { dg-final { scan-assembler-times "vstrh.16" 2 } } */
|
||||
|
||||
void
|
||||
foo2 (int16_t a, int16x8_t x)
|
||||
{
|
||||
vst1q (&a, x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,16 @@ foo (int8_t * addr, int8x16_t value)
|
|||
vst1q_s8 (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrb.8" } } */
|
||||
|
||||
void
|
||||
foo1 (int8_t * addr, int8x16_t value)
|
||||
{
|
||||
vst1q (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrb.8" } } */
|
||||
/* { dg-final { scan-assembler-times "vstrb.8" 2 } } */
|
||||
|
||||
void
|
||||
foo2 (int8_t a, int8x16_t x)
|
||||
{
|
||||
vst1q (&a, x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,16 @@ foo (uint16_t * addr, uint16x8_t value)
|
|||
vst1q_u16 (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
|
||||
void
|
||||
foo1 (uint16_t * addr, uint16x8_t value)
|
||||
{
|
||||
vst1q (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrh.16" } } */
|
||||
/* { dg-final { scan-assembler-times "vstrh.16" 2 } } */
|
||||
|
||||
void
|
||||
foo2 (uint16_t a, uint16x8_t x)
|
||||
{
|
||||
vst1q (&a, x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,16 @@ foo (uint8_t * addr, uint8x16_t value)
|
|||
vst1q_u8 (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrb.8" } } */
|
||||
|
||||
void
|
||||
foo1 (uint8_t * addr, uint8x16_t value)
|
||||
{
|
||||
vst1q (addr, value);
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "vstrb.8" } } */
|
||||
/* { dg-final { scan-assembler-times "vstrb.8" 2 } } */
|
||||
|
||||
void
|
||||
foo2 (uint8_t a, uint8x16_t x)
|
||||
{
|
||||
vst1q (&a, x);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
/* Verify signed division does not produce 'sdiv' insn in eBPF. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0" } */
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
signed int x = 5;
|
||||
signed int y = 2;
|
||||
signed int z = x / y;
|
||||
}
|
||||
/* { dg-final { scan-assembler-not "sdiv(32)?\t%r" } } */
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
/* Verify signed modulo does not produce 'smod' insn in eBPF. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0" } */
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
signed int x = 5;
|
||||
signed int y = 2;
|
||||
signed int z = x % y;
|
||||
}
|
||||
/* { dg-final { scan-assembler-not "smod(32)?\t%r" } } */
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/* Verify that sdiv instruction is used for xBPF. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0 -mxbpf" } */
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
signed int x = 5;
|
||||
signed int y = 2;
|
||||
signed int z = x / y;
|
||||
signed int w = x / 3;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "sdiv(32)?\t%r" } } */
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
/* Verify that smod instruction is used for xBPF. */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O0 -mxbpf" } */
|
||||
|
||||
void
|
||||
foo ()
|
||||
{
|
||||
signed int x = 5;
|
||||
signed int y = 2;
|
||||
signed int z = x % y;
|
||||
signed int w = x % 3;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "smod(32)?\t%r" } } */
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
/* { dg-options "-O2" } */
|
||||
/* { dg-do run { target { { *-*-linux* } && { ! ia32 } } } } */
|
||||
|
||||
struct S { unsigned a:1, b:1, c:1, d:1, e:14, f:14; };
|
||||
|
||||
__attribute__((noipa)) int
|
||||
foo (struct S x)
|
||||
{
|
||||
if (x.a != 0 || x.b != 1 || x.c != 0 || x.d != 1
|
||||
|| x.e != 7239 || x.f != 6474)
|
||||
__builtin_abort ();
|
||||
}
|
||||
|
||||
__attribute__((noipa)) void
|
||||
bar (struct S x, struct S y)
|
||||
{
|
||||
if (x.a != 0 || x.b != 1 || x.c != 0 || x.d != 1
|
||||
|| x.e != 7239 || x.f != 6474)
|
||||
__builtin_abort ();
|
||||
if (y.a != 0 || y.b != 1 || y.c != 1 || y.d != 1
|
||||
|| y.e != 16320 || y.f != 7315)
|
||||
__builtin_abort ();
|
||||
}
|
||||
|
||||
__attribute__((noipa)) void
|
||||
baz (struct S x)
|
||||
{
|
||||
if (x.a != 1 || x.b != 1 || x.c != 1 || x.d != 1
|
||||
|| x.e != 16320 || x.f != 7315)
|
||||
__builtin_abort ();
|
||||
}
|
||||
|
||||
__attribute__((noipa)) void
|
||||
qux (struct S x, struct S y, unsigned z)
|
||||
{
|
||||
struct S a = x, b;
|
||||
for (unsigned i = 0; i < z; ++i)
|
||||
foo (x);
|
||||
if (x.a && x.e == 16)
|
||||
a.e = 32;
|
||||
b = a;
|
||||
b.c = y.c;
|
||||
b.e = y.e;
|
||||
b.f = y.f;
|
||||
bar (a, b);
|
||||
a = b;
|
||||
__asm volatile ("" : : : "ax", "bx", "cx", "dx", "si", "di",
|
||||
#ifdef __OPTIMIZE__
|
||||
"bp",
|
||||
#endif
|
||||
"r8", "r9", "r10", "r11", "r12", "r13", "r14", "r15");
|
||||
a.a = 1;
|
||||
a.c = 1;
|
||||
baz (a);
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct S x = { 0, 1, 0, 1, 7239, 6474 };
|
||||
struct S y = { 1, 0, 1, 0, 16320, 7315 };
|
||||
qux (x, y, 1);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
/* { dg-do compile { target { ia32 && fstack_protector } } } */
|
||||
/* { dg-options "-O2 -mincoming-stack-boundary=2 -fstack-protector-all" } */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
extern int *__errno_location (void);
|
||||
|
||||
long
|
||||
sys_socketcall (int op, ...)
|
||||
{
|
||||
long int res;
|
||||
va_list ap;
|
||||
va_start (ap, op);
|
||||
asm volatile ("push %%ebx; movl %2, %%ebx; int $0x80; pop %%ebx"
|
||||
/* { dg-warning "listing the stack pointer register" "" { target *-*-* } .-1 } */
|
||||
: "=a" (res) : "0" (102), "ri" (16), "c" (ap) : "memory", "esp");
|
||||
if (__builtin_expect (res > 4294963200UL, 0))
|
||||
*__errno_location () = -res;
|
||||
va_end (ap);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* { dg-final { scan-assembler "call\[ \t\]*_?__errno_location" } } */
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
! { dg-do compile }
|
||||
! PR fortran/93423 - ICE on invalid with argument list for module procedure
|
||||
|
||||
module t
|
||||
type :: b
|
||||
contains
|
||||
procedure :: p => bp
|
||||
end type b
|
||||
interface
|
||||
module function bp(s)
|
||||
class(b), intent(inout) :: s
|
||||
integer, pointer :: bp
|
||||
end function
|
||||
end interface
|
||||
end module t
|
||||
|
||||
submodule (t) ts
|
||||
contains
|
||||
module procedure bp(s) ! { dg-error "must be in a generic module interface" }
|
||||
end procedure bp ! { dg-error "Expecting END SUBMODULE statement" }
|
||||
end submodule ts
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
-- { dg-do compile }
|
||||
|
||||
with Addr16_Pkg; use Addr16_Pkg;
|
||||
|
||||
procedure Addr16 (R : Rec) is
|
||||
|
||||
pragma Unsuppress (Alignment_Check);
|
||||
|
||||
B : Integer;
|
||||
for B'Address use R.A'Address;
|
||||
|
||||
begin
|
||||
null;
|
||||
end;
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
package Addr16_Pkg is
|
||||
|
||||
type Arr is array (Positive range <>) of Long_Long_Integer;
|
||||
|
||||
type Rec (D : Positive) is record
|
||||
A : Arr (1 .. D);
|
||||
end record;
|
||||
|
||||
end Addr16_Pkg;
|
||||
|
|
@ -1,3 +1,14 @@
|
|||
2020-09-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-24 Alan Modra <amodra@gmail.com>
|
||||
|
||||
PR target/97166
|
||||
* src/powerpc/linux64.S (ffi_call_LINUX64): Don't emit global
|
||||
entry when __PCREL__. Call using @notoc. Add nops.
|
||||
* src/powerpc/linux64_closure.S (ffi_closure_LINUX64): Likewise.
|
||||
(ffi_go_closure_linux64): Likewise.
|
||||
|
||||
2020-07-23 Release Manager
|
||||
|
||||
* GCC 10.2.0 released.
|
||||
|
|
|
|||
|
|
@ -36,8 +36,10 @@
|
|||
.cfi_startproc
|
||||
# if _CALL_ELF == 2
|
||||
ffi_call_LINUX64:
|
||||
# ifndef __PCREL__
|
||||
addis %r2, %r12, .TOC.-ffi_call_LINUX64@ha
|
||||
addi %r2, %r2, .TOC.-ffi_call_LINUX64@l
|
||||
# endif
|
||||
.localentry ffi_call_LINUX64, . - ffi_call_LINUX64
|
||||
# else
|
||||
.section ".opd","aw"
|
||||
|
|
@ -89,9 +91,15 @@ ffi_call_LINUX64:
|
|||
/* Call ffi_prep_args64. */
|
||||
mr %r4, %r1
|
||||
# if defined _CALL_LINUX || _CALL_ELF == 2
|
||||
# ifdef __PCREL__
|
||||
bl ffi_prep_args64@notoc
|
||||
# else
|
||||
bl ffi_prep_args64
|
||||
nop
|
||||
# endif
|
||||
# else
|
||||
bl .ffi_prep_args64
|
||||
nop
|
||||
# endif
|
||||
|
||||
# if _CALL_ELF == 2
|
||||
|
|
|
|||
|
|
@ -37,8 +37,10 @@
|
|||
.cfi_startproc
|
||||
# if _CALL_ELF == 2
|
||||
ffi_closure_LINUX64:
|
||||
# ifndef __PCREL__
|
||||
addis %r2, %r12, .TOC.-ffi_closure_LINUX64@ha
|
||||
addi %r2, %r2, .TOC.-ffi_closure_LINUX64@l
|
||||
# endif
|
||||
.localentry ffi_closure_LINUX64, . - ffi_closure_LINUX64
|
||||
# else
|
||||
.section ".opd","aw"
|
||||
|
|
@ -143,7 +145,7 @@ ffi_closure_LINUX64:
|
|||
stfd %f12, -104+(11*8)(%r1)
|
||||
stfd %f13, -104+(12*8)(%r1)
|
||||
|
||||
# load up the pointer to the saved fpr registers */
|
||||
# load up the pointer to the saved fpr registers
|
||||
addi %r8, %r1, -104
|
||||
|
||||
# load up the pointer to the result storage
|
||||
|
|
@ -155,11 +157,19 @@ ffi_closure_LINUX64:
|
|||
|
||||
# make the call
|
||||
# if defined _CALL_LINUX || _CALL_ELF == 2
|
||||
# ifdef __PCREL__
|
||||
bl ffi_closure_helper_LINUX64@notoc
|
||||
.Lret:
|
||||
# else
|
||||
bl ffi_closure_helper_LINUX64
|
||||
.Lret:
|
||||
nop
|
||||
# endif
|
||||
# else
|
||||
bl .ffi_closure_helper_LINUX64
|
||||
# endif
|
||||
.Lret:
|
||||
nop
|
||||
# endif
|
||||
|
||||
# now r3 contains the return type
|
||||
# so use it to look up in a table
|
||||
|
|
@ -396,8 +406,10 @@ ffi_closure_LINUX64:
|
|||
.cfi_startproc
|
||||
# if _CALL_ELF == 2
|
||||
ffi_go_closure_linux64:
|
||||
# ifndef __PCREL__
|
||||
addis %r2, %r12, .TOC.-ffi_go_closure_linux64@ha
|
||||
addi %r2, %r2, .TOC.-ffi_go_closure_linux64@l
|
||||
# endif
|
||||
.localentry ffi_go_closure_linux64, . - ffi_go_closure_linux64
|
||||
# else
|
||||
.section ".opd","aw"
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ s-zstdpkglist: Makefile
|
|||
echo 'package goroot' > zstdpkglist.go.tmp
|
||||
echo "" >> zstdpkglist.go.tmp
|
||||
echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp
|
||||
echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's|[a-z0-9_./]*_c\.lo||g' | sed 's|\([a-z0-9_./]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
|
||||
echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's|[a-z0-9_./]*_c\.lo||g' | sed 's|golang\.org/[a-z0-9_./]*\.lo||g' | sed 's|\([a-z0-9_./]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
|
||||
echo '}' >> zstdpkglist.go.tmp
|
||||
$(SHELL) $(srcdir)/mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go
|
||||
$(STAMP) $@
|
||||
|
|
|
|||
|
|
@ -2743,7 +2743,7 @@ s-zstdpkglist: Makefile
|
|||
echo 'package goroot' > zstdpkglist.go.tmp
|
||||
echo "" >> zstdpkglist.go.tmp
|
||||
echo 'var stdpkg = map[string]bool{' >> zstdpkglist.go.tmp
|
||||
echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's|[a-z0-9_./]*_c\.lo||g' | sed 's|\([a-z0-9_./]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
|
||||
echo $(libgo_go_objs) 'unsafe.lo' 'runtime/cgo.lo' | sed 's|[a-z0-9_./]*_c\.lo||g' | sed 's|golang\.org/[a-z0-9_./]*\.lo||g' | sed 's|\([a-z0-9_./]*\)\.lo|"\1": true,|g' >> zstdpkglist.go.tmp
|
||||
echo '}' >> zstdpkglist.go.tmp
|
||||
$(SHELL) $(srcdir)/mvifdiff.sh zstdpkglist.go.tmp zstdpkglist.go
|
||||
$(STAMP) $@
|
||||
|
|
|
|||
|
|
@ -1,3 +1,81 @@
|
|||
2020-09-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/97167
|
||||
* src/c++17/fs_path.cc (path::_Parser::root_path()): Check
|
||||
for empty string before inspecting the first character.
|
||||
* testsuite/27_io/filesystem/path/append/source.cc: Append
|
||||
empty string_view to path.
|
||||
|
||||
2020-09-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/96803
|
||||
* include/std/tuple
|
||||
(_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
|
||||
Use correct value category in __use_alloc call.
|
||||
* testsuite/20_util/tuple/cons/96803.cc: Check with constructors
|
||||
that require correct value category to be used.
|
||||
|
||||
2020-09-22 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-08-26 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/96803
|
||||
* include/std/tuple
|
||||
(_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
|
||||
Replace parameter pack with a type parameter and a pack and pass
|
||||
the first type to __use_alloc.
|
||||
* testsuite/20_util/tuple/cons/96803.cc: New test.
|
||||
|
||||
2020-09-21 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-08-10 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/94681
|
||||
* src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
|
||||
of calling ::lstat directly.
|
||||
* src/filesystem/ops.cc (read_symlink): Likewise.
|
||||
|
||||
2020-09-21 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-08-10 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/94681
|
||||
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
|
||||
$enable_libstdcxx_filesystem_ts.
|
||||
* configure: Regenerate.
|
||||
|
||||
2020-09-21 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-20 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/97101
|
||||
* include/std/functional (bind_front): Fix order of parameters
|
||||
in is_nothrow_constructible_v specialization.
|
||||
* testsuite/20_util/function_objects/bind_front/97101.cc: New test.
|
||||
|
||||
2020-09-21 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
2020-09-10 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
PR libstdc++/94160
|
||||
* src/c++17/memory_resource.cc (munge_options): Round
|
||||
max_blocks_per_chunk to a multiple of four.
|
||||
(__pool_resource::_M_alloc_pools()): Simplify slightly.
|
||||
* testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
|
||||
Check that valid pointers are returned when small values are
|
||||
used for max_blocks_per_chunk.
|
||||
|
||||
2020-09-03 Jonathan Wakely <jwakely@redhat.com>
|
||||
|
||||
Backported from master:
|
||||
|
|
|
|||
|
|
@ -4536,7 +4536,8 @@ AC_DEFUN([GLIBCXX_ENABLE_FILESYSTEM_TS], [
|
|||
])
|
||||
|
||||
dnl
|
||||
dnl Check whether the library calls required by the Filesystem TS are present.
|
||||
dnl Check whether the library calls required by the C++17 Filesystem library
|
||||
dnl and the Filesystem TS are present.
|
||||
dnl Defines:
|
||||
dnl HAVE_STRUCT_DIRENT_D_TYPE
|
||||
dnl _GLIBCXX_USE_REALPATH
|
||||
|
|
@ -4551,226 +4552,224 @@ dnl HAVE_SYMLINK
|
|||
dnl
|
||||
AC_DEFUN([GLIBCXX_CHECK_FILESYSTEM_DEPS], [dnl
|
||||
dnl
|
||||
if test $enable_libstdcxx_filesystem_ts = yes; then
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
dnl
|
||||
AC_MSG_CHECKING([for struct dirent.d_type])
|
||||
AC_CACHE_VAL(glibcxx_cv_dirent_d_type, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <dirent.h>],
|
||||
[
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
],
|
||||
[glibcxx_cv_dirent_d_type=yes],
|
||||
[glibcxx_cv_dirent_d_type=no])
|
||||
])
|
||||
if test $glibcxx_cv_dirent_d_type = yes; then
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, [Define to 1 if `d_type' is a member of `struct dirent'.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_dirent_d_type)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for realpath])
|
||||
AC_CACHE_VAL(glibcxx_cv_realpath, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
],
|
||||
[
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
],
|
||||
[glibcxx_cv_realpath=yes],
|
||||
[glibcxx_cv_realpath=no])
|
||||
])
|
||||
if test $glibcxx_cv_realpath = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_REALPATH, 1, [Define if usable realpath is available in <stdlib.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_realpath)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for utimensat])
|
||||
AC_CACHE_VAL(glibcxx_cv_utimensat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
],
|
||||
[
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
],
|
||||
[glibcxx_cv_utimensat=yes],
|
||||
[glibcxx_cv_utimensat=no])
|
||||
])
|
||||
if test $glibcxx_cv_utimensat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_UTIMENSAT, 1, [Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_utimensat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for utime])
|
||||
AC_CACHE_VAL(glibcxx_cv_utime, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <utime.h>
|
||||
],
|
||||
[
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
],
|
||||
[glibcxx_cv_utime=yes],
|
||||
[glibcxx_cv_utime=no])
|
||||
])
|
||||
if test $glibcxx_cv_utime = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_UTIME, 1, [Define if utime is available in <utime.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_utime)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for lstat])
|
||||
AC_CACHE_VAL(glibcxx_cv_lstat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[ #include <sys/stat.h> ],
|
||||
[
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
],
|
||||
[glibcxx_cv_lstat=yes],
|
||||
[glibcxx_cv_lstat=no])
|
||||
])
|
||||
if test $glibcxx_cv_lstat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_LSTAT, 1, [Define if lstat is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_lstat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for struct stat.st_mtim.tv_nsec])
|
||||
AC_CACHE_VAL(glibcxx_cv_st_mtim, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[ #include <sys/stat.h> ],
|
||||
[
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
],
|
||||
[glibcxx_cv_st_mtim=yes],
|
||||
[glibcxx_cv_st_mtim=no])
|
||||
])
|
||||
if test $glibcxx_cv_st_mtim = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_ST_MTIM, 1, [Define if struct stat has timespec members.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_st_mtim)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for fchmod])
|
||||
AC_CACHE_VAL(glibcxx_cv_fchmod, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <sys/stat.h>],
|
||||
[fchmod(1, S_IWUSR);],
|
||||
[glibcxx_cv_fchmod=yes],
|
||||
[glibcxx_cv_fchmod=no])
|
||||
])
|
||||
if test $glibcxx_cv_fchmod = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_FCHMOD, 1, [Define if fchmod is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_fchmod)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for fchmodat])
|
||||
AC_CACHE_VAL(glibcxx_cv_fchmodat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
],
|
||||
[fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);],
|
||||
[glibcxx_cv_fchmodat=yes],
|
||||
[glibcxx_cv_fchmodat=no])
|
||||
])
|
||||
if test $glibcxx_cv_fchmodat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_FCHMODAT, 1, [Define if fchmodat is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_fchmodat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for sendfile that can copy files])
|
||||
AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl
|
||||
case "${target_os}" in
|
||||
gnu* | linux* | solaris* | uclinux*)
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <sys/sendfile.h>],
|
||||
[sendfile(1, 2, (off_t*)0, sizeof 1);],
|
||||
[glibcxx_cv_sendfile=yes],
|
||||
[glibcxx_cv_sendfile=no])
|
||||
;;
|
||||
*)
|
||||
glibcxx_cv_sendfile=no
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test $glibcxx_cv_sendfile = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/sendfile.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_sendfile)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for link])
|
||||
AC_CACHE_VAL(glibcxx_cv_link, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[link("", "");],
|
||||
[glibcxx_cv_link=yes],
|
||||
[glibcxx_cv_link=no])
|
||||
])
|
||||
if test $glibcxx_cv_link = yes; then
|
||||
AC_DEFINE(HAVE_LINK, 1, [Define if link is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_link)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for readlink])
|
||||
AC_CACHE_VAL(glibcxx_cv_readlink, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[char buf[32]; readlink("", buf, sizeof(buf));],
|
||||
[glibcxx_cv_readlink=yes],
|
||||
[glibcxx_cv_readlink=no])
|
||||
])
|
||||
if test $glibcxx_cv_readlink = yes; then
|
||||
AC_DEFINE(HAVE_READLINK, 1, [Define if readlink is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_readlink)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for symlink])
|
||||
AC_CACHE_VAL(glibcxx_cv_symlink, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[symlink("", "");],
|
||||
[glibcxx_cv_symlink=yes],
|
||||
[glibcxx_cv_symlink=no])
|
||||
])
|
||||
if test $glibcxx_cv_symlink = yes; then
|
||||
AC_DEFINE(HAVE_SYMLINK, 1, [Define if symlink is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_symlink)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for truncate])
|
||||
AC_CACHE_VAL(glibcxx_cv_truncate, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[truncate("", 99);],
|
||||
[glibcxx_cv_truncate=yes],
|
||||
[glibcxx_cv_truncate=no])
|
||||
])
|
||||
if test $glibcxx_cv_truncate = yes; then
|
||||
AC_DEFINE(HAVE_TRUNCATE, 1, [Define if truncate is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_truncate)
|
||||
dnl
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
AC_MSG_CHECKING([for struct dirent.d_type])
|
||||
AC_CACHE_VAL(glibcxx_cv_dirent_d_type, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <dirent.h>],
|
||||
[
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
],
|
||||
[glibcxx_cv_dirent_d_type=yes],
|
||||
[glibcxx_cv_dirent_d_type=no])
|
||||
])
|
||||
if test $glibcxx_cv_dirent_d_type = yes; then
|
||||
AC_DEFINE(HAVE_STRUCT_DIRENT_D_TYPE, 1, [Define to 1 if `d_type' is a member of `struct dirent'.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_dirent_d_type)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for realpath])
|
||||
AC_CACHE_VAL(glibcxx_cv_realpath, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
],
|
||||
[
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
],
|
||||
[glibcxx_cv_realpath=yes],
|
||||
[glibcxx_cv_realpath=no])
|
||||
])
|
||||
if test $glibcxx_cv_realpath = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_REALPATH, 1, [Define if usable realpath is available in <stdlib.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_realpath)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for utimensat])
|
||||
AC_CACHE_VAL(glibcxx_cv_utimensat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
],
|
||||
[
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
],
|
||||
[glibcxx_cv_utimensat=yes],
|
||||
[glibcxx_cv_utimensat=no])
|
||||
])
|
||||
if test $glibcxx_cv_utimensat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_UTIMENSAT, 1, [Define if utimensat and UTIME_OMIT are available in <sys/stat.h> and AT_FDCWD in <fcntl.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_utimensat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for utime])
|
||||
AC_CACHE_VAL(glibcxx_cv_utime, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <utime.h>
|
||||
],
|
||||
[
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
],
|
||||
[glibcxx_cv_utime=yes],
|
||||
[glibcxx_cv_utime=no])
|
||||
])
|
||||
if test $glibcxx_cv_utime = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_UTIME, 1, [Define if utime is available in <utime.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_utime)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for lstat])
|
||||
AC_CACHE_VAL(glibcxx_cv_lstat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[ #include <sys/stat.h> ],
|
||||
[
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
],
|
||||
[glibcxx_cv_lstat=yes],
|
||||
[glibcxx_cv_lstat=no])
|
||||
])
|
||||
if test $glibcxx_cv_lstat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_LSTAT, 1, [Define if lstat is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_lstat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for struct stat.st_mtim.tv_nsec])
|
||||
AC_CACHE_VAL(glibcxx_cv_st_mtim, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[ #include <sys/stat.h> ],
|
||||
[
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
],
|
||||
[glibcxx_cv_st_mtim=yes],
|
||||
[glibcxx_cv_st_mtim=no])
|
||||
])
|
||||
if test $glibcxx_cv_st_mtim = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_ST_MTIM, 1, [Define if struct stat has timespec members.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_st_mtim)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for fchmod])
|
||||
AC_CACHE_VAL(glibcxx_cv_fchmod, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <sys/stat.h>],
|
||||
[fchmod(1, S_IWUSR);],
|
||||
[glibcxx_cv_fchmod=yes],
|
||||
[glibcxx_cv_fchmod=no])
|
||||
])
|
||||
if test $glibcxx_cv_fchmod = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_FCHMOD, 1, [Define if fchmod is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_fchmod)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for fchmodat])
|
||||
AC_CACHE_VAL(glibcxx_cv_fchmodat, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
],
|
||||
[fchmodat(AT_FDCWD, "", 0, AT_SYMLINK_NOFOLLOW);],
|
||||
[glibcxx_cv_fchmodat=yes],
|
||||
[glibcxx_cv_fchmodat=no])
|
||||
])
|
||||
if test $glibcxx_cv_fchmodat = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_FCHMODAT, 1, [Define if fchmodat is available in <sys/stat.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_fchmodat)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for sendfile that can copy files])
|
||||
AC_CACHE_VAL(glibcxx_cv_sendfile, [dnl
|
||||
case "${target_os}" in
|
||||
gnu* | linux* | solaris* | uclinux*)
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <sys/sendfile.h>],
|
||||
[sendfile(1, 2, (off_t*)0, sizeof 1);],
|
||||
[glibcxx_cv_sendfile=yes],
|
||||
[glibcxx_cv_sendfile=no])
|
||||
;;
|
||||
*)
|
||||
glibcxx_cv_sendfile=no
|
||||
;;
|
||||
esac
|
||||
])
|
||||
if test $glibcxx_cv_sendfile = yes; then
|
||||
AC_DEFINE(_GLIBCXX_USE_SENDFILE, 1, [Define if sendfile is available in <sys/sendfile.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_sendfile)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for link])
|
||||
AC_CACHE_VAL(glibcxx_cv_link, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[link("", "");],
|
||||
[glibcxx_cv_link=yes],
|
||||
[glibcxx_cv_link=no])
|
||||
])
|
||||
if test $glibcxx_cv_link = yes; then
|
||||
AC_DEFINE(HAVE_LINK, 1, [Define if link is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_link)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for readlink])
|
||||
AC_CACHE_VAL(glibcxx_cv_readlink, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[char buf[32]; readlink("", buf, sizeof(buf));],
|
||||
[glibcxx_cv_readlink=yes],
|
||||
[glibcxx_cv_readlink=no])
|
||||
])
|
||||
if test $glibcxx_cv_readlink = yes; then
|
||||
AC_DEFINE(HAVE_READLINK, 1, [Define if readlink is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_readlink)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for symlink])
|
||||
AC_CACHE_VAL(glibcxx_cv_symlink, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[symlink("", "");],
|
||||
[glibcxx_cv_symlink=yes],
|
||||
[glibcxx_cv_symlink=no])
|
||||
])
|
||||
if test $glibcxx_cv_symlink = yes; then
|
||||
AC_DEFINE(HAVE_SYMLINK, 1, [Define if symlink is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_symlink)
|
||||
dnl
|
||||
AC_MSG_CHECKING([for truncate])
|
||||
AC_CACHE_VAL(glibcxx_cv_truncate, [dnl
|
||||
GCC_TRY_COMPILE_OR_LINK(
|
||||
[#include <unistd.h>],
|
||||
[truncate("", 99);],
|
||||
[glibcxx_cv_truncate=yes],
|
||||
[glibcxx_cv_truncate=no])
|
||||
])
|
||||
if test $glibcxx_cv_truncate = yes; then
|
||||
AC_DEFINE(HAVE_TRUNCATE, 1, [Define if truncate is available in <unistd.h>.])
|
||||
fi
|
||||
AC_MSG_RESULT($glibcxx_cv_truncate)
|
||||
dnl
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
dnl
|
||||
|
|
|
|||
|
|
@ -75962,22 +75962,21 @@ $as_echo_n "checking whether to build Filesystem TS support... " >&6; }
|
|||
$as_echo "$enable_libstdcxx_filesystem_ts" >&6; }
|
||||
|
||||
|
||||
if test $enable_libstdcxx_filesystem_ts = yes; then
|
||||
|
||||
ac_ext=cpp
|
||||
ac_ext=cpp
|
||||
ac_cpp='$CXXCPP $CPPFLAGS'
|
||||
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_type" >&5
|
||||
ac_save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -fno-exceptions"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct dirent.d_type" >&5
|
||||
$as_echo_n "checking for struct dirent.d_type... " >&6; }
|
||||
if ${glibcxx_cv_dirent_d_type+:} false; then :
|
||||
if ${glibcxx_cv_dirent_d_type+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <dirent.h>
|
||||
|
|
@ -75985,8 +75984,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76009,8 +76008,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
struct dirent d;
|
||||
if (sizeof d.d_type) return 0;
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76027,37 +76026,37 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_dirent_d_type = yes; then
|
||||
if test $glibcxx_cv_dirent_d_type = yes; then
|
||||
|
||||
$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_dirent_d_type" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_dirent_d_type" >&5
|
||||
$as_echo "$glibcxx_cv_dirent_d_type" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for realpath" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for realpath" >&5
|
||||
$as_echo_n "checking for realpath... " >&6; }
|
||||
if ${glibcxx_cv_realpath+:} false; then :
|
||||
if ${glibcxx_cv_realpath+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76076,21 +76075,21 @@ fi
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
#if _XOPEN_VERSION < 500
|
||||
#error
|
||||
#elif _XOPEN_VERSION >= 700 || defined(PATH_MAX)
|
||||
char *tmp = realpath((const char*)NULL, (char*)NULL);
|
||||
#else
|
||||
#error
|
||||
#endif
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76107,31 +76106,31 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_realpath = yes; then
|
||||
if test $glibcxx_cv_realpath = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_REALPATH 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_realpath" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_realpath" >&5
|
||||
$as_echo "$glibcxx_cv_realpath" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimensat" >&5
|
||||
$as_echo_n "checking for utimensat... " >&6; }
|
||||
if ${glibcxx_cv_utimensat+:} false; then :
|
||||
if ${glibcxx_cv_utimensat+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76150,15 +76149,15 @@ fi
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
struct timespec ts[2] = { { 0, UTIME_OMIT }, { 1, 1 } };
|
||||
int i = utimensat(AT_FDCWD, "path", ts, 0);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76175,30 +76174,30 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_utimensat = yes; then
|
||||
if test $glibcxx_cv_utimensat = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_UTIMENSAT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utimensat" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utimensat" >&5
|
||||
$as_echo "$glibcxx_cv_utimensat" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utime" >&5
|
||||
$as_echo_n "checking for utime... " >&6; }
|
||||
if ${glibcxx_cv_utime+:} false; then :
|
||||
if ${glibcxx_cv_utime+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <utime.h>
|
||||
#include <utime.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76217,14 +76216,14 @@ fi
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <utime.h>
|
||||
#include <utime.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
struct utimbuf t = { 1, 1 };
|
||||
int i = utime("path", &t);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76241,19 +76240,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_utime = yes; then
|
||||
if test $glibcxx_cv_utime = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_UTIME 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utime" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_utime" >&5
|
||||
$as_echo "$glibcxx_cv_utime" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5
|
||||
$as_echo_n "checking for lstat... " >&6; }
|
||||
if ${glibcxx_cv_lstat+:} false; then :
|
||||
if ${glibcxx_cv_lstat+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -76261,8 +76260,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76285,8 +76284,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
struct stat st;
|
||||
int i = lstat("path", &st);
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76303,19 +76302,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_lstat = yes; then
|
||||
if test $glibcxx_cv_lstat = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_LSTAT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_lstat" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_lstat" >&5
|
||||
$as_echo "$glibcxx_cv_lstat" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat.st_mtim.tv_nsec" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct stat.st_mtim.tv_nsec" >&5
|
||||
$as_echo_n "checking for struct stat.st_mtim.tv_nsec... " >&6; }
|
||||
if ${glibcxx_cv_st_mtim+:} false; then :
|
||||
if ${glibcxx_cv_st_mtim+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -76323,8 +76322,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76347,8 +76346,8 @@ int
|
|||
main ()
|
||||
{
|
||||
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
struct stat st;
|
||||
return st.st_mtim.tv_nsec;
|
||||
|
||||
;
|
||||
return 0;
|
||||
|
|
@ -76365,19 +76364,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_st_mtim = yes; then
|
||||
if test $glibcxx_cv_st_mtim = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_ST_MTIM 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_st_mtim" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_st_mtim" >&5
|
||||
$as_echo "$glibcxx_cv_st_mtim" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmod" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmod" >&5
|
||||
$as_echo_n "checking for fchmod... " >&6; }
|
||||
if ${glibcxx_cv_fchmod+:} false; then :
|
||||
if ${glibcxx_cv_fchmod+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/stat.h>
|
||||
|
|
@ -76421,24 +76420,24 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_fchmod = yes; then
|
||||
if test $glibcxx_cv_fchmod = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_FCHMOD 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmod" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmod" >&5
|
||||
$as_echo "$glibcxx_cv_fchmod" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchmodat" >&5
|
||||
$as_echo_n "checking for fchmodat... " >&6; }
|
||||
if ${glibcxx_cv_fchmodat+:} false; then :
|
||||
if ${glibcxx_cv_fchmodat+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
|
|
@ -76461,8 +76460,8 @@ fi
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
|
|
@ -76483,21 +76482,21 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_fchmodat = yes; then
|
||||
if test $glibcxx_cv_fchmodat = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_FCHMODAT 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmodat" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_fchmodat" >&5
|
||||
$as_echo "$glibcxx_cv_fchmodat" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile that can copy files" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile that can copy files" >&5
|
||||
$as_echo_n "checking for sendfile that can copy files... " >&6; }
|
||||
if ${glibcxx_cv_sendfile+:} false; then :
|
||||
if ${glibcxx_cv_sendfile+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
case "${target_os}" in
|
||||
gnu* | linux* | solaris* | uclinux*)
|
||||
if test x$gcc_no_link = xyes; then
|
||||
case "${target_os}" in
|
||||
gnu* | linux* | solaris* | uclinux*)
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <sys/sendfile.h>
|
||||
|
|
@ -76538,27 +76537,27 @@ fi
|
|||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
glibcxx_cv_sendfile=no
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
glibcxx_cv_sendfile=no
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_sendfile = yes; then
|
||||
if test $glibcxx_cv_sendfile = yes; then
|
||||
|
||||
$as_echo "#define _GLIBCXX_USE_SENDFILE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sendfile" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_sendfile" >&5
|
||||
$as_echo "$glibcxx_cv_sendfile" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
|
||||
$as_echo_n "checking for link... " >&6; }
|
||||
if ${glibcxx_cv_link+:} false; then :
|
||||
if ${glibcxx_cv_link+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
|
|
@ -76602,19 +76601,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_link = yes; then
|
||||
if test $glibcxx_cv_link = yes; then
|
||||
|
||||
$as_echo "#define HAVE_LINK 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_link" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_link" >&5
|
||||
$as_echo "$glibcxx_cv_link" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readlink" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for readlink" >&5
|
||||
$as_echo_n "checking for readlink... " >&6; }
|
||||
if ${glibcxx_cv_readlink+:} false; then :
|
||||
if ${glibcxx_cv_readlink+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
|
|
@ -76658,19 +76657,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_readlink = yes; then
|
||||
if test $glibcxx_cv_readlink = yes; then
|
||||
|
||||
$as_echo "#define HAVE_READLINK 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_readlink" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_readlink" >&5
|
||||
$as_echo "$glibcxx_cv_readlink" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
|
||||
$as_echo_n "checking for symlink... " >&6; }
|
||||
if ${glibcxx_cv_symlink+:} false; then :
|
||||
if ${glibcxx_cv_symlink+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
|
|
@ -76714,19 +76713,19 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_symlink = yes; then
|
||||
if test $glibcxx_cv_symlink = yes; then
|
||||
|
||||
$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_symlink" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_symlink" >&5
|
||||
$as_echo "$glibcxx_cv_symlink" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for truncate" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for truncate" >&5
|
||||
$as_echo_n "checking for truncate... " >&6; }
|
||||
if ${glibcxx_cv_truncate+:} false; then :
|
||||
if ${glibcxx_cv_truncate+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test x$gcc_no_link = xyes; then
|
||||
if test x$gcc_no_link = xyes; then
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <unistd.h>
|
||||
|
|
@ -76770,21 +76769,20 @@ fi
|
|||
|
||||
fi
|
||||
|
||||
if test $glibcxx_cv_truncate = yes; then
|
||||
if test $glibcxx_cv_truncate = yes; then
|
||||
|
||||
$as_echo "#define HAVE_TRUNCATE 1" >>confdefs.h
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_truncate" >&5
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_truncate" >&5
|
||||
$as_echo "$glibcxx_cv_truncate" >&6; }
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
ac_ext=c
|
||||
CXXFLAGS="$ac_save_CXXFLAGS"
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
|
||||
ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# For Networking TS.
|
||||
|
|
|
|||
|
|
@ -905,8 +905,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
template<typename _Fn, typename... _Args>
|
||||
constexpr _Bind_front_t<_Fn, _Args...>
|
||||
bind_front(_Fn&& __fn, _Args&&... __args)
|
||||
noexcept(is_nothrow_constructible_v<int, _Bind_front_t<_Fn, _Args...>,
|
||||
_Fn, _Args...>)
|
||||
noexcept(is_nothrow_constructible_v<_Bind_front_t<_Fn, _Args...>,
|
||||
int, _Fn, _Args...>)
|
||||
{
|
||||
return _Bind_front_t<_Fn, _Args...>(0, std::forward<_Fn>(__fn),
|
||||
std::forward<_Args>(__args)...);
|
||||
|
|
|
|||
|
|
@ -285,14 +285,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
_Base(__use_alloc<_Head, _Alloc, _Head>(__a),
|
||||
std::forward<_Head>(_M_head(__in))) { }
|
||||
|
||||
template<typename _Alloc, typename... _UElements>
|
||||
template<typename _Alloc, typename _UHead, typename... _UTails>
|
||||
_GLIBCXX20_CONSTEXPR
|
||||
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
|
||||
const _Tuple_impl<_Idx, _UElements...>& __in)
|
||||
const _Tuple_impl<_Idx, _UHead, _UTails...>& __in)
|
||||
: _Inherited(__tag, __a,
|
||||
_Tuple_impl<_Idx, _UElements...>::_M_tail(__in)),
|
||||
_Base(__use_alloc<_Head, _Alloc, _Head>(__a),
|
||||
_Tuple_impl<_Idx, _UElements...>::_M_head(__in)) { }
|
||||
_Tuple_impl<_Idx, _UHead, _UTails...>::_M_tail(__in)),
|
||||
_Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a),
|
||||
_Tuple_impl<_Idx, _UHead, _UTails...>::_M_head(__in)) { }
|
||||
|
||||
template<typename _Alloc, typename _UHead, typename... _UTails>
|
||||
_GLIBCXX20_CONSTEXPR
|
||||
|
|
@ -417,7 +417,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
|||
_GLIBCXX20_CONSTEXPR
|
||||
_Tuple_impl(allocator_arg_t __tag, const _Alloc& __a,
|
||||
const _Tuple_impl<_Idx, _UHead>& __in)
|
||||
: _Base(__use_alloc<_Head, _Alloc, _Head>(__a),
|
||||
: _Base(__use_alloc<_Head, _Alloc, const _UHead&>(__a),
|
||||
_Tuple_impl<_Idx, _UHead>::_M_head(__in)) { }
|
||||
|
||||
template<typename _Alloc, typename _UHead>
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,7 @@ fs::path fs::read_symlink(const path& p, error_code& ec)
|
|||
path result;
|
||||
#if defined(_GLIBCXX_HAVE_READLINK) && defined(_GLIBCXX_HAVE_SYS_STAT_H)
|
||||
stat_type st;
|
||||
if (::lstat(p.c_str(), &st))
|
||||
if (posix::lstat(p.c_str(), &st))
|
||||
{
|
||||
ec.assign(errno, std::generic_category());
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ struct path::_Parser
|
|||
const size_t len = input.size();
|
||||
|
||||
// look for root name or root directory
|
||||
if (is_dir_sep(input[0]))
|
||||
if (len && is_dir_sep(input[0]))
|
||||
{
|
||||
#if SLASHSLASH_IS_ROOTNAME
|
||||
// look for root name, such as "//foo"
|
||||
|
|
|
|||
|
|
@ -873,7 +873,18 @@ namespace pmr
|
|||
}
|
||||
else
|
||||
{
|
||||
// TODO round to preferred granularity ?
|
||||
// Round to preferred granularity.
|
||||
if (opts.max_blocks_per_chunk < size_t(-4))
|
||||
{
|
||||
// round up
|
||||
opts.max_blocks_per_chunk += 3;
|
||||
opts.max_blocks_per_chunk &= ~size_t(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
// round down
|
||||
opts.max_blocks_per_chunk &= ~size_t(3);
|
||||
}
|
||||
}
|
||||
|
||||
if (opts.max_blocks_per_chunk > chunk::max_blocks_per_chunk())
|
||||
|
|
@ -1013,11 +1024,9 @@ namespace pmr
|
|||
: pool_sizes[i];
|
||||
|
||||
// Decide on initial number of blocks per chunk.
|
||||
// Always have at least 16 blocks per chunk:
|
||||
const size_t min_blocks_per_chunk = 16;
|
||||
// But for smaller blocks, use a larger initial size:
|
||||
size_t blocks_per_chunk
|
||||
= std::max(1024 / block_size, min_blocks_per_chunk);
|
||||
// At least 16 blocks per chunk seems reasonable,
|
||||
// more for smaller blocks:
|
||||
size_t blocks_per_chunk = std::max(size_t(16), 1024 / block_size);
|
||||
// But don't exceed the requested max_blocks_per_chunk:
|
||||
blocks_per_chunk
|
||||
= std::min(blocks_per_chunk, _M_opts.max_blocks_per_chunk);
|
||||
|
|
|
|||
|
|
@ -993,7 +993,7 @@ fs::path fs::read_symlink(const path& p [[gnu::unused]], error_code& ec)
|
|||
path result;
|
||||
#if defined(_GLIBCXX_HAVE_READLINK) && defined(_GLIBCXX_HAVE_SYS_STAT_H)
|
||||
stat_type st;
|
||||
if (::lstat(p.c_str(), &st))
|
||||
if (posix::lstat(p.c_str(), &st))
|
||||
{
|
||||
ec.assign(errno, std::generic_category());
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
// Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-options "-std=gnu++2a" }
|
||||
// { dg-do compile { target c++2a } }
|
||||
|
||||
#include <functional>
|
||||
|
||||
void
|
||||
test01()
|
||||
{
|
||||
struct F1
|
||||
{
|
||||
void operator()() { }
|
||||
};
|
||||
|
||||
struct F2
|
||||
{
|
||||
F2() = default;
|
||||
F2(const F2&) noexcept(false) { }
|
||||
void operator()() { }
|
||||
};
|
||||
|
||||
// PR libstdc++/97101
|
||||
static_assert( noexcept(std::bind_front(F1{})) );
|
||||
static_assert( ! noexcept(std::bind_front(F2{})) );
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
// Copyright (C) 2020 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 3, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING3. If not see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
|
||||
// { dg-do compile { target c++11 } }
|
||||
|
||||
#include <tuple>
|
||||
#include <memory>
|
||||
|
||||
struct X
|
||||
{
|
||||
using allocator_type = std::allocator<int>;
|
||||
|
||||
X(X&&) { }
|
||||
X(std::allocator_arg_t, const allocator_type&, X&&) { }
|
||||
|
||||
explicit X(int) { }
|
||||
explicit X(int, allocator_type) { }
|
||||
};
|
||||
|
||||
void
|
||||
test01()
|
||||
{
|
||||
// PR libstdc++/96803
|
||||
// std::tuple chooses wrong constructor for uses-allocator construction
|
||||
std::tuple<int> o;
|
||||
std::tuple<X> nok(std::allocator_arg, std::allocator<int>(), o);
|
||||
|
||||
std::tuple<int, int> oo;
|
||||
std::tuple<X, X> nn(std::allocator_arg, std::allocator<int>(), oo);
|
||||
}
|
||||
|
||||
struct Y
|
||||
{
|
||||
using allocator_type = std::allocator<int>;
|
||||
|
||||
Y(const X&) { }
|
||||
Y(const X&, const allocator_type&) { }
|
||||
|
||||
Y(X&&) { }
|
||||
Y(std::allocator_arg_t, const allocator_type&, X&&) { }
|
||||
};
|
||||
|
||||
void
|
||||
test02()
|
||||
{
|
||||
std::tuple<X, X> o{1, 1};
|
||||
std::tuple<Y, Y> oo(std::allocator_arg, std::allocator<int>(), o);
|
||||
}
|
||||
|
|
@ -239,6 +239,25 @@ test06()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
test08()
|
||||
{
|
||||
std::pmr::pool_options opts;
|
||||
opts.largest_required_pool_block = 64;
|
||||
|
||||
// PR libstdc++/94160
|
||||
// max_blocks_per_chunk=1 causes pool resources to return null pointers
|
||||
for (int i = 0; i < 8; ++i)
|
||||
{
|
||||
opts.max_blocks_per_chunk = i;
|
||||
std::pmr::unsynchronized_pool_resource upr(opts);
|
||||
auto* p = (int*)upr.allocate(4);
|
||||
VERIFY( p != nullptr );
|
||||
*p = i;
|
||||
upr.deallocate(p, 4);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
|
@ -248,4 +267,5 @@ main()
|
|||
test04();
|
||||
test05();
|
||||
test06();
|
||||
test08();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,15 @@ test06()
|
|||
test(p2, s.c_str());
|
||||
}
|
||||
|
||||
void
|
||||
test07()
|
||||
{
|
||||
path p, p0;
|
||||
std::string_view s;
|
||||
p /= s; // PR libstdc++/97167
|
||||
compare_paths(p, p0);
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
|
|
@ -170,4 +179,5 @@ main()
|
|||
test04();
|
||||
test05();
|
||||
test06();
|
||||
test07();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue