aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2018-02-13 03:09:40 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2018-02-13 03:09:40 +0000
commite1233632f292cc85f7fd669a1964b2dd914fee9d (patch)
tree1b9c675073542860bdf014b3e832c37f7b1c6cb1
parent4b678f58022a436a25225112a17efbab107bcce3 (diff)
parenta4f197f50e348a0128cf2a616043899da2ca5dd0 (diff)
downloadgcc-e1233632f292cc85f7fd669a1964b2dd914fee9d.zip
gcc-e1233632f292cc85f7fd669a1964b2dd914fee9d.tar.gz
gcc-e1233632f292cc85f7fd669a1964b2dd914fee9d.tar.bz2
Merge from trunk revision 257610.
From-SVN: r257612
-rw-r--r--gcc/ChangeLog161
-rw-r--r--gcc/DATESTAMP2
-rw-r--r--gcc/config/i386/avx512fintrin.h169
-rw-r--r--gcc/config/i386/i386-builtin.def8
-rw-r--r--gcc/config/i386/sse.md14
-rw-r--r--gcc/config/i386/subst.md1
-rw-r--r--gcc/config/rs6000/mmintrin.h4
-rw-r--r--gcc/config/sparc/sparc.c6
-rw-r--r--gcc/config/visium/visium.c3
-rw-r--r--gcc/cp/ChangeLog35
-rw-r--r--gcc/cp/constexpr.c12
-rw-r--r--gcc/cp/lambda.c18
-rw-r--r--gcc/cp/parser.c125
-rw-r--r--gcc/cp/pt.c144
-rw-r--r--gcc/cse.c9
-rw-r--r--gcc/doc/invoke.texi3
-rw-r--r--gcc/final.c36
-rw-r--r--gcc/fortran/ChangeLog35
-rw-r--r--gcc/fortran/gfortran.texi16
-rw-r--r--gcc/fortran/interface.c25
-rw-r--r--gcc/fortran/resolve.c15
-rw-r--r--gcc/fortran/trans-array.c10
-rw-r--r--gcc/fortran/trans-expr.c27
-rw-r--r--gcc/go/gofrontend/MERGE2
-rw-r--r--gcc/go/gofrontend/gogo.cc36
-rw-r--r--gcc/internal-fn.def4
-rw-r--r--gcc/ipa-split.c7
-rw-r--r--gcc/params.def8
-rw-r--r--gcc/po/ChangeLog4
-rw-r--r--gcc/po/sv.po392
-rw-r--r--gcc/testsuite/ChangeLog125
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr84341.c10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic11.C21
-rw-r--r--gcc/testsuite/g++.dg/parse/pr84263.C36
-rw-r--r--gcc/testsuite/g++.dg/template/crash129.C5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c36
-rw-r--r--gcc/testsuite/gcc.dg/asan/pr84307.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-1.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntb-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntw-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-2.c63
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-23.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-4-int128-runnable.c109
-rw-r--r--gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c84
-rw-r--r--gcc/testsuite/gcc.target/powerpc/powerpc.exp1
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_47.f906
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/read_dir.f904
-rw-r--r--gcc/testsuite/gfortran.dg/statement_function_1.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/statement_function_2.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/statement_function_3.f15
-rw-r--r--gcc/testsuite/gfortran.dg/type_to_class_5.f0329
-rw-r--r--gcc/tree-vect-slp.c104
-rw-r--r--gcc/tree-vect-stmts.c49
-rw-r--r--libgfortran/ChangeLog31
-rw-r--r--libgfortran/generated/reshape_c10.c2
-rw-r--r--libgfortran/generated/reshape_c16.c2
-rw-r--r--libgfortran/generated/reshape_c4.c2
-rw-r--r--libgfortran/generated/reshape_c8.c2
-rw-r--r--libgfortran/generated/reshape_i16.c2
-rw-r--r--libgfortran/generated/reshape_i4.c2
-rw-r--r--libgfortran/generated/reshape_i8.c2
-rw-r--r--libgfortran/generated/reshape_r10.c2
-rw-r--r--libgfortran/generated/reshape_r16.c2
-rw-r--r--libgfortran/generated/reshape_r4.c2
-rw-r--r--libgfortran/generated/reshape_r8.c2
-rw-r--r--libgfortran/intrinsics/date_and_time.c6
-rw-r--r--libgfortran/intrinsics/reshape_generic.c4
-rw-r--r--libgfortran/io/format.c5
-rw-r--r--libgfortran/io/list_read.c4
-rw-r--r--libgfortran/io/write.c4
-rw-r--r--libgfortran/libgfortran.h60
-rw-r--r--libgfortran/m4/reshape.m42
-rw-r--r--libgo/go/runtime/atomic_pointer.go69
-rw-r--r--libgo/go/runtime/extern.go4
-rw-r--r--libgo/go/runtime/stubs.go33
-rw-r--r--libgo/go/sync/atomic/atomic.c34
-rw-r--r--libgo/misc/cgo/test/issue9400/gccgo.go2
-rw-r--r--libgo/misc/cgo/test/issue9400/stubs.go2
91 files changed, 1725 insertions, 854 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 677c316..d5913d0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,122 @@
+2018-02-12 Jeff Law <law@redhat.com>
+
+ * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
+ successfully back substituting a reg.
+
+2018-02-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84037
+ * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
+ parameter, move visited init to caller.
+ (vect_slp_analyze_operations): Separate cost from validity
+ check, initialize visited once for all instances.
+ (vect_schedule_slp): Analyze map to CSE vectorized nodes once
+ for all instances.
+ * tree-vect-stmts.c (vect_model_simple_cost): Make early
+ out an assert.
+ (vect_model_promotion_demotion_cost): Likewise.
+ (vectorizable_bswap): Guard cost modeling with !slp_node
+ instead of !PURE_SLP_STMT to avoid double-counting on hybrid
+ SLP stmts.
+ (vectorizable_call): Likewise.
+ (vectorizable_conversion): Likewise.
+ (vectorizable_assignment): Likewise.
+ (vectorizable_shift): Likewise.
+ (vectorizable_operation): Likewise.
+ (vectorizable_store): Likewise.
+ (vectorizable_load): Likewise.
+ (vectorizable_condition): Likewise.
+ (vectorizable_comparison): Likewise.
+
+2018-02-12 Paolo Bonzini <bonzini@gnu.org>
+
+ PR sanitizer/84307
+ * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
+ (ASAN_MARK): Fix fnspec to account for return value, change pointer
+ argument from 'R' to 'W' so that the pointed-to datum is clobbered.
+
+2018-02-08 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83665
+ * params.def (inline-min-speedup): Increase from 8 to 15.
+ (max-inline-insns-auto): Decrease from 40 to 30.
+ * ipa-split.c (consider_split): Add some buffer for function to
+ be considered inlining candidate.
+ * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
+ default values.
+
+2018-02-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/84037
+ * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
+ matched stmts if we cannot swap the non-matched ones.
+
+2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
+
+ * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
+ _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
+ _mm_maskz_scalef_round_ss): New intrinsics.
+ (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
+ * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
+ __builtin_ia32_scalefss_round): Remove.
+ (__builtin_ia32_scalefsd_mask_round,
+ __builtin_ia32_scalefss_mask_round): New intrinsics.
+ * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
+ (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
+ ((match_operand:VF_128 2 "<round_nimm_predicate>"
+ "<round_constraint>")): Changed to ...
+ ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
+ "<round_scalar_constraint>")): ... this.
+ ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
+ %0, %1, %2<round_op3>}"): Changed to ...
+ ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
+ %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
+ %2<round_scalar_mask_op3>}"): ... this.
+ * config/i386/subst.md (round_scalar_nimm_predicate): New.
+
+2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
+
+ * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
+ (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
+ (_mm_maskz_sqrt_round_ss): New intrinsics.
+ (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
+ (__builtin_ia32_sqrtsd_mask_round)
+ (__builtin_ia32_sqrtss_mask_round): New builtins.
+ * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
+ (__builtin_ia32_sqrtss_round): Remove.
+ (__builtin_ia32_sqrtsd_mask_round)
+ (__builtin_ia32_sqrtss_mask_round): New builtins.
+ * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
+ (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
+ ((match_operand:VF_128 1 "vector_operand"
+ "xBm,<round_constraint>")): Changed to ...
+ ((match_operand:VF_128 1 "vector_operand"
+ "xBm,<round_scalar_constraint>")): ... this.
+ (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
+ %0, %2, %<iptr>1<round_op3>}): Changed to ...
+ (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
+ %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
+ %<iptr>1<round_scalar_mask_op3>}): ... this.
+ ((set_attr "prefix" "<round_prefix>")): Changed to ...
+ ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
+
+2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
+
+ PR target/84266
+ * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
+ Cast vec_cmpeq result to correct type.
+ * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
+ Cast vec_cmpgt result to correct type.
+
+2018-02-11 Alexandre Oliva <aoliva@redhat.com>
+
+ * final.c (final_scan_insn_1): Renamed from...
+ (final_scan_insn): ... this. New wrapper, to recover
+ seen from the outermost call in recursive ones.
+ * config/sparc/sparc.c (output_return): Drop seen from call.
+ (output_sibcall): Likewise.
+ * config/visium/visium.c (output_branch): Likewise.
+
2018-02-10 John David Anglin <danglin@gcc.gnu.org>
* config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
@@ -47,8 +166,7 @@
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rx.md: updated "movsicc" expand to be matched by GCC
- * testsuite/gcc.target/rx/movsicc.c: new test case
+ * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
@@ -61,10 +179,10 @@
2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rx/constraints.md: added new constraint CALL_OP_SYMBOL_REF
- to allow or block "symbol_ref" depending on value of TARGET_JSR
- * config/rx/rx.md: use CALL_OP_SYMBOL_REF in call_internal and
- call_value_internal insns
+ * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
+ to allow or block "symbol_ref" depending on the value of TARGET_JSR.
+ * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
+ * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
@@ -1260,9 +1378,8 @@
2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.c: if operand 2 is const avoid addition with 0
- and use incw and decw where possible
- * testsuite/gcc.target/rl78/test_addsi3_internal.c: new file
+ * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
+ avoid addition with 0 and use incw and decw where possible.
2018-01-26 Richard Biener <rguenther@suse.de>
@@ -1593,15 +1710,15 @@
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78-expand.md: New define_expand "bswaphi2"
- * config/rl78/rl78-virt.md: New define_insn "*bswaphi2_virt"
- * config/rl78/rl78-real.md: New define_insn "*bswaphi2_real"
+ * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
+ * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
+ * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78-protos.h: New function declaration rl78_split_movdi
- * config/rl78/rl78.md: New define_expand "movdi"
- * config/rl78/rl78.c: New function definition rl78_split_movdi
+ * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
+ * config/rl78/rl78.md (movdi): New define_expand.
+ * config/rl78/rl78.c (rl78_split_movdi): New function.
2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
@@ -1624,19 +1741,19 @@
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.md: New define_expand "anddi3".
+ * config/rl78/rl78.md (anddi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.md: New define_expand "umindi3".
+ * config/rl78/rl78.md (umindi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.md: New define_expand "smindi3".
+ * config/rl78/rl78.md (smindi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.md: New define_expand "smaxdi3".
+ * config/rl78/rl78.md (smaxdi3): New define_expand.
2018-01-22 Carl Love <cel@us.ibm.com>
@@ -1656,12 +1773,12 @@
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.md: New define_expand "umaxdi3".
+ * config/rl78/rl78.md (umaxdi3): New define_expand.
2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
- * config/rl78/rl78.c (rl78_note_reg_set): fixed dead reg check
- for non-QImode registers
+ * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
+ for non-QImode registers.
2018-01-22 Richard Biener <rguenther@suse.de>
diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP
index d1c73de..ab63496 100644
--- a/gcc/DATESTAMP
+++ b/gcc/DATESTAMP
@@ -1 +1 @@
-20180211
+20180213
diff --git a/gcc/config/i386/avx512fintrin.h b/gcc/config/i386/avx512fintrin.h
index 71e36a5..ba65aca 100644
--- a/gcc/config/i386/avx512fintrin.h
+++ b/gcc/config/i386/avx512fintrin.h
@@ -1955,18 +1955,66 @@ extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_round_sd (__m128d __A, __m128d __B, const int __R)
{
- return (__m128d) __builtin_ia32_sqrtsd_round ((__v2df) __B,
- (__v2df) __A,
- __R);
+ return (__m128d) __builtin_ia32_sqrtsd_mask_round ((__v2df) __B,
+ (__v2df) __A,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) -1, __R);
+}
+
+extern __inline __m128d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_sqrt_round_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B,
+ const int __R)
+{
+ return (__m128d) __builtin_ia32_sqrtsd_mask_round ((__v2df) __B,
+ (__v2df) __A,
+ (__v2df) __W,
+ (__mmask8) __U, __R);
+}
+
+extern __inline __m128d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_sqrt_round_sd (__mmask8 __U, __m128d __A, __m128d __B, const int __R)
+{
+ return (__m128d) __builtin_ia32_sqrtsd_mask_round ((__v2df) __B,
+ (__v2df) __A,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) __U, __R);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_sqrt_round_ss (__m128 __A, __m128 __B, const int __R)
{
- return (__m128) __builtin_ia32_sqrtss_round ((__v4sf) __B,
- (__v4sf) __A,
- __R);
+ return (__m128) __builtin_ia32_sqrtss_mask_round ((__v4sf) __B,
+ (__v4sf) __A,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) -1, __R);
+}
+
+extern __inline __m128
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_sqrt_round_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B,
+ const int __R)
+{
+ return (__m128) __builtin_ia32_sqrtss_mask_round ((__v4sf) __B,
+ (__v4sf) __A,
+ (__v4sf) __W,
+ (__mmask8) __U, __R);
+}
+
+extern __inline __m128
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_sqrt_round_ss (__mmask8 __U, __m128 __A, __m128 __B, const int __R)
+{
+ return (__m128) __builtin_ia32_sqrtss_mask_round ((__v4sf) __B,
+ (__v4sf) __A,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) __U, __R);
}
#else
#define _mm512_sqrt_round_pd(A, C) \
@@ -1987,11 +2035,27 @@ _mm_sqrt_round_ss (__m128 __A, __m128 __B, const int __R)
#define _mm512_maskz_sqrt_round_ps(U, A, C) \
(__m512)__builtin_ia32_sqrtps512_mask(A, (__v16sf)_mm512_setzero_ps(), U, C)
-#define _mm_sqrt_round_sd(A, B, C) \
- (__m128d)__builtin_ia32_sqrtsd_round(A, B, C)
+#define _mm_sqrt_round_sd(A, B, C) \
+ (__m128d)__builtin_ia32_sqrtsd_mask_round (B, A, \
+ (__v2df) _mm_setzero_pd (), -1, C)
+
+#define _mm_mask_sqrt_round_sd(W, U, A, B, C) \
+ (__m128d)__builtin_ia32_sqrtsd_mask_round (B, A, W, U, C)
+
+#define _mm_maskz_sqrt_round_sd(U, A, B, C) \
+ (__m128d)__builtin_ia32_sqrtsd_mask_round (B, A, \
+ (__v2df) _mm_setzero_pd (), U, C)
-#define _mm_sqrt_round_ss(A, B, C) \
- (__m128)__builtin_ia32_sqrtss_round(A, B, C)
+#define _mm_sqrt_round_ss(A, B, C) \
+ (__m128)__builtin_ia32_sqrtss_mask_round (B, A, \
+ (__v4sf) _mm_setzero_ps (), -1, C)
+
+#define _mm_mask_sqrt_round_ss(W, U, A, B, C) \
+ (__m128)__builtin_ia32_sqrtss_mask_round (B, A, W, U, C)
+
+#define _mm_maskz_sqrt_round_ss(U, A, B, C) \
+ (__m128)__builtin_ia32_sqrtss_mask_round (B, A, \
+ (__v4sf) _mm_setzero_ps (), U, C)
#endif
extern __inline __m512i
@@ -3039,18 +3103,67 @@ extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_scalef_round_sd (__m128d __A, __m128d __B, const int __R)
{
- return (__m128d) __builtin_ia32_scalefsd_round ((__v2df) __A,
- (__v2df) __B,
- __R);
+ return (__m128d) __builtin_ia32_scalefsd_mask_round ((__v2df) __A,
+ (__v2df) __B,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) -1, __R);
+}
+
+extern __inline __m128d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_scalef_round_sd (__m128d __W, __mmask8 __U, __m128d __A, __m128d __B,
+ const int __R)
+{
+ return (__m128d) __builtin_ia32_scalefsd_mask_round ((__v2df) __A,
+ (__v2df) __B,
+ (__v2df) __W,
+ (__mmask8) __U, __R);
+}
+
+extern __inline __m128d
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_scalef_round_sd (__mmask8 __U, __m128d __A, __m128d __B,
+ const int __R)
+{
+ return (__m128d) __builtin_ia32_scalefsd_mask_round ((__v2df) __A,
+ (__v2df) __B,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) __U, __R);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_scalef_round_ss (__m128 __A, __m128 __B, const int __R)
{
- return (__m128) __builtin_ia32_scalefss_round ((__v4sf) __A,
- (__v4sf) __B,
- __R);
+ return (__m128) __builtin_ia32_scalefss_mask_round ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) -1, __R);
+}
+
+extern __inline __m128
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_mask_scalef_round_ss (__m128 __W, __mmask8 __U, __m128 __A, __m128 __B,
+ const int __R)
+{
+ return (__m128) __builtin_ia32_scalefss_mask_round ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v4sf) __W,
+ (__mmask8) __U, __R);
+}
+
+extern __inline __m128
+__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
+_mm_maskz_scalef_round_ss (__mmask8 __U, __m128 __A, __m128 __B, const int __R)
+{
+ return (__m128) __builtin_ia32_scalefss_mask_round ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) __U, __R);
}
#else
#define _mm512_scalef_round_pd(A, B, C) \
@@ -3072,10 +3185,12 @@ _mm_scalef_round_ss (__m128 __A, __m128 __B, const int __R)
(__m512)__builtin_ia32_scalefps512_mask(A, B, (__v16sf)_mm512_setzero_ps(), U, C)
#define _mm_scalef_round_sd(A, B, C) \
- (__m128d)__builtin_ia32_scalefsd_round(A, B, C)
+ (__m128d)__builtin_ia32_scalefsd_mask_round (A, B, \
+ (__v2df)_mm_setzero_pd (), -1, C)
#define _mm_scalef_round_ss(A, B, C) \
- (__m128)__builtin_ia32_scalefss_round(A, B, C)
+ (__m128)__builtin_ia32_scalefss_mask_round (A, B, \
+ (__v4sf)_mm_setzero_ps (), -1, C)
#endif
#ifdef __OPTIMIZE__
@@ -12118,18 +12233,24 @@ extern __inline __m128d
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_scalef_sd (__m128d __A, __m128d __B)
{
- return (__m128d) __builtin_ia32_scalefsd_round ((__v2df) __A,
- (__v2df) __B,
- _MM_FROUND_CUR_DIRECTION);
+ return (__m128d) __builtin_ia32_scalefsd_mask_round ((__v2df) __A,
+ (__v2df) __B,
+ (__v2df)
+ _mm_setzero_pd (),
+ (__mmask8) -1,
+ _MM_FROUND_CUR_DIRECTION);
}
extern __inline __m128
__attribute__ ((__gnu_inline__, __always_inline__, __artificial__))
_mm_scalef_ss (__m128 __A, __m128 __B)
{
- return (__m128) __builtin_ia32_scalefss_round ((__v4sf) __A,
- (__v4sf) __B,
- _MM_FROUND_CUR_DIRECTION);
+ return (__m128) __builtin_ia32_scalefss_mask_round ((__v4sf) __A,
+ (__v4sf) __B,
+ (__v4sf)
+ _mm_setzero_ps (),
+ (__mmask8) -1,
+ _MM_FROUND_CUR_DIRECTION);
}
extern __inline __m512d
diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def
index 2caac88..169189d 100644
--- a/gcc/config/i386/i386-builtin.def
+++ b/gcc/config/i386/i386-builtin.def
@@ -2718,12 +2718,12 @@ BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_rndscalev2df_round, "__builtin_
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_rndscalev4sf_round, "__builtin_ia32_rndscaless_round", IX86_BUILTIN_RNDSCALESS, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_scalefv8df_mask_round, "__builtin_ia32_scalefpd512_mask", IX86_BUILTIN_SCALEFPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_V8DF_UQI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_scalefv16sf_mask_round, "__builtin_ia32_scalefps512_mask", IX86_BUILTIN_SCALEFPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_HI_INT)
-BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vmscalefv2df_round, "__builtin_ia32_scalefsd_round", IX86_BUILTIN_SCALEFSD, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT)
-BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vmscalefv4sf_round, "__builtin_ia32_scalefss_round", IX86_BUILTIN_SCALEFSS, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT)
+BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vmscalefv2df_mask_round, "__builtin_ia32_scalefsd_mask_round", IX86_BUILTIN_SCALEFSD, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
+BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_vmscalefv4sf_mask_round, "__builtin_ia32_scalefss_mask_round", IX86_BUILTIN_SCALEFSS, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_sqrtv8df2_mask_round, "__builtin_ia32_sqrtpd512_mask", IX86_BUILTIN_SQRTPD512_MASK, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_QI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_avx512f_sqrtv16sf2_mask_round, "__builtin_ia32_sqrtps512_mask", IX86_BUILTIN_SQRTPS512_MASK, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_HI_INT)
-BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_sse2_vmsqrtv2df2_round, "__builtin_ia32_sqrtsd_round", IX86_BUILTIN_SQRTSD_ROUND, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT)
-BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_sse_vmsqrtv4sf2_round, "__builtin_ia32_sqrtss_round", IX86_BUILTIN_SQRTSS_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_INT)
+BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_sse2_vmsqrtv2df2_mask_round, "__builtin_ia32_sqrtsd_mask_round", IX86_BUILTIN_SQRTSD_ROUND, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
+BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_sse_vmsqrtv4sf2_mask_round, "__builtin_ia32_sqrtss_mask_round", IX86_BUILTIN_SQRTSS_ROUND, UNKNOWN, (int) V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_subv8df3_mask_round, "__builtin_ia32_subpd512_mask", IX86_BUILTIN_SUBPD512, UNKNOWN, (int) V8DF_FTYPE_V8DF_V8DF_V8DF_UQI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_subv16sf3_mask_round, "__builtin_ia32_subps512_mask", IX86_BUILTIN_SUBPS512, UNKNOWN, (int) V16SF_FTYPE_V16SF_V16SF_V16SF_HI_INT)
BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_sse2_vmsubv2df3_round, "__builtin_ia32_subsd_round", IX86_BUILTIN_SUBSD_ROUND, UNKNOWN, (int) V2DF_FTYPE_V2DF_V2DF_INT)
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index ef0d015..da9af23 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -1881,21 +1881,21 @@
(set_attr "prefix" "maybe_vex")
(set_attr "mode" "<MODE>")])
-(define_insn "<sse>_vmsqrt<mode>2<round_name>"
+(define_insn "<sse>_vmsqrt<mode>2<mask_scalar_name><round_scalar_name>"
[(set (match_operand:VF_128 0 "register_operand" "=x,v")
(vec_merge:VF_128
(sqrt:VF_128
- (match_operand:VF_128 1 "vector_operand" "xBm,<round_constraint>"))
+ (match_operand:VF_128 1 "vector_operand" "xBm,<round_scalar_constraint>"))
(match_operand:VF_128 2 "register_operand" "0,v")
(const_int 1)))]
"TARGET_SSE"
"@
sqrt<ssescalarmodesuffix>\t{%1, %0|%0, %<iptr>1}
- vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|%0, %2, %<iptr>1<round_op3>}"
+ vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2, %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2, %<iptr>1<round_scalar_mask_op3>}"
[(set_attr "isa" "noavx,avx")
(set_attr "type" "sse")
(set_attr "atom_sse_attr" "sqrt")
- (set_attr "prefix" "<round_prefix>")
+ (set_attr "prefix" "<round_scalar_prefix>")
(set_attr "btver2_sse_attr" "sqrt")
(set_attr "mode" "<ssescalarmode>")])
@@ -8318,17 +8318,17 @@
operands[1] = adjust_address (operands[1], DFmode, INTVAL (operands[2]) * 8);
})
-(define_insn "avx512f_vmscalef<mode><round_name>"
+(define_insn "avx512f_vmscalef<mode><mask_scalar_name><round_scalar_name>"
[(set (match_operand:VF_128 0 "register_operand" "=v")
(vec_merge:VF_128
(unspec:VF_128
[(match_operand:VF_128 1 "register_operand" "v")
- (match_operand:VF_128 2 "<round_nimm_predicate>" "<round_constraint>")]
+ (match_operand:VF_128 2 "<round_scalar_nimm_predicate>" "<round_scalar_constraint>")]
UNSPEC_SCALEF)
(match_dup 1)
(const_int 1)))]
"TARGET_AVX512F"
- "vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %2<round_op3>}"
+ "vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1, %2<round_scalar_mask_op3>}"
[(set_attr "prefix" "evex")
(set_attr "mode" "<ssescalarmode>")])
diff --git a/gcc/config/i386/subst.md b/gcc/config/i386/subst.md
index 9ed2e8d..3f63865 100644
--- a/gcc/config/i386/subst.md
+++ b/gcc/config/i386/subst.md
@@ -271,6 +271,7 @@
(define_subst_attr "round_scalar_mask_op3" "round_scalar" "" "<round_scalar_mask_operand3>")
(define_subst_attr "round_scalar_constraint" "round_scalar" "vm" "v")
(define_subst_attr "round_scalar_prefix" "round_scalar" "vex" "evex")
+(define_subst_attr "round_scalar_nimm_predicate" "round_scalar" "vector_operand" "register_operand")
(define_subst "round_scalar"
[(set (match_operand:SUBST_V 0)
diff --git a/gcc/config/rs6000/mmintrin.h b/gcc/config/rs6000/mmintrin.h
index 9001e57..6ae0e00 100644
--- a/gcc/config/rs6000/mmintrin.h
+++ b/gcc/config/rs6000/mmintrin.h
@@ -854,7 +854,7 @@ _mm_cmpeq_pi32 (__m64 __m1, __m64 __m2)
a = (__vector signed int)vec_splats (__m1);
b = (__vector signed int)vec_splats (__m2);
- c = (__vector signed short)vec_cmpeq (a, b);
+ c = (__vector signed int)vec_cmpeq (a, b);
return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0));
#else
__m64_union m1, m2, res;
@@ -883,7 +883,7 @@ _mm_cmpgt_pi32 (__m64 __m1, __m64 __m2)
a = (__vector signed int)vec_splats (__m1);
b = (__vector signed int)vec_splats (__m2);
- c = (__vector signed short)vec_cmpgt (a, b);
+ c = (__vector signed int)vec_cmpgt (a, b);
return (__builtin_unpack_vector_int128 ((__vector __int128_t)c, 0));
#else
__m64_union m1, m2, res;
diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c
index 48669f1..7126b57 100644
--- a/gcc/config/sparc/sparc.c
+++ b/gcc/config/sparc/sparc.c
@@ -6422,7 +6422,6 @@ output_return (rtx_insn *insn)
{
rtx_insn *delay;
rtx pat;
- int seen;
delay = NEXT_INSN (insn);
gcc_assert (delay);
@@ -6442,7 +6441,7 @@ output_return (rtx_insn *insn)
Make sure to output its source location first. */
PATTERN (delay) = gen_blockage ();
INSN_CODE (delay) = -1;
- final_scan_insn (delay, asm_out_file, optimize, 0, &seen);
+ final_scan_insn (delay, asm_out_file, optimize, 0, NULL);
INSN_LOCATION (delay) = UNKNOWN_LOCATION;
output_restore (pat);
@@ -6503,7 +6502,6 @@ output_sibcall (rtx_insn *insn, rtx call_operand)
{
rtx_insn *delay;
rtx pat;
- int seen;
delay = NEXT_INSN (insn);
gcc_assert (delay);
@@ -6514,7 +6512,7 @@ output_sibcall (rtx_insn *insn, rtx call_operand)
Make sure to output its source location first. */
PATTERN (delay) = gen_blockage ();
INSN_CODE (delay) = -1;
- final_scan_insn (delay, asm_out_file, optimize, 0, &seen);
+ final_scan_insn (delay, asm_out_file, optimize, 0, NULL);
INSN_LOCATION (delay) = UNKNOWN_LOCATION;
output_restore (pat);
diff --git a/gcc/config/visium/visium.c b/gcc/config/visium/visium.c
index 8751156..106cdaf 100644
--- a/gcc/config/visium/visium.c
+++ b/gcc/config/visium/visium.c
@@ -3094,10 +3094,9 @@ output_branch (rtx label, const char *cond, rtx_insn *insn)
if (final_sequence)
{
rtx_insn *delay = NEXT_INSN (insn);
- int seen;
gcc_assert (delay);
- final_scan_insn (delay, asm_out_file, optimize, 0, &seen);
+ final_scan_insn (delay, asm_out_file, optimize, 0, NULL);
PATTERN (delay) = gen_blockage ();
INSN_CODE (delay) = -1;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index e01e73b..c2b19d8 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,38 @@
+2018-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84341
+ * parser.c (cp_parser_binary_expression): Use build_min instead of
+ build2_loc to build the no_toplevel_fold_p toplevel binary expression.
+
+2018-02-12 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84263
+ * parser.c (cp_parser_decltype): Push and pop
+ deferring_access_checks. Reorganize to avoid goto.
+
+2018-02-12 Richard Biener <rguenther@suse.de>
+
+ PR c++/84281
+ * constexpr.c (cxx_eval_vec_init_1): Use a RANGE_EXPR to compact
+ uniform constructors and delay allocating them fully.
+
+2018-02-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/84036 - ICE with variadic capture.
+ Handle variadic capture proxies more like non-variadic.
+ * lambda.c (build_capture_proxy): Remove workaround.
+ * pt.c (find_parameter_packs_r): The proxy is a pack.
+ (instantiate_class_template_1): Remove dead lambda code.
+ (extract_fnparm_pack): Don't make_pack_expansion.
+ (extract_locals_r): Don't strip a pack expansion.
+ (tsubst_pack_expansion): Handle proxy packs. Use
+ PACK_EXPANSION_EXTRA_ARGS less.
+ (tsubst_decl) [FIELD_DECL]: Don't register_specialization.
+ (tsubst_copy) [FIELD_DECL]: Don't retrieve*_specialization.
+ [VAR_DECL]: Handle ARGUMENT_PACK_SELECT.
+ (tsubst_expr) [DECL_EXPR]: Handle proxy packs.
+ (tsubst_copy_and_build) [VAR_DECL]: Handle proxy packs normally.
+
2018-02-10 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/83987
diff --git a/gcc/cp/constexpr.c b/gcc/cp/constexpr.c
index 7292441..d89bdd5 100644
--- a/gcc/cp/constexpr.c
+++ b/gcc/cp/constexpr.c
@@ -2885,7 +2885,6 @@ cxx_eval_vec_init_1 (const constexpr_ctx *ctx, tree atype, tree init,
unsigned HOST_WIDE_INT max = tree_to_uhwi (array_type_nelts_top (atype));
verify_ctor_sanity (ctx, atype);
vec<constructor_elt, va_gc> **p = &CONSTRUCTOR_ELTS (ctx->ctor);
- vec_alloc (*p, max + 1);
bool pre_init = false;
unsigned HOST_WIDE_INT i;
@@ -2978,13 +2977,14 @@ cxx_eval_vec_init_1 (const constexpr_ctx *ctx, tree atype, tree init,
{
if (new_ctx.ctor != ctx->ctor)
eltinit = new_ctx.ctor;
- for (i = 1; i < max; ++i)
- {
- idx = build_int_cst (size_type_node, i);
- CONSTRUCTOR_APPEND_ELT (*p, idx, unshare_constructor (eltinit));
- }
+ tree range = build2 (RANGE_EXPR, size_type_node,
+ build_int_cst (size_type_node, 1),
+ build_int_cst (size_type_node, max - 1));
+ CONSTRUCTOR_APPEND_ELT (*p, range, unshare_constructor (eltinit));
break;
}
+ else if (i == 0)
+ vec_safe_reserve (*p, max);
}
if (!*non_constant_p)
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2545eae..6b5bd80 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -455,19 +455,11 @@ build_capture_proxy (tree member, tree init)
STRIP_NOPS (init);
}
- if (TREE_CODE (init) == COMPONENT_REF)
- /* We're capturing a capture of a function parameter pack, and have
- lost track of the original variable. It's not important to have
- DECL_CAPTURED_VARIABLE in this case, since a function parameter pack
- isn't a constant variable, so don't bother trying to set it. */;
- else
- {
- gcc_assert (VAR_P (init) || TREE_CODE (init) == PARM_DECL);
- while (is_normal_capture_proxy (init))
- init = DECL_CAPTURED_VARIABLE (init);
- retrofit_lang_decl (var);
- DECL_CAPTURED_VARIABLE (var) = init;
- }
+ gcc_assert (VAR_P (init) || TREE_CODE (init) == PARM_DECL);
+ while (is_normal_capture_proxy (init))
+ init = DECL_CAPTURED_VARIABLE (init);
+ retrofit_lang_decl (var);
+ DECL_CAPTURED_VARIABLE (var) = init;
}
if (name == this_identifier)
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index ac5277d..9a05e4f 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -9330,12 +9330,14 @@ cp_parser_binary_expression (cp_parser* parser, bool cast_p,
if (no_toplevel_fold_p
&& lookahead_prec <= current.prec
&& sp == stack)
- current.lhs = build2_loc (combined_loc,
- current.tree_type,
- TREE_CODE_CLASS (current.tree_type)
- == tcc_comparison
- ? boolean_type_node : TREE_TYPE (current.lhs),
- current.lhs, rhs);
+ {
+ current.lhs
+ = build_min (current.tree_type,
+ TREE_CODE_CLASS (current.tree_type) == tcc_comparison
+ ? boolean_type_node : TREE_TYPE (current.lhs),
+ current.lhs.get_value (), rhs.get_value ());
+ SET_EXPR_LOCATION (current.lhs, combined_loc);
+ }
else
{
current.lhs = build_x_binary_op (combined_loc, current.tree_type,
@@ -14049,12 +14051,7 @@ cp_parser_decltype_expr (cp_parser *parser,
static tree
cp_parser_decltype (cp_parser *parser)
{
- tree expr;
bool id_expression_or_member_access_p = false;
- const char *saved_message;
- bool saved_integral_constant_expression_p;
- bool saved_non_integral_constant_expression_p;
- bool saved_greater_than_is_operator_p;
cp_token *start_token = cp_lexer_peek_token (parser->lexer);
if (start_token->type == CPP_DECLTYPE)
@@ -14073,77 +14070,83 @@ cp_parser_decltype (cp_parser *parser)
if (!parens.require_open (parser))
return error_mark_node;
- /* decltype (auto) */
+ push_deferring_access_checks (dk_deferred);
+
+ tree expr = NULL_TREE;
+
if (cxx_dialect >= cxx14
&& cp_lexer_next_token_is_keyword (parser->lexer, RID_AUTO))
+ /* decltype (auto) */
+ cp_lexer_consume_token (parser->lexer);
+ else
{
- cp_lexer_consume_token (parser->lexer);
- if (!parens.require_close (parser))
- return error_mark_node;
- expr = make_decltype_auto ();
- AUTO_IS_DECLTYPE (expr) = true;
- goto rewrite;
- }
-
- /* Types cannot be defined in a `decltype' expression. Save away the
- old message. */
- saved_message = parser->type_definition_forbidden_message;
+ /* decltype (expression) */
- /* And create the new one. */
- parser->type_definition_forbidden_message
- = G_("types may not be defined in %<decltype%> expressions");
+ /* Types cannot be defined in a `decltype' expression. Save away the
+ old message and set the new one. */
+ const char *saved_message = parser->type_definition_forbidden_message;
+ parser->type_definition_forbidden_message
+ = G_("types may not be defined in %<decltype%> expressions");
- /* The restrictions on constant-expressions do not apply inside
- decltype expressions. */
- saved_integral_constant_expression_p
- = parser->integral_constant_expression_p;
- saved_non_integral_constant_expression_p
- = parser->non_integral_constant_expression_p;
- parser->integral_constant_expression_p = false;
+ /* The restrictions on constant-expressions do not apply inside
+ decltype expressions. */
+ bool saved_integral_constant_expression_p
+ = parser->integral_constant_expression_p;
+ bool saved_non_integral_constant_expression_p
+ = parser->non_integral_constant_expression_p;
+ parser->integral_constant_expression_p = false;
- /* Within a parenthesized expression, a `>' token is always
- the greater-than operator. */
- saved_greater_than_is_operator_p
- = parser->greater_than_is_operator_p;
- parser->greater_than_is_operator_p = true;
+ /* Within a parenthesized expression, a `>' token is always
+ the greater-than operator. */
+ bool saved_greater_than_is_operator_p
+ = parser->greater_than_is_operator_p;
+ parser->greater_than_is_operator_p = true;
- /* Do not actually evaluate the expression. */
- ++cp_unevaluated_operand;
+ /* Do not actually evaluate the expression. */
+ ++cp_unevaluated_operand;
- /* Do not warn about problems with the expression. */
- ++c_inhibit_evaluation_warnings;
+ /* Do not warn about problems with the expression. */
+ ++c_inhibit_evaluation_warnings;
- expr = cp_parser_decltype_expr (parser, id_expression_or_member_access_p);
+ expr = cp_parser_decltype_expr (parser, id_expression_or_member_access_p);
- /* Go back to evaluating expressions. */
- --cp_unevaluated_operand;
- --c_inhibit_evaluation_warnings;
+ /* Go back to evaluating expressions. */
+ --cp_unevaluated_operand;
+ --c_inhibit_evaluation_warnings;
- /* The `>' token might be the end of a template-id or
- template-parameter-list now. */
- parser->greater_than_is_operator_p
- = saved_greater_than_is_operator_p;
+ /* The `>' token might be the end of a template-id or
+ template-parameter-list now. */
+ parser->greater_than_is_operator_p
+ = saved_greater_than_is_operator_p;
- /* Restore the old message and the integral constant expression
- flags. */
- parser->type_definition_forbidden_message = saved_message;
- parser->integral_constant_expression_p
- = saved_integral_constant_expression_p;
- parser->non_integral_constant_expression_p
- = saved_non_integral_constant_expression_p;
+ /* Restore the old message and the integral constant expression
+ flags. */
+ parser->type_definition_forbidden_message = saved_message;
+ parser->integral_constant_expression_p
+ = saved_integral_constant_expression_p;
+ parser->non_integral_constant_expression_p
+ = saved_non_integral_constant_expression_p;
+ }
/* Parse to the closing `)'. */
if (!parens.require_close (parser))
{
cp_parser_skip_to_closing_parenthesis (parser, true, false,
/*consume_paren=*/true);
+ pop_deferring_access_checks ();
return error_mark_node;
}
- expr = finish_decltype_type (expr, id_expression_or_member_access_p,
- tf_warning_or_error);
+ if (!expr)
+ {
+ /* Build auto. */
+ expr = make_decltype_auto ();
+ AUTO_IS_DECLTYPE (expr) = true;
+ }
+ else
+ expr = finish_decltype_type (expr, id_expression_or_member_access_p,
+ tf_warning_or_error);
- rewrite:
/* Replace the decltype with a CPP_DECLTYPE so we don't need to parse
it again. */
start_token->type = CPP_DECLTYPE;
@@ -14153,6 +14156,8 @@ cp_parser_decltype (cp_parser *parser)
start_token->keyword = RID_MAX;
cp_lexer_purge_tokens_after (parser->lexer, start_token);
+ pop_to_parent_deferring_access_checks ();
+
return expr;
}
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 2816045..b58c60f 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -3561,14 +3561,13 @@ find_parameter_packs_r (tree *tp, int *walk_subtrees, void* data)
/* Look through a lambda capture proxy to the field pack. */
case VAR_DECL:
- if (DECL_HAS_VALUE_EXPR_P (t))
- {
- tree v = DECL_VALUE_EXPR (t);
- cp_walk_tree (&v,
- &find_parameter_packs_r,
- ppd, ppd->visited);
- *walk_subtrees = 0;
- }
+ if (DECL_PACK_P (t))
+ {
+ /* We don't want to walk into the type of a variadic capture proxy,
+ because we don't want to see the type parameter pack. */
+ *walk_subtrees = 0;
+ parameter_pack_p = true;
+ }
else if (variable_template_specialization_p (t))
{
cp_walk_tree (&DECL_TI_ARGS (t),
@@ -10838,42 +10837,6 @@ instantiate_class_template_1 (tree type)
c_inhibit_evaluation_warnings = saved_inhibit_evaluation_warnings;
}
- if (tree expr = CLASSTYPE_LAMBDA_EXPR (type))
- {
- tree decl = lambda_function (type);
- if (decl)
- {
- if (cxx_dialect >= cxx17)
- CLASSTYPE_LITERAL_P (type) = true;
-
- if (!DECL_TEMPLATE_INFO (decl)
- || DECL_TEMPLATE_RESULT (DECL_TI_TEMPLATE (decl)) != decl)
- {
- /* Set function_depth to avoid garbage collection. */
- ++function_depth;
- instantiate_decl (decl, /*defer_ok=*/false, false);
- --function_depth;
- }
-
- /* We need to instantiate the capture list from the template
- after we've instantiated the closure members, but before we
- consider adding the conversion op. Also keep any captures
- that may have been added during instantiation of the op(). */
- tree tmpl_expr = CLASSTYPE_LAMBDA_EXPR (pattern);
- tree tmpl_cap
- = tsubst_copy_and_build (LAMBDA_EXPR_CAPTURE_LIST (tmpl_expr),
- args, tf_warning_or_error, NULL_TREE,
- false, false);
-
- LAMBDA_EXPR_CAPTURE_LIST (expr)
- = chainon (tmpl_cap, nreverse (LAMBDA_EXPR_CAPTURE_LIST (expr)));
-
- maybe_add_lambda_conv_op (type);
- }
- else
- gcc_assert (errorcount);
- }
-
/* Set the file and line number information to whatever is given for
the class itself. This puts error messages involving generated
implicit functions at a predictable point, and the same point
@@ -10970,12 +10933,7 @@ extract_fnparm_pack (tree tmpl_parm, tree *spec_p)
parmvec = make_tree_vec (len);
spec_parm = *spec_p;
for (i = 0; i < len; i++, spec_parm = DECL_CHAIN (spec_parm))
- {
- tree elt = spec_parm;
- if (DECL_PACK_P (elt))
- elt = make_pack_expansion (elt);
- TREE_VEC_ELT (parmvec, i) = elt;
- }
+ TREE_VEC_ELT (parmvec, i) = spec_parm;
/* Build the argument packs. */
SET_ARGUMENT_PACK_ARGS (argpack, parmvec);
@@ -11125,6 +11083,7 @@ gen_elem_of_pack_expansion_instantiation (tree pattern,
/* Select the Ith argument from the pack. */
if (TREE_CODE (parm) == PARM_DECL
+ || VAR_P (parm)
|| TREE_CODE (parm) == FIELD_DECL)
{
if (index == 0)
@@ -11429,8 +11388,7 @@ extract_locals_r (tree *tp, int */*walk_subtrees*/, void *data)
/* Pull out the actual PARM_DECL for the partial instantiation. */
tree args = ARGUMENT_PACK_ARGS (spec);
gcc_assert (TREE_VEC_LENGTH (args) == 1);
- tree arg = TREE_VEC_ELT (args, 0);
- spec = PACK_EXPANSION_PATTERN (arg);
+ spec = TREE_VEC_ELT (args, 0);
}
*extra = tree_cons (*tp, spec, *extra);
}
@@ -11551,8 +11509,12 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
where it isn't expected). */
unsubstituted_fn_pack = true;
}
- else if (TREE_CODE (parm_pack) == FIELD_DECL)
- arg_pack = tsubst_copy (parm_pack, args, complain, in_decl);
+ else if (is_normal_capture_proxy (parm_pack))
+ {
+ arg_pack = retrieve_local_specialization (parm_pack);
+ if (argument_pack_element_is_expansion_p (arg_pack, 0))
+ unsubstituted_fn_pack = true;
+ }
else
{
int idx;
@@ -11647,15 +11609,14 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
/* We cannot expand this expansion expression, because we don't have
all of the argument packs we need. */
- if (use_pack_expansion_extra_args_p (packs, len, (unsubstituted_packs
- || unsubstituted_fn_pack)))
+ if (use_pack_expansion_extra_args_p (packs, len, unsubstituted_packs))
{
/* We got some full packs, but we can't substitute them in until we
have values for all the packs. So remember these until then. */
t = make_pack_expansion (pattern, complain);
tree extra = args;
- if (unsubstituted_fn_pack)
+ if (local_specializations)
if (tree locals = extract_local_specs (pattern))
extra = tree_cons (NULL_TREE, extra, locals);
PACK_EXPANSION_EXTRA_ARGS (t) = extra;
@@ -11713,6 +11674,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
tree parm = TREE_PURPOSE (pack);
if (TREE_CODE (parm) == PARM_DECL
+ || VAR_P (parm)
|| TREE_CODE (parm) == FIELD_DECL)
register_local_specialization (TREE_TYPE (pack), parm);
else
@@ -12866,9 +12828,7 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
if (PACK_EXPANSION_P (TREE_TYPE (t)))
{
/* This field is a lambda capture pack. Return a TREE_VEC of
- the expanded fields to instantiate_class_template_1 and
- store them in the specializations hash table as a
- NONTYPE_ARGUMENT_PACK so that tsubst_copy can find them. */
+ the expanded fields to instantiate_class_template_1. */
expanded_types = tsubst_pack_expansion (TREE_TYPE (t), args,
complain, in_decl);
if (TREE_CODE (expanded_types) == TREE_VEC)
@@ -12930,12 +12890,7 @@ tsubst_decl (tree t, tree args, tsubst_flags_t complain)
}
if (vec)
- {
- r = vec;
- tree pack = make_node (NONTYPE_ARGUMENT_PACK);
- SET_ARGUMENT_PACK_ARGS (pack, vec);
- register_specialization (pack, t, args, false, 0);
- }
+ r = vec;
}
break;
@@ -14827,31 +14782,6 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
return t;
case FIELD_DECL:
- if (PACK_EXPANSION_P (TREE_TYPE (t)))
- {
- /* Check for a local specialization set up by
- tsubst_pack_expansion. */
- if (tree r = retrieve_local_specialization (t))
- {
- if (TREE_CODE (r) == ARGUMENT_PACK_SELECT)
- r = ARGUMENT_PACK_SELECT_ARG (r);
- return r;
- }
-
- /* When retrieving a capture pack from a generic lambda, remove the
- lambda call op's own template argument list from ARGS. Only the
- template arguments active for the closure type should be used to
- retrieve the pack specialization. */
- if (LAMBDA_FUNCTION_P (current_function_decl)
- && (template_class_depth (DECL_CONTEXT (t))
- != TMPL_ARGS_DEPTH (args)))
- args = strip_innermost_template_args (args, 1);
-
- /* Otherwise return the full NONTYPE_ARGUMENT_PACK that
- tsubst_decl put in the hash table. */
- return retrieve_specialization (t, args, 0);
- }
-
if (DECL_CONTEXT (t))
{
tree ctx;
@@ -14935,6 +14865,8 @@ tsubst_copy (tree t, tree args, tsubst_flags_t complain, tree in_decl)
if (local_specializations)
register_local_specialization (r, t);
}
+ if (TREE_CODE (r) == ARGUMENT_PACK_SELECT)
+ r = ARGUMENT_PACK_SELECT_ARG (r);
}
else
r = t;
@@ -16104,20 +16036,24 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl,
else
finish_local_using_decl (decl, scope, name);
}
- else if (DECL_PACK_P (decl))
- {
- /* Don't build up decls for a variadic capture proxy, we'll
- instantiate the elements directly as needed. */
- break;
- }
else if (is_capture_proxy (decl)
&& !DECL_TEMPLATE_INSTANTIATION (current_function_decl))
{
/* We're in tsubst_lambda_expr, we've already inserted a new
capture proxy, so look it up and register it. */
- tree inst = lookup_name_real (DECL_NAME (decl), 0, 0,
- /*block_p=*/true, 0, LOOKUP_HIDDEN);
- gcc_assert (inst != decl && is_capture_proxy (inst));
+ tree inst;
+ if (DECL_PACK_P (decl))
+ {
+ inst = (retrieve_local_specialization
+ (DECL_CAPTURED_VARIABLE (decl)));
+ gcc_assert (TREE_CODE (inst) == NONTYPE_ARGUMENT_PACK);
+ }
+ else
+ {
+ inst = lookup_name_real (DECL_NAME (decl), 0, 0,
+ /*block_p=*/true, 0, LOOKUP_HIDDEN);
+ gcc_assert (inst != decl && is_capture_proxy (inst));
+ }
register_local_specialization (inst, decl);
break;
}
@@ -18265,14 +18201,6 @@ tsubst_copy_and_build (tree t,
case VAR_DECL:
if (!args)
RETURN (t);
- else if (DECL_PACK_P (t))
- {
- /* We don't build decls for an instantiation of a
- variadic capture proxy, we instantiate the elements
- when needed. */
- gcc_assert (DECL_HAS_VALUE_EXPR_P (t));
- return RECUR (DECL_VALUE_EXPR (t));
- }
/* Fall through */
case PARM_DECL:
diff --git a/gcc/cse.c b/gcc/cse.c
index 825b0bd..a73a771 100644
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -4256,6 +4256,15 @@ try_back_substitute_reg (rtx set, rtx_insn *insn)
&& (reg_mentioned_p (dest, XEXP (note, 0))
|| rtx_equal_p (src, XEXP (note, 0))))
remove_note (insn, note);
+
+ /* If INSN has a REG_ARGS_SIZE note, move it to PREV. */
+ note = find_reg_note (insn, REG_ARGS_SIZE, NULL_RTX);
+ if (note != 0)
+ {
+ remove_note (insn, note);
+ gcc_assert (!find_reg_note (prev, REG_ARGS_SIZE, NULL_RTX));
+ set_unique_reg_note (prev, REG_ARGS_SIZE, XEXP (note, 0));
+ }
}
}
}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index df357be..9db9d08 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10131,13 +10131,14 @@ a lot of functions that would otherwise not be considered for inlining
by the compiler are investigated. To those functions, a different
(more restrictive) limit compared to functions declared inline can
be applied.
-The default value is 40.
+The default value is 30.
@item inline-min-speedup
When estimated performance improvement of caller + callee runtime exceeds this
threshold (in percent), the function can be inlined regardless of the limit on
@option{--param max-inline-insns-single} and @option{--param
max-inline-insns-auto}.
+The default value is 15.
@item large-function-insns
The limit specifying really large functions. For functions larger than this
diff --git a/gcc/final.c b/gcc/final.c
index 99a7cad..cbebbfd 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -2236,9 +2236,9 @@ asm_show_source (const char *filename, int linenum)
debug information. We force the emission of a line note after
both NOTE_INSN_PROLOGUE_END and NOTE_INSN_FUNCTION_BEG. */
-rtx_insn *
-final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
- int nopeepholes ATTRIBUTE_UNUSED, int *seen)
+static rtx_insn *
+final_scan_insn_1 (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
+ int nopeepholes ATTRIBUTE_UNUSED, int *seen)
{
#if HAVE_cc0
rtx set;
@@ -3189,6 +3189,36 @@ final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p ATTRIBUTE_UNUSED,
}
return NEXT_INSN (insn);
}
+
+/* This is a wrapper around final_scan_insn_1 that allows ports to
+ call it recursively without a known value for SEEN. The value is
+ saved at the outermost call, and recovered for recursive calls.
+ Recursive calls MUST pass NULL, or the same pointer if they can
+ otherwise get to it. */
+
+rtx_insn *
+final_scan_insn (rtx_insn *insn, FILE *file, int optimize_p,
+ int nopeepholes, int *seen)
+{
+ static int *enclosing_seen;
+ static int recursion_counter;
+
+ gcc_assert (seen || recursion_counter);
+ gcc_assert (!recursion_counter || !seen || seen == enclosing_seen);
+
+ if (!recursion_counter++)
+ enclosing_seen = seen;
+ else if (!seen)
+ seen = enclosing_seen;
+
+ rtx_insn *ret = final_scan_insn_1 (insn, file, optimize_p, nopeepholes, seen);
+
+ if (!--recursion_counter)
+ enclosing_seen = NULL;
+
+ return ret;
+}
+
/* Return whether a source line note needs to be emitted before INSN.
Sets IS_STMT to TRUE if the line should be marked as a possible
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b0bd14f..6f416b3 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,38 @@
+2018-02-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/84273
+ * resolve.c (resolve_component): Fix checks of passed argument in
+ procedure-pointer components.
+
+2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/35299
+ * resolve.c (resolve_formal_arglist): Update error message.
+
+2018-02-11 Andre Vehreschild <vehre@gcc.gnu.org>
+
+ * gfortran.texi: Fix typos in documentation of caf_register ().
+ * trans-array.c (structure_alloc_comps): Only register a component of
+ a derived typed corray, not of an ultimate component coarray.
+
+2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/54223
+ PR fortran/84276
+ * interface.c (compare_actual_formal): Add in_statement_function
+ bool parameter. Skip check of INTENT attribute for statement
+ functions. Arguments to a statement function cannot be optional,
+ issue error for missing argument.
+ (gfc_procedure_use, gfc_ppc_use, gfc_arglist_matches_symbol): Use
+ in_statement_function.
+
+2018-02-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/84074
+ * trans-expr.c (gfc_conv_derived_to_class): Set the use_offset
+ flag. If the is a vector subscript or the expression is not a
+ variable, make the descriptor one-based.
+
2018-02-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/84141
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index 1124669..9ffe6ad 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -4453,8 +4453,8 @@ is not used then. On the contrary when
@code{CAF_REGTYPE_COARRAY_ALLOC_ALLOCATE_ONLY} is specified, then the
@var{token} needs to be registered by a previous call with regtype
@code{CAF_REGTYPE_COARRAY_ALLOC_REGISTER_ONLY} and either the memory specified
-in the @var{desc}'s data-ptr is registered or allocate when the data-ptr is
-NULL.
+in the @var{DESC}'s data-ptr is registered or allocate when the data-ptr is
+@code{NULL}.
@item @emph{Syntax}:
@code{void caf_register (size_t size, caf_register_t type, caf_token_t *token,
@@ -4468,24 +4468,24 @@ allocated; for lock types and event types, the number of elements.
@item @var{token} @tab intent(out) An opaque pointer identifying the coarray.
@item @var{desc} @tab intent(inout) The (pseudo) array descriptor.
@item @var{stat} @tab intent(out) For allocatable coarrays, stores the STAT=;
-may be NULL
+may be @code{NULL}
@item @var{errmsg} @tab intent(out) When an error occurs, this will be set to
-an error message; may be NULL
+an error message; may be @code{NULL}
@item @var{errmsg_len} @tab the buffer size of errmsg.
@end multitable
@item @emph{NOTES}
-Nonalloatable coarrays have to be registered prior use from remote images.
+Nonallocatable coarrays have to be registered prior use from remote images.
In order to guarantee this, they have to be registered before the main
program. This can be achieved by creating constructor functions. That is what
-GCC does such that also nonallocatable coarrays the memory is allocated and no
-static memory is used. The token permits to identify the coarray; to the
+GCC does such that also for nonallocatable coarrays the memory is allocated and
+no static memory is used. The token permits to identify the coarray; to the
processor, the token is a nonaliasing pointer. The library can, for instance,
store the base address of the coarray in the token, some handle or a more
complicated struct. The library may also store the array descriptor
@var{DESC} when its rank is non-zero.
-For lock types, the value shall only used for checking the allocation
+For lock types, the value shall only be used for checking the allocation
status. Note that for critical blocks, the locking is only required on one
image; in the locking statement, the processor shall always pass an
image index of one for critical-block lock variables
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 9e55e9d..a5f3f4d 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -2835,7 +2835,8 @@ lookup_arg_fuzzy (const char *arg, gfc_formal_arglist *arguments)
static bool
compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
- int ranks_must_agree, int is_elemental, locus *where)
+ int ranks_must_agree, int is_elemental,
+ bool in_statement_function, locus *where)
{
gfc_actual_arglist **new_arg, *a, *actual;
gfc_formal_arglist *f;
@@ -3204,8 +3205,9 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
}
/* Check intent = OUT/INOUT for definable actual argument. */
- if ((f->sym->attr.intent == INTENT_OUT
- || f->sym->attr.intent == INTENT_INOUT))
+ if (!in_statement_function
+ && (f->sym->attr.intent == INTENT_OUT
+ || f->sym->attr.intent == INTENT_INOUT))
{
const char* context = (where
? _("actual argument to INTENT = OUT/INOUT")
@@ -3310,7 +3312,8 @@ compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
"at %L", where);
return false;
}
- if (!f->sym->attr.optional)
+ if (!f->sym->attr.optional
+ || (in_statement_function && f->sym->attr.optional))
{
if (where)
gfc_error ("Missing actual argument for argument %qs at %L",
@@ -3598,6 +3601,7 @@ check_intents (gfc_formal_arglist *f, gfc_actual_arglist *a)
bool
gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
{
+ gfc_actual_arglist *a;
gfc_formal_arglist *dummy_args;
/* Warn about calls with an implicit interface. Special case
@@ -3631,8 +3635,6 @@ gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
if (sym->attr.if_source == IFSRC_UNKNOWN)
{
- gfc_actual_arglist *a;
-
if (sym->attr.pointer)
{
gfc_error ("The pointer object %qs at %L must have an explicit "
@@ -3724,9 +3726,12 @@ gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
dummy_args = gfc_sym_get_dummy_args (sym);
- if (!compare_actual_formal (ap, dummy_args, 0, sym->attr.elemental, where))
+ /* For a statement function, check that types and type parameters of actual
+ arguments and dummy arguments match. */
+ if (!compare_actual_formal (ap, dummy_args, 0, sym->attr.elemental,
+ sym->attr.proc == PROC_ST_FUNCTION, where))
return false;
-
+
if (!check_intents (dummy_args, *ap))
return false;
@@ -3773,7 +3778,7 @@ gfc_ppc_use (gfc_component *comp, gfc_actual_arglist **ap, locus *where)
}
if (!compare_actual_formal (ap, comp->ts.interface->formal, 0,
- comp->attr.elemental, where))
+ comp->attr.elemental, false, where))
return;
check_intents (comp->ts.interface->formal, *ap);
@@ -3798,7 +3803,7 @@ gfc_arglist_matches_symbol (gfc_actual_arglist** args, gfc_symbol* sym)
dummy_args = gfc_sym_get_dummy_args (sym);
r = !sym->attr.elemental;
- if (compare_actual_formal (args, dummy_args, r, !r, NULL))
+ if (compare_actual_formal (args, dummy_args, r, !r, false, NULL))
{
check_intents (dummy_args, *args);
if (warn_aliasing)
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 60b9bc3..01e2c38 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -512,8 +512,11 @@ resolve_formal_arglist (gfc_symbol *proc)
{
if (sym->as != NULL)
{
- gfc_error ("Argument %qs of statement function at %L must "
- "be scalar", sym->name, &sym->declared_at);
+ /* F03:C1263 (R1238) The function-name and each dummy-arg-name
+ shall be specified, explicitly or implicitly, to be scalar. */
+ gfc_error ("Argument '%s' of statement function '%s' at %L "
+ "must be scalar", sym->name, proc->name,
+ &proc->declared_at);
continue;
}
@@ -13703,8 +13706,8 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
return false;
}
- /* Check for C453. */
- if (me_arg->attr.dimension)
+ /* Check for F03:C453. */
+ if (CLASS_DATA (me_arg)->attr.dimension)
{
gfc_error ("Argument %qs of %qs with PASS(%s) at %L "
"must be scalar", me_arg->name, c->name, me_arg->name,
@@ -13713,7 +13716,7 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
return false;
}
- if (me_arg->attr.pointer)
+ if (CLASS_DATA (me_arg)->attr.class_pointer)
{
gfc_error ("Argument %qs of %qs with PASS(%s) at %L "
"may not have the POINTER attribute", me_arg->name,
@@ -13722,7 +13725,7 @@ resolve_component (gfc_component *c, gfc_symbol *sym)
return false;
}
- if (me_arg->attr.allocatable)
+ if (CLASS_DATA (me_arg)->attr.allocatable)
{
gfc_error ("Argument %qs of %qs with PASS(%s) at %L "
"may not be ALLOCATABLE", me_arg->name, c->name,
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index d8b4381..4ffda26 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -8747,15 +8747,17 @@ structure_alloc_comps (gfc_symbol * der_type, tree decl,
cmp_has_alloc_comps = false;
}
- if (flag_coarray == GFC_FCOARRAY_LIB
- && (caf_in_coarray (caf_mode) || c->attr.codimension))
+ if (flag_coarray == GFC_FCOARRAY_LIB && caf_in_coarray (caf_mode))
{
- /* Register the component with the coarray library. */
+ /* Register a component of a derived type coarray with the
+ coarray library. Do not register ultimate component
+ coarrays here. They are treated like regular coarrays and
+ are either allocated on all images or on none. */
tree token;
comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
decl, cdecl, NULL_TREE);
- if (c->attr.dimension || c->attr.codimension)
+ if (c->attr.dimension)
{
/* Set the dtype, because caf_register needs it. */
gfc_add_modify (&fnblock, gfc_conv_descriptor_dtype (comp),
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c
index 7f790e7..a418582 100644
--- a/gcc/fortran/trans-expr.c
+++ b/gcc/fortran/trans-expr.c
@@ -547,6 +547,7 @@ gfc_conv_derived_to_class (gfc_se *parmse, gfc_expr *e,
tree ctree;
tree var;
tree tmp;
+ int dim;
/* The derived type needs to be converted to a temporary
CLASS object. */
@@ -636,10 +637,34 @@ gfc_conv_derived_to_class (gfc_se *parmse, gfc_expr *e,
{
stmtblock_t block;
gfc_init_block (&block);
+ gfc_ref *ref;
parmse->ss = ss;
+ parmse->use_offset = 1;
gfc_conv_expr_descriptor (parmse, e);
+ /* Detect any array references with vector subscripts. */
+ for (ref = e->ref; ref; ref = ref->next)
+ if (ref->type == REF_ARRAY
+ && ref->u.ar.type != AR_ELEMENT
+ && ref->u.ar.type != AR_FULL)
+ {
+ for (dim = 0; dim < ref->u.ar.dimen; dim++)
+ if (ref->u.ar.dimen_type[dim] == DIMEN_VECTOR)
+ break;
+ if (dim < ref->u.ar.dimen)
+ break;
+ }
+
+ /* Array references with vector subscripts and non-variable expressions
+ need be coverted to a one-based descriptor. */
+ if (ref || e->expr_type != EXPR_VARIABLE)
+ {
+ for (dim = 0; dim < e->rank; ++dim)
+ gfc_conv_shift_descriptor_lbound (&block, parmse->expr, dim,
+ gfc_index_one_node);
+ }
+
if (e->rank != class_ts.u.derived->components->as->rank)
{
gcc_assert (class_ts.u.derived->components->as->type
@@ -10105,7 +10130,7 @@ gfc_trans_assignment_1 (gfc_expr * expr1, gfc_expr * expr2, bool init_flag,
&expr1->where, msg);
}
- /* Deallocate the lhs parameterized components if required. */
+ /* Deallocate the lhs parameterized components if required. */
if (dealloc && expr2->expr_type == EXPR_FUNCTION
&& !expr1->symtree->n.sym->attr.associate_var)
{
diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE
index 3d73330..ea7ae4b 100644
--- a/gcc/go/gofrontend/MERGE
+++ b/gcc/go/gofrontend/MERGE
@@ -1,4 +1,4 @@
-89105404f94005ffa8e2b08df78015dc9ac91362
+7998e29eec43ede1cee925d87eef0b09da67d90b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
diff --git a/gcc/go/gofrontend/gogo.cc b/gcc/go/gofrontend/gogo.cc
index 11ac338..0eac199 100644
--- a/gcc/go/gofrontend/gogo.cc
+++ b/gcc/go/gofrontend/gogo.cc
@@ -7762,33 +7762,29 @@ Bindings::new_definition(Named_object* old_object, Named_object* new_object)
go_unreachable();
case Named_object::NAMED_OBJECT_FUNC:
- if (new_object->is_function_declaration())
- {
- if (!new_object->func_declaration_value()->asm_name().empty())
- go_error_at(Linemap::unknown_location(),
- ("sorry, not implemented: "
- "__asm__ for function definitions"));
- Function_type* old_type = old_object->func_value()->type();
- Function_type* new_type =
- new_object->func_declaration_value()->type();
- if (old_type->is_valid_redeclaration(new_type, &reason))
- return old_object;
- }
break;
case Named_object::NAMED_OBJECT_FUNC_DECLARATION:
{
- if (new_object->is_function())
+ // We declare the hash and equality functions before defining
+ // them, because we sometimes see that we need the declaration
+ // while we are in the middle of a different function. We
+ // declare the main function before the user defines it, to
+ // give better error messages.
+ if (new_object->is_function()
+ && ((Linemap::is_predeclared_location(old_object->location())
+ && Linemap::is_predeclared_location(new_object->location()))
+ || (Gogo::unpack_hidden_name(old_object->name()) == "main"
+ && Linemap::is_unknown_location(old_object->location()))))
{
Function_type* old_type =
old_object->func_declaration_value()->type();
Function_type* new_type = new_object->func_value()->type();
if (old_type->is_valid_redeclaration(new_type, &reason))
{
- if (!old_object->func_declaration_value()->asm_name().empty())
- go_error_at(Linemap::unknown_location(),
- ("sorry, not implemented: "
- "__asm__ for function definitions"));
+ Function_declaration* fd =
+ old_object->func_declaration_value();
+ go_assert(fd->asm_name().empty());
old_object->set_function_value(new_object->func_value());
this->named_objects_.push_back(old_object);
return old_object;
@@ -7810,8 +7806,10 @@ Bindings::new_definition(Named_object* old_object, Named_object* new_object)
old_object->set_is_redefinition();
new_object->set_is_redefinition();
- go_inform(old_object->location(), "previous definition of %qs was here",
- n.c_str());
+ if (!Linemap::is_unknown_location(old_object->location())
+ && !Linemap::is_predeclared_location(old_object->location()))
+ go_inform(old_object->location(), "previous definition of %qs was here",
+ n.c_str());
return old_object;
}
diff --git a/gcc/internal-fn.def b/gcc/internal-fn.def
index 5970d0e..deacc1e 100644
--- a/gcc/internal-fn.def
+++ b/gcc/internal-fn.def
@@ -255,8 +255,8 @@ DEF_INTERNAL_FN (UBSAN_PTR, ECF_LEAF | ECF_NOTHROW, ".R.")
DEF_INTERNAL_FN (UBSAN_OBJECT_SIZE, ECF_LEAF | ECF_NOTHROW, NULL)
DEF_INTERNAL_FN (ABNORMAL_DISPATCHER, ECF_NORETURN, NULL)
DEF_INTERNAL_FN (BUILTIN_EXPECT, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
-DEF_INTERNAL_FN (ASAN_CHECK, ECF_TM_PURE | ECF_LEAF | ECF_NOTHROW, ".R...")
-DEF_INTERNAL_FN (ASAN_MARK, ECF_LEAF | ECF_NOTHROW, ".R..")
+DEF_INTERNAL_FN (ASAN_CHECK, ECF_TM_PURE | ECF_LEAF | ECF_NOTHROW, "..R..")
+DEF_INTERNAL_FN (ASAN_MARK, ECF_LEAF | ECF_NOTHROW, "..W.")
DEF_INTERNAL_FN (ASAN_POISON, ECF_LEAF | ECF_NOTHROW | ECF_NOVOPS, NULL)
DEF_INTERNAL_FN (ASAN_POISON_USE, ECF_LEAF | ECF_NOTHROW | ECF_NOVOPS, NULL)
DEF_INTERNAL_FN (ADD_OVERFLOW, ECF_CONST | ECF_LEAF | ECF_NOTHROW, NULL)
diff --git a/gcc/ipa-split.c b/gcc/ipa-split.c
index 24b30f6..b03ae029 100644
--- a/gcc/ipa-split.c
+++ b/gcc/ipa-split.c
@@ -558,10 +558,13 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
" Refused: split size is smaller than call overhead\n");
return;
}
+ /* FIXME: The logic here is not very precise, because inliner does use
+ inline predicates to reduce function body size. We add 10 to anticipate
+ that. Next stage1 we should try to be more meaningful here. */
if (current->header_size + call_overhead
>= (unsigned int)(DECL_DECLARED_INLINE_P (current_function_decl)
? MAX_INLINE_INSNS_SINGLE
- : MAX_INLINE_INSNS_AUTO))
+ : MAX_INLINE_INSNS_AUTO) + 10)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
@@ -574,7 +577,7 @@ consider_split (struct split_point *current, bitmap non_ssa_vars,
Limit this duplication. This is consistent with limit in tree-sra.c
FIXME: with LTO we ought to be able to do better! */
if (DECL_ONE_ONLY (current_function_decl)
- && current->split_size >= (unsigned int) MAX_INLINE_INSNS_AUTO)
+ && current->split_size >= (unsigned int) MAX_INLINE_INSNS_AUTO + 10)
{
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file,
diff --git a/gcc/params.def b/gcc/params.def
index 930b318..e333679 100644
--- a/gcc/params.def
+++ b/gcc/params.def
@@ -52,13 +52,13 @@ DEFPARAM (PARAM_PREDICTABLE_BRANCH_OUTCOME,
DEFPARAM (PARAM_INLINE_MIN_SPEEDUP,
"inline-min-speedup",
"The minimal estimated speedup allowing inliner to ignore inline-insns-single and inline-insns-auto.",
- 8, 0, 0)
+ 15, 0, 0)
/* The single function inlining limit. This is the maximum size
of a function counted in internal gcc instructions (not in
real machine instructions) that is eligible for inlining
by the tree inliner.
- The default value is 450.
+ The default value is 400.
Only functions marked inline (or methods defined in the class
definition for C++) are affected by this.
There are more restrictions to inlining: If inlined functions
@@ -77,11 +77,11 @@ DEFPARAM (PARAM_MAX_INLINE_INSNS_SINGLE,
that is applied to functions marked inlined (or defined in the
class declaration in C++) given by the "max-inline-insns-single"
parameter.
- The default value is 40. */
+ The default value is 30. */
DEFPARAM (PARAM_MAX_INLINE_INSNS_AUTO,
"max-inline-insns-auto",
"The maximum number of instructions when automatically inlining.",
- 40, 0, 0)
+ 30, 0, 0)
DEFPARAM (PARAM_MAX_INLINE_INSNS_RECURSIVE,
"max-inline-insns-recursive",
diff --git a/gcc/po/ChangeLog b/gcc/po/ChangeLog
index ea547cb..ff51160 100644
--- a/gcc/po/ChangeLog
+++ b/gcc/po/ChangeLog
@@ -1,3 +1,7 @@
+2018-02-12 Joseph Myers <joseph@codesourcery.com>
+
+ * sv.po: Update.
+
2018-02-07 Joseph Myers <joseph@codesourcery.com>
* es.po: Update.
diff --git a/gcc/po/sv.po b/gcc/po/sv.po
index b249303..8be467a 100644
--- a/gcc/po/sv.po
+++ b/gcc/po/sv.po
@@ -24,7 +24,7 @@ msgstr ""
"Project-Id-Version: gcc 8.1-b20180128\n"
"Report-Msgid-Bugs-To: https://gcc.gnu.org/bugs/\n"
"POT-Creation-Date: 2018-01-26 22:47+0000\n"
-"PO-Revision-Date: 2018-02-05 17:57+0100\n"
+"PO-Revision-Date: 2018-02-11 12:03+0100\n"
"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
"Language: sv\n"
@@ -1093,16 +1093,14 @@ msgid "call %2d never executed\n"
msgstr "anrop %2d aldrig utfört\n"
#: gcov.c:2693
-#, fuzzy, c-format
-#| msgid "branch %2d taken %s%s\n"
+#, c-format
msgid "branch %2d taken %s%s"
-msgstr "hopp %2d gjort %s%s\n"
+msgstr "hopp %2d gjort %s%s"
#: gcov.c:2698
-#, fuzzy, c-format
-#| msgid "branch %2d never executed\n"
+#, c-format
msgid "branch %2d never executed"
-msgstr "gren %2d aldrig utförd\n"
+msgstr "gren %2d aldrig utförd"
#: gcov.c:2701
#, c-format
@@ -1313,16 +1311,14 @@ msgid "The following options are language-related"
msgstr "Följande flaggor är språkrelaterade"
#: passes.c:1797
-#, fuzzy, c-format
-#| msgid "deducing %qT as %qT"
+#, c-format
msgid "during %s pass: %s\n"
-msgstr "härleder %qT som %qT"
+msgstr "under %s-passet: %s\n"
#: passes.c:1802
-#, fuzzy, c-format
-#| msgid "open %s failed: %s"
+#, c-format
msgid "dump file: %s\n"
-msgstr "öppning av %s misslyckades: %s"
+msgstr "dumpfil: %s\n"
#: plugin.c:923
msgid "Event"
@@ -2188,10 +2184,9 @@ msgid "The size of L2 cache."
msgstr "Storleken på L2-cachen."
#: params.def:797
-#, fuzzy, no-c-format
-#| msgid "The maximum number of instructions to consider to unroll in a loop on average."
+#, no-c-format
msgid "The maximum number of stmts in loop nest for loop interchange."
-msgstr "Det maximala antalet instruktioner för att överväga att rulle ut i en slinga i genomsnitt."
+msgstr "Det maximala antalet satser i slingnästning för slingutväxling."
#: params.def:804
#, no-c-format
@@ -2334,10 +2329,9 @@ msgid "The minimum UID to be used for a nondebug insn."
msgstr "Minsta UID som får användas för en icke-felsökningsinstruktion."
#: params.def:997
-#, fuzzy, no-c-format
-#| msgid "Maximum allowed growth of size of new parameters ipa-sra replaces a pointer to an aggregate with."
+#, no-c-format
msgid "Maximum allowed growth of number and total size of new parameters that ipa-sra replaces a pointer to an aggregate with."
-msgstr "Största tillåtna storleksökning för nya parametrar som ipa-sra ersätter en pekare till ett aggregat med."
+msgstr "Största tillåtna ökning av antal och total storlek på nya parametrar som ipa-sra ersätter en pekare till ett aggregat med."
#: params.def:1003
#, no-c-format
@@ -2475,10 +2469,9 @@ msgid "Enable asan stack protection."
msgstr "Aktivera asan-skydd av stack."
#: params.def:1172
-#, fuzzy, no-c-format
-#| msgid "Enable asan globals protection."
+#, no-c-format
msgid "Enable asan allocas/VLAs protection."
-msgstr "Aktivera globalt asan-skydd."
+msgstr "Aktivera asan-skydd av alloca:n/VLA:er."
#: params.def:1177
#, no-c-format
@@ -2566,10 +2559,9 @@ msgid "Schedule type of omp schedule for loops parallelized by parloops (static,
msgstr "Schematyp av omp-schema för slingor parallelliserade av parloops (static, dynamic, guided, auto, runtime)."
#: params.def:1268
-#, fuzzy, no-c-format
-#| msgid "The maximum number of instructions to consider to unroll in a loop."
+#, no-c-format
msgid "Minimum number of iterations per thread of an innermost parallelized loop."
-msgstr "Det maximala antalet instruktioner för att överväga att rulla ut i en slinga."
+msgstr "Det minimala antalet iterationer per trådar hos en innersta parallelliserad slinga."
#: params.def:1274
#, no-c-format
@@ -2622,10 +2614,9 @@ msgid "Maximum unroll factor for the unroll-and-jam transformation."
msgstr "Maximal utrullningsfaktor för transformationen unroll-and-jam."
#: params.def:1331
-#, fuzzy, no-c-format
-#| msgid "Maximum number of strings for which strlen optimization pass will track string lengths."
+#, no-c-format
msgid "Maximum number of bits for which we avoid creating FMAs."
-msgstr "Maximalt antal strängar för vilket strlen-optimeringspasset kommer följa stränglängder."
+msgstr "Maximalt antal bitar för vilka vi undviker att skapa FMA:er."
#: c-family/c-format.c:382
msgid "format"
@@ -2901,10 +2892,9 @@ msgid "<command-line>"
msgstr "<kommandorad>"
#: config/aarch64/aarch64.c:6482
-#, fuzzy, c-format
-#| msgid "Unsupported operand for code '%c'"
+#, c-format
msgid "unsupported operand for code '%c'"
-msgstr "Ej stödd operand för kod ”%c”"
+msgstr "ej stödd operand för kod ”%c”"
#: config/aarch64/aarch64.c:6493 config/aarch64/aarch64.c:6509
#: config/aarch64/aarch64.c:6521 config/aarch64/aarch64.c:6532
@@ -2918,10 +2908,9 @@ msgstr "ogiltig operand för ”%%%c”"
#: config/aarch64/aarch64.c:6578 config/aarch64/aarch64.c:6589
#: config/aarch64/aarch64.c:6740 config/aarch64/aarch64.c:6751
-#, fuzzy, c-format
-#| msgid "invalid constant"
+#, c-format
msgid "invalid vector constant"
-msgstr "ogiltig konstant"
+msgstr "ogiltig vektorkonstant"
#: config/aarch64/aarch64.c:6601 config/aarch64/aarch64.c:6613
#: config/aarch64/aarch64.c:6624
@@ -3055,10 +3044,9 @@ msgid "invalid operand to %%z code"
msgstr "ogiltig operand till %%z-kod"
#: config/arc/arc.c:3870
-#, fuzzy, c-format
-#| msgid "invalid operand to %%Z code"
+#, c-format
msgid "invalid operands to %%c code"
-msgstr "ogiltig operand till %%Z-kod"
+msgstr "ogiltig operand till %%c-kod"
#: config/arc/arc.c:3878
#, c-format
@@ -3495,10 +3483,9 @@ msgid "invalid UNSPEC as operand"
msgstr "ogiltig UNSPEC som operand"
#: config/i386/i386.c:17748
-#, fuzzy, c-format
-#| msgid "invalid use of %<restrict%>"
+#, c-format
msgid "invalid use of register '%s'"
-msgstr "ogiltigt användning av %<restrict%>"
+msgstr "ogiltigt användning av register ”%s”"
#: config/i386/i386.c:17753
#, c-format
@@ -4491,34 +4478,24 @@ msgid "jump to case label"
msgstr "hopp till case-etikett"
#: cp/decl.c:3159
-#, fuzzy
-#| msgid " enters try block"
msgid "enters try block"
-msgstr " går in i try-block"
+msgstr "går in i try-block"
#: cp/decl.c:3165
-#, fuzzy
-#| msgid " enters catch block"
msgid "enters catch block"
-msgstr " går in i catch-block"
+msgstr "går in i catch-block"
#: cp/decl.c:3171
-#, fuzzy
-#| msgid " enters OpenMP structured block"
msgid "enters OpenMP structured block"
-msgstr " går in i OpenMP-strukturerat block"
+msgstr "går in i OpenMP-strukturerat block"
#: cp/decl.c:3177
-#, fuzzy
-#| msgid " enters synchronized or atomic statement"
msgid "enters synchronized or atomic statement"
-msgstr " går in i synkroniserad eller atomär sats"
+msgstr "går in i synkroniserad eller atomär sats"
#: cp/decl.c:3184
-#, fuzzy
-#| msgid " enters constexpr if statement"
msgid "enters constexpr if statement"
-msgstr " går in constexpr-if-sats"
+msgstr "går in constexpr-if-sats"
#: cp/error.c:365
msgid "<missing>"
@@ -4566,10 +4543,8 @@ msgid "(static destructors for %s)"
msgstr "(statiska destruerare för %s)"
#: cp/error.c:1040
-#, fuzzy
-#| msgid "structure field"
msgid "<structured bindings>"
-msgstr "postfält"
+msgstr "<strukturerade bindningar>"
#: cp/error.c:1143
msgid "vtable for "
@@ -4722,16 +4697,12 @@ msgid "%r%s:%d:%R [ skipping %d instantiation contexts, use -ftemplate-backtra
msgstr "%r%s:%d:%R [ hoppar över %d instansieringskontexter, använd -ftemplate-backtrace-limit=0 för att avaktivera ]\n"
#: cp/error.c:3624
-#, fuzzy
-#| msgid "%r%s:%d:%d:%R in constexpr expansion of %qs"
msgid "%r%s:%d:%d:%R in %<constexpr%> expansion of %qs"
-msgstr "%r%s:%d:%d:%R i expansion av konstantuttryck i %qs"
+msgstr "%r%s:%d:%d:%R i expansion av %<constexpr%> i %qs"
#: cp/error.c:3628
-#, fuzzy
-#| msgid "%r%s:%d:%R in constexpr expansion of %qs"
msgid "%r%s:%d:%R in %<constexpr%> expansion of %qs"
-msgstr "%r%s:%d:%R i expansion av konstantuttryck i från %qs"
+msgstr "%r%s:%d:%R i expansion av %<constexpr%> i %qs"
#: cp/pt.c:1941 cp/semantics.c:5234
msgid "candidates are:"
@@ -4876,16 +4847,12 @@ msgid "arguments '%s' and '%s' for intrinsic '%s'"
msgstr "argument ”%s” och ”%s” för inbyggd ”%s”"
#: fortran/error.c:868
-#, fuzzy
-#| msgid "Fortran 2008 obsolescent feature:"
msgid "Fortran 2018 deleted feature:"
-msgstr "Fortran 2008: förlegad funktion:"
+msgstr "Fortran 2018 borttagen funktion:"
#: fortran/error.c:871
-#, fuzzy
-#| msgid "Fortran 2008 obsolescent feature:"
msgid "Fortran 2018 obsolescent feature:"
-msgstr "Fortran 2008: förlegad funktion:"
+msgstr "Fortran 2018 förlegad funktion:"
#: fortran/error.c:874
msgid "Fortran 2018:"
@@ -5234,10 +5201,9 @@ msgid "Operands of comparison operator %%<%s%%> at %%L are %s/%s"
msgstr "Operanderna till jämförelseoperatorn %%<%s%%> vid %%L är %s/%s"
#: fortran/resolve.c:4031
-#, fuzzy, c-format
-#| msgid "Unknown operator %%<%s%%> at %%L"
+#, c-format
msgid "Unknown operator %%<%s%%> at %%L; did you mean '%s'?"
-msgstr "Okänd operator %%<%s%%> vid %%L"
+msgstr "Okänd operator %%<%s%%> vid %%L; menade du ”%s”?"
#: fortran/resolve.c:4034
#, c-format
@@ -5759,10 +5725,8 @@ msgid "Warn about most implicit conversions."
msgstr "Varna för de flesta implicita konverteringar."
#: fortran/lang.opt:242
-#, fuzzy
-#| msgid "Warn about possibly missing parentheses."
msgid "Warn about possibly incorrect subscripts in do loops."
-msgstr "Varna för eventuellt saknade parenteser."
+msgstr "Varna för eventuellt felaktiga index i do-slingor."
#: fortran/lang.opt:250
msgid "Warn if loops have been interchanged."
@@ -5894,10 +5858,8 @@ msgid "Use the Cray Pointer extension."
msgstr "Använd Cray-pekarutökningen."
#: fortran/lang.opt:429
-#, fuzzy
-#| msgid "Warn about unprototyped function declarations."
msgid "Generate C prototypes from BIND(C) declarations."
-msgstr "Varna för funktionsdeklarationer utan prototyp."
+msgstr "Generera C-prototyper från BIND(C)-deklarationer."
#: fortran/lang.opt:433
msgid "Ignore 'D' in column one in fixed form."
@@ -5940,16 +5902,12 @@ msgid "Set the default real kind to an 8 byte wide type."
msgstr "Ange standard för sorten reell till en 8 byte bred typ."
#: fortran/lang.opt:473
-#, fuzzy
-#| msgid "Set the default real kind to an 8 byte wide type."
msgid "Set the default real kind to an 10 byte wide type."
-msgstr "Ange standard för sorten reell till en 8 byte bred typ."
+msgstr "Ange standard för sorten reell till en 10 byte bred typ."
#: fortran/lang.opt:477
-#, fuzzy
-#| msgid "Set the default real kind to an 8 byte wide type."
msgid "Set the default real kind to an 16 byte wide type."
-msgstr "Ange standard för sorten reell till en 8 byte bred typ."
+msgstr "Ange standard för sorten reell till en 16 byte bred typ."
#: fortran/lang.opt:481
msgid "Allow dollar signs in entity names."
@@ -6203,10 +6161,8 @@ msgid "Conform to the ISO Fortran 2008 standard including TS 29113."
msgstr "Följ standarden ISO Fortran 2008 inklusive TS 29113."
#: fortran/lang.opt:807
-#, fuzzy
-#| msgid "Conform to the ISO Fortran 2008 standard."
msgid "Conform to the ISO Fortran 2018 standard."
-msgstr "Följ standarden ISO Fortran 2008."
+msgstr "Följ standarden ISO Fortran 2018."
#: fortran/lang.opt:811
msgid "Conform to the ISO Fortran 95 standard."
@@ -6424,26 +6380,20 @@ msgid "Warn about C++ constructs whose meaning differs between ISO C++ 2011 and
msgstr "Varna för C++-konstruktioner vars betydelse skiljer mellan ISO C++ 2011 och ISO C++ 2014."
#: c-family/c.opt:385
-#, fuzzy
-#| msgid "Warn about C++ constructs whose meaning differs between ISO C++ 2011 and ISO C++ 2014."
msgid "Warn about C++ constructs whose meaning differs between ISO C++ 2014 and ISO C++ 2017."
-msgstr "Varna för C++-konstruktioner vars betydelse skiljer mellan ISO C++ 2011 och ISO C++ 2014."
+msgstr "Varna för C++-konstruktioner vars betydelse skiljer mellan ISO C++ 2014 och ISO C++ 2017."
#: c-family/c.opt:389
-#, fuzzy
-#| msgid "Warn about casting functions to incompatible types."
msgid "Warn about casts between incompatible function types."
-msgstr "Varna för typkonvertering av funktioner till inkompatibla typer."
+msgstr "Varna för typkonvertering mellan inkompatibla funktionstyper."
#: c-family/c.opt:393
msgid "Warn about casts which discard qualifiers."
msgstr "Varna för typkonvertering som slänger kvalificerare."
#: c-family/c.opt:397 c-family/c.opt:401
-#, fuzzy
-#| msgid "Warn about comparison of different enum types."
msgid "Warn about catch handlers of non-reference type."
-msgstr "Varna för jämförelser av skilda uppräkningstyper."
+msgstr "Varna för fångsthanterare av icke-referenstyper."
#: c-family/c.opt:405
msgid "Warn about subscripts whose type is \"char\"."
@@ -6550,10 +6500,8 @@ msgid "This switch is deprecated; use -Werror=implicit-function-declaration inst
msgstr "Denna flagga bör undvikas, använd -Werror=implicit-function-declaration istället."
#: c-family/c.opt:521
-#, fuzzy
-#| msgid "Warn about implicit function declarations."
msgid "Warn about semicolon after in-class function definition."
-msgstr "Varna för implicita funktionsdeklarationer."
+msgstr "Varna för semikolon efter funktionsdefinitioner i klassen."
#: c-family/c.opt:525
msgid "Warn for implicit type conversions that cause loss of floating point precision."
@@ -6612,10 +6560,8 @@ msgid "Warn about calls to snprintf and similar functions that truncate output."
msgstr "Varna för anrop till snprintf och liknande funktioner som hugger av utdata."
#: c-family/c.opt:588
-#, fuzzy
-#| msgid "Warn when a Cell microcoded instruction is emitted."
msgid "Warn when the field in a struct is not aligned."
-msgstr "Varna när en Cell-mikrokodsinstruktion avges."
+msgstr "Varna när fältet i en strukt inte är justerat."
#: c-family/c.opt:592
msgid "Warn whenever type qualifiers are ignored."
@@ -6766,10 +6712,8 @@ msgid "Under the control of Object Size type, warn about buffer overflow in stri
msgstr "Under kontroll av Object Size-typ, varna för buffertspill i stränghanteringsfunktioner som memcpy och strcpy."
#: c-family/c.opt:753
-#, fuzzy
-#| msgid "Warn about buffer overflow in string manipulation functions like memcpy and strcpy."
msgid "Warn about truncation in string manipulation functions like strncat and strncpy."
-msgstr "Varna för buffertspill i stränghanteringsfunktioner som memcpy och strcpy."
+msgstr "Varna för avhuggning i stränghanteringsfunktioner som strncat och strcpy."
#: c-family/c.opt:757
msgid "Warn about functions which might be candidates for format attributes."
@@ -6840,10 +6784,8 @@ msgid "Warn when a noexcept expression evaluates to false even though the expres
msgstr "Varna när ett noexcept-uttryck beräknas till false även om uttrycket inte faktiskt kan kasta."
#: c-family/c.opt:821
-#, fuzzy
-#| msgid "Warn if C++1z noexcept function type will change the mangled name of a symbol."
msgid "Warn if C++17 noexcept function type will change the mangled name of a symbol."
-msgstr "Varna om funktionstypen noexcept i C++1z kommer ändra det manglade namnet på en symbol."
+msgstr "Varna om funktionstypen noexcept i C++17 kommer ändra det manglade namnet på en symbol."
#: c-family/c.opt:825
msgid "Warn when non-templatized friend functions are declared within a template."
@@ -7251,10 +7193,8 @@ msgid "Transform instrumented builtin calls into calls to wrappers."
msgstr "Transformera instrumenterade inbyggda anrop till anrop av inkapslingar."
#: c-family/c.opt:1339
-#, fuzzy
-#| msgid "Deprecated. This switch has no effect."
msgid "Deprecated in GCC 8. This switch has no effect."
-msgstr "Avrådes ifrån. Denna flagga har ingen effekt."
+msgstr "Avrådes ifrån i GCC 8. Denna flagga har ingen effekt."
#: c-family/c.opt:1343
msgid "Enable support for C++ concepts."
@@ -7716,22 +7656,16 @@ msgid "Conform to the ISO 2014 C++ standard."
msgstr "Följ standarden ISO 2014 C++."
#: c-family/c.opt:1941
-#, fuzzy
-#| msgid "Deprecated in favor of -std=c++11."
msgid "Deprecated in favor of -std=c++17."
-msgstr "Undanbedes till förmån för -std=c++11."
+msgstr "Undanbedes till förmån för -std=c++17."
#: c-family/c.opt:1945
-#, fuzzy
-#| msgid "Conform to the ISO 2011 C++ standard."
msgid "Conform to the ISO 2017 C++ standard."
-msgstr "Följ standarden ISO 2011 C++."
+msgstr "Följ standarden ISO 2017 C++."
#: c-family/c.opt:1949
-#, fuzzy
-#| msgid "Conform to the ISO 2017(?) C++ draft standard (experimental and incomplete support)."
msgid "Conform to the ISO 2020(?) C++ draft standard (experimental and incomplete support)."
-msgstr "Följ standardutkastet ISO 2017(?) C++ (experimentellt och ofullständigt stöd)."
+msgstr "Följ standardutkastet ISO 2020(?) C++ (experimentellt och ofullständigt stöd)."
#: c-family/c.opt:1953 c-family/c.opt:2071
msgid "Conform to the ISO 2011 C standard."
@@ -7743,10 +7677,8 @@ msgstr "Undanbedes till förmån för -std=c11."
#: c-family/c.opt:1961 c-family/c.opt:1965 c-family/c.opt:2075
#: c-family/c.opt:2079
-#, fuzzy
-#| msgid "Conform to the ISO 1990 C standard as amended in 1994."
msgid "Conform to the ISO 2017 C standard (expected to be published in 2018)."
-msgstr "Följ standarden ISO 1990 C med tillägg från 1994."
+msgstr "Följ standarden ISO 2017 C (förväntas publiceras 2018)."
#: c-family/c.opt:1969 c-family/c.opt:1973 c-family/c.opt:2055
msgid "Conform to the ISO 1990 C standard."
@@ -7781,22 +7713,16 @@ msgid "Conform to the ISO 2014 C++ standard with GNU extensions."
msgstr "Följ standarden ISO 2014 C++ med GNU-utökningar."
#: c-family/c.opt:2011
-#, fuzzy
-#| msgid "Deprecated in favor of -std=gnu++11."
msgid "Deprecated in favor of -std=gnu++17."
-msgstr "Undanbedes till förmån för -std=gnu++11."
+msgstr "Undanbedes till förmån för -std=gnu++17."
#: c-family/c.opt:2015
-#, fuzzy
-#| msgid "Conform to the ISO 2011 C++ standard with GNU extensions."
msgid "Conform to the ISO 2017 C++ standard with GNU extensions."
-msgstr "Följ standarden ISO 2011 C++ med GNU-utökningar."
+msgstr "Följ standarden ISO 2017 C++ med GNU-utökningar."
#: c-family/c.opt:2019
-#, fuzzy
-#| msgid "Conform to the ISO 201z(7?) C++ draft standard with GNU extensions (experimental and incomplete support)."
msgid "Conform to the ISO 2020(?) C++ draft standard with GNU extensions (experimental and incomplete support)."
-msgstr "Följ standardutkastet ISO 201z(7?) C++ med GNU-utökningar (experimentellt och ofullständigt stöd)."
+msgstr "Följ standardutkastet ISO 2020(?) C++ med GNU-utökningar (experimentellt och ofullständigt stöd)."
#: c-family/c.opt:2023
msgid "Conform to the ISO 2011 C standard with GNU extensions."
@@ -7807,10 +7733,8 @@ msgid "Deprecated in favor of -std=gnu11."
msgstr "Undanbedes till förmån för -std=gnu11."
#: c-family/c.opt:2031 c-family/c.opt:2035
-#, fuzzy
-#| msgid "Conform to the ISO 2011 C standard with GNU extensions."
msgid "Conform to the ISO 2017 C standard (expected to be published in 2018) with GNU extensions."
-msgstr "Följ standarden ISO 2011 C med GNU-utökningar."
+msgstr "Följ standarden ISO 2017 C (förväntas publiceras 2018) med GNU-utökningar."
#: c-family/c.opt:2039 c-family/c.opt:2043
msgid "Conform to the ISO 1990 C standard with GNU extensions."
@@ -8411,10 +8335,8 @@ msgid "Specify the code model."
msgstr "Ange kodmodellen."
#: config/riscv/riscv.opt:93
-#, fuzzy
-#| msgid "Do not use unaligned memory references."
msgid "Do not generate unaligned memory accesses."
-msgstr "Använd inte ojusterade minnesreferenser."
+msgstr "Generera inte ojusterade minnesreferenser."
#: config/riscv/riscv.opt:97 config/i386/i386.opt:287
#: config/powerpcspe/aix64.opt:36 config/powerpcspe/linux64.opt:32
@@ -8598,10 +8520,8 @@ msgid "Enable the division approximation. Enabling this reduces precision of di
msgstr "Aktivera approximationen av division. Att aktivera detta reducerar precisionen på resultatet av division till ungefär 16 bitar för enkel precision och till 32 bitar för dubbel precision."
#: config/aarch64/aarch64.opt:190
-#, fuzzy
-#| msgid "The possible TLS dialects:"
msgid "The possible SVE vector lengths:"
-msgstr "De möjliga TLS-dialekterna:"
+msgstr "De möjliga SVE-vektorlängderna:"
#: config/aarch64/aarch64.opt:212
msgid "-msve-vector-bits=N\tSet the number of bits in an SVE vector register to N."
@@ -8960,10 +8880,8 @@ msgid "target the FT32B architecture"
msgstr "ha FT32B-arkitekturen som mål"
#: config/ft32/ft32.opt:39
-#, fuzzy
-#| msgid "Enable code hoisting."
msgid "enable FT32B code compression"
-msgstr "Aktivera kodhissning."
+msgstr "aktivera FT32B-kodkomprimering"
#: config/ft32/ft32.opt:43
msgid "Avoid placing any readable data in program memory"
@@ -9231,10 +9149,8 @@ msgid "Known assembler dialects (for use with the -masm= option):"
msgstr "Kända assemblerdialekter (att användas med flaggan -masm=):"
#: config/i386/i386.opt:275
-#, fuzzy
-#| msgid "Branches are this expensive (1-5, arbitrary units)."
msgid "Branches are this expensive (arbitrary units)."
-msgstr "Hopp är så här dyra (1-5, godtyckliga enheter)."
+msgstr "Hopp är så här dyra (godtyckliga enheter)."
#: config/i386/i386.opt:279
msgid "-mlarge-data-threshold=<number>\tData greater than given threshold will go into .ldata section in x86-64 medium model."
@@ -9437,16 +9353,12 @@ msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the a
msgstr "Använd 128-bitars AVX-instruktioner istället för 256-bitars AVX-instruktioner i automatvektoriseraren."
#: config/i386/i386.opt:600
-#, fuzzy
-#| msgid "Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer."
msgid "Use given register vector width instructions instead of maximum register width in the auto-vectorizer."
-msgstr "Använd 128-bitars AVX-instruktioner istället för 256-bitars AVX-instruktioner i automatvektoriseraren."
+msgstr "Använd angivna registervektorbreddsinstruktioner istället maximal registerbredd i automatvektoriseraren."
#: config/i386/i386.opt:604
-#, fuzzy
-#| msgid "Known stack protector guard (for use with the -mstack-protector-guard= option):"
msgid "Known preferred register vector length (to use with the -mprefer-vector-width= option)"
-msgstr "Kända stackskyddsvakter (att användas med flaggan -mstack-protector-guard=):"
+msgstr "Känd föredragen registervektorlängd (att användas med flaggan -mprefer-vector-width=)"
#: config/i386/i386.opt:622
msgid "Generate 32bit i386 code."
@@ -9565,22 +9477,16 @@ msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F a
msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX512VPOPCNTDQ-funktioner och -kodgenerering."
#: config/i386/i386.opt:742
-#, fuzzy
-#| msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2 and AVX512F and AVX512VBMI built-in functions and code generation."
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX512VBMI2 built-in functions and code generation."
-msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2- och AVX512F- och AVX512VBMI-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX512VBMI-funktioner och -kodgenerering."
#: config/i386/i386.opt:746
-#, fuzzy
-#| msgid "Support BMI built-in functions and code generation."
msgid "Support AVX512VNNI built-in functions and code generation."
-msgstr "Stöd inbyggda BMI-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda AVX512VNNI-funktioner och -kodgenerering."
#: config/i386/i386.opt:750
-#, fuzzy
-#| msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX5124FMAPS built-in functions and code generation."
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX, AVX2, AVX512F and AVX512BITALG built-in functions and code generation."
-msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX5124FMAPS-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda MMX-, SSE-, SSE2-, SSE3-, SSSE3-, SSE4.1-, SSE4.2-, AVX-, AVX2-, AVX512F- och AVX512BITALG-funktioner och -kodgenerering."
#: config/i386/i386.opt:754
msgid "Support MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, AVX and FMA built-in functions and code generation."
@@ -9619,22 +9525,16 @@ msgid "Support RDPID built-in functions and code generation."
msgstr "Stöd inbyggda RDPID-funktioner och -kodgenerering."
#: config/i386/i386.opt:790
-#, fuzzy
-#| msgid "Support BMI built-in functions and code generation."
msgid "Support GFNI built-in functions and code generation."
-msgstr "Stöd inbyggda BMI-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda GFNI-funktioner och -kodgenerering."
#: config/i386/i386.opt:794
-#, fuzzy
-#| msgid "Support AES built-in functions and code generation."
msgid "Support VAES built-in functions and code generation."
-msgstr "Stöd inbyggda AES-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda VAES-funktioner och -kodgenerering."
#: config/i386/i386.opt:798
-#, fuzzy
-#| msgid "Support PCLMUL built-in functions and code generation."
msgid "Support VPCLMULQDQ built-in functions and code generation."
-msgstr "Stöd inbyggda PCLMUL-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda VPCLMULQDQ-funktioner och -kodgenerering."
#: config/i386/i386.opt:802
msgid "Support BMI built-in functions and code generation."
@@ -9816,20 +9716,16 @@ msgid "Use the given offset for addressing the stack-protector guard."
msgstr "Använd angivet avstånd för adressering av stackskyddsvakten."
#: config/i386/i386.opt:991
-#, fuzzy
-#| msgid "Use the given offset for addressing the stack-protector guard."
msgid "Use the given symbol for addressing the stack-protector guard."
-msgstr "Använd angivet avstånd för adressering av stackskyddsvakten."
+msgstr "Använd den angivna symbolen för adressering av stackskyddsvakten."
#: config/i386/i386.opt:995
msgid "Attempt to avoid generating instruction sequences containing ret bytes."
msgstr "Försök undvika att generera instruktionssekvenser som innehåller ret-byte:ar."
#: config/i386/i386.opt:1003
-#, fuzzy
-#| msgid "Support MMX and SSE built-in functions and code generation."
msgid "Support Control-flow Enforcment Technology (CET) built-in functions and code generation."
-msgstr "Stöd inbyggda MMX- och SSE-funktioner och -kodgenerering."
+msgstr "Stöd inbyggda funktioner och kodgenerering för Control-flow Enforcement Technology (CET)."
#: config/i386/i386.opt:1008
msgid "Specifically enables an indirect branch tracking feature from Control-flow Enforcment Technology (CET)."
@@ -9844,10 +9740,8 @@ msgid "Turn on CET instrumentation for switch statements, which use jump table a
msgstr "Slå på CET-instrumentering för switch-satser, som använder hopptabeller och indirekt hopp."
#: config/i386/i386.opt:1023
-#, fuzzy
-#| msgid "Warn about function call elimination."
msgid "Make all function calls indirect."
-msgstr "Varna för eliminering av funktionsanrop."
+msgstr "Gör alla funktionsanrop indirekta."
#: config/i386/i386.opt:1027
msgid "Convert indirect call and jump to call and return thunks."
@@ -35633,12 +35527,12 @@ msgstr "%qs-argumentet till inbyggd %qs vid %L har fel antal element (%d/%d)"
#: c/c-parser.c:8331 c/c-parser.c:8341
#, gcc-internal-format
msgid "invalid type-generic return type for argument %u of %<__builtin_tgmath%>"
-msgstr ""
+msgstr "felaktig typgenerisk returtyp för argument %u till %<__builtin_tgmath%>"
#: c/c-parser.c:8363 c/c-parser.c:8373
#, gcc-internal-format
msgid "invalid type-generic type for argument %u of argument %u of %<__builtin_tgmath%>"
-msgstr ""
+msgstr "felaktig typgenerisk typ för argument %u till argument %u till %<__builtin_tgmath%>"
#: c/c-parser.c:8406
#, fuzzy, gcc-internal-format
@@ -35649,17 +35543,17 @@ msgstr "%qs- och %qs-argumenten till inbyggd %qs vid %L måste ha samma typ"
#: c/c-parser.c:8425
#, gcc-internal-format
msgid "function arguments of %<__builtin_tgmath%> lack type-generic parameter"
-msgstr ""
+msgstr "funktionsargumentet till %<__builtin_tgmath%> saknar en typgenerisk parameter"
#: c/c-parser.c:8473
#, gcc-internal-format
msgid "duplicate type-generic parameter type for function argument %u of %<__builtin_tgmath%>"
-msgstr ""
+msgstr "dubblerad typgenerisk parametertyp för funktionsargument %u till %<__builtin_tgmath%>"
#: c/c-parser.c:8496
#, gcc-internal-format
msgid "bad return type for function argument %u of %<__builtin_tgmath%>"
-msgstr ""
+msgstr "felaktig returtyp för funktionsargument %u till %<__builtin_tgmath%>"
#: c/c-parser.c:8513
#, fuzzy, gcc-internal-format
@@ -35839,7 +35733,7 @@ msgstr "attributet %<getter%> kan bara anges en gång"
#: c/c-parser.c:10886 cp/parser.c:38449
#, gcc-internal-format
msgid "%<#pragma GCC unroll%> requires an assignment-expression that evaluates to a non-negative integral constant less than %u"
-msgstr ""
+msgstr "%<#pragma GCC unroll%> kräver ett tilldelningsuttryck som beräknas till en icke-negativ heltalskonstant mindre än %u"
#: c/c-parser.c:10930 c/c-parser.c:16563 c/c-parser.c:16821 c/c-parser.c:16880
#: c/c-parser.c:16964 cp/parser.c:35781 cp/parser.c:36075 cp/parser.c:36163
@@ -36871,7 +36765,7 @@ msgstr "implicit konvertering från %qT till %qT för att stämma med andra resu
#: c/c-typeck.c:5092 c/c-typeck.c:5098
#, gcc-internal-format
msgid "operand of ?: changes signedness from %qT to %qT due to unsignedness of other operand"
-msgstr ""
+msgstr "operand till ?: ändrar teckenläge från %qT till %qT på grund av teckenlöshet hos en annan operand"
#: c/c-typeck.c:5115
#, gcc-internal-format
@@ -38202,7 +38096,7 @@ msgstr "konvertering från %qT till %qT är tvetydig"
#: cp/call.c:4078
msgid "initializing %qH with %qI in converted constant expression does not bind directly"
-msgstr ""
+msgstr "initiering av %qH med %qI i konverterat konstantuttryck binder inte direkt"
#: cp/call.c:4099
#, fuzzy
@@ -38606,7 +38500,7 @@ msgstr "skickar argument till ellips av den ärvda konstrueraren %qD"
#: cp/call.c:8472
#, gcc-internal-format
msgid "%qD writing to an object of type %#qT with no trivial copy-assignment"
-msgstr ""
+msgstr "%qD skriver till ett objekt av typen %#qT utan någon trivial kopieringstilldelning"
#: cp/call.c:8475
#, fuzzy, gcc-internal-format
@@ -38614,15 +38508,16 @@ msgstr ""
msgid "%qD writing to an object of non-trivial type %#qT%s"
msgstr "konvertering till void kommer inte använda objekt av ej trivialt kopierbar typ %qT"
+# %qs blir "protected" eller "private"
#: cp/call.c:8480
#, gcc-internal-format
msgid "%qD writing to an object of type %#qT with %qs member %qD"
-msgstr ""
+msgstr "%qD skriver till ett objekt av typen %#qT med %qs-medlem %qD"
#: cp/call.c:8485
#, gcc-internal-format
msgid "%qD writing to an object of type %#qT containing a pointer to data member%s"
-msgstr ""
+msgstr "%qD skriver till ett objekt av typen %#qT som innehåller en pekare till datamedlem%s"
#: cp/call.c:8500
#, fuzzy, gcc-internal-format
@@ -38645,7 +38540,7 @@ msgstr "värdeinitiering av funktionstypen %qT"
#: cp/call.c:8507
#, gcc-internal-format
msgid "%qD clearing an object of type %#qT with no trivial copy-assignment%s"
-msgstr ""
+msgstr "%qD nollställer ett objekt av typend %#qT utan någon trivial kopieringstilldelning%s"
#: cp/call.c:8510
#, fuzzy, gcc-internal-format
@@ -38656,7 +38551,7 @@ msgstr "skapar pekare till medlem av typ %qT som inte är en klass"
#: cp/call.c:8512
#, gcc-internal-format
msgid "%qD clearing an object of type %#qT containing a pointer-to-member%s"
-msgstr ""
+msgstr "%qD nollställer ett objekt av typen %#qT som innehåller en pekare-till-medlem%s"
#: cp/call.c:8533
#, fuzzy, gcc-internal-format
@@ -38679,7 +38574,7 @@ msgstr "ominitiering av %qs vid %L"
#: cp/call.c:8540
#, gcc-internal-format
msgid "%qD writing to an object of type %#qT with no trivial copy-assignment%s"
-msgstr ""
+msgstr "%qD skriver till ett objekt av typen %#qT utan någon trivial kopieringstilldelning%s"
#: cp/call.c:8543
#, fuzzy, gcc-internal-format
@@ -38690,27 +38585,28 @@ msgstr "konvertering till void kommer inte använda objekt av ej trivialt kopier
#: cp/call.c:8546
#, gcc-internal-format
msgid "%qD writing to an object with a deleted copy constructor"
-msgstr ""
+msgstr "%qD skriver till ett objekt med en borttagen kopieringskonstruerare"
#: cp/call.c:8557
#, gcc-internal-format
msgid "%qD copying an object of non-trivial type %#qT from an array of %#qT"
-msgstr ""
+msgstr "%qD kopierar ett objekt med en icke-trivial typ %#qT från en vektor av %#qT"
+# %qs blir "protected" eller "private"
#: cp/call.c:8569
#, gcc-internal-format
msgid "%qD copying an object of type %#qT with %qs member %qD from an array of %#qT; use assignment or copy-initialization instead"
-msgstr ""
+msgstr "%qD kopierar ett objekt av typen %#qT med %qs-medlem %qD från en vektor av %#qT; använd tilldelning eller kopieringsinitiering istället"
#: cp/call.c:8586
#, gcc-internal-format
msgid "%qD writing to an object of a non-trivial type %#qT leaves %wu bytes unchanged"
-msgstr ""
+msgstr "%qD skriver till ett objekt med en icke-trivial typ %#qT och lämnar %wu byte oförändrade"
#: cp/call.c:8589
#, gcc-internal-format
msgid "%qD writing to an object of a non-trivial type %#qT leaves %wu byte unchanged"
-msgstr ""
+msgstr "%qD skriver till ett objekt av en icke-trivial typ %#qT och lämnar %wu byte oförändrade"
#: cp/call.c:8599
#, fuzzy, gcc-internal-format
@@ -38721,12 +38617,12 @@ msgstr "att ta emot objekt av ej trivialt kopierbar typ %q#T via %<...%> är vil
#: cp/call.c:8602
#, gcc-internal-format
msgid "%qD moving an object of type %#qT with deleted copy constructor; use %<new%> and %<delete%> instead"
-msgstr ""
+msgstr "%qD flyttar ett objekt av typen %#qT med en borttagen kopieringskonstruerare; använd %<new%> och %<delete%> istället"
#: cp/call.c:8605
#, gcc-internal-format
msgid "%qD moving an object of type %#qT with deleted destructor"
-msgstr ""
+msgstr "%qD flyttar ett objekt av typen %#qT med en borttagen destruerare"
#: cp/call.c:8614
#, fuzzy, gcc-internal-format
@@ -38992,7 +38888,7 @@ msgstr "%q#T definierar bara privata konstruerare och har inga vänner"
#: cp/class.c:2168
#, gcc-internal-format
msgid "%q#D is public, but requires an existing %q#T object"
-msgstr ""
+msgstr "%q#D är public, men behöver ett befintligt %q#T-objekt"
#: cp/class.c:2442
#, gcc-internal-format
@@ -39213,7 +39109,7 @@ msgstr "%q+T är inte litteral för att:"
#: cp/class.c:5400
#, gcc-internal-format
msgid " %qT is a closure type, which is only literal in C++17 and later"
-msgstr ""
+msgstr " %qT är en höljestyp (closure), som är literaler endast i C++17 och senare"
#: cp/class.c:5403
#, gcc-internal-format
@@ -39449,7 +39345,7 @@ msgstr "ogiltig typ för parameter %d till constexpr-funktion %q+#D"
#: cp/constexpr.c:206
#, gcc-internal-format
msgid "lambdas are implicitly %<constexpr%> only in C++17 and later"
-msgstr ""
+msgstr "lambdan är implicit %<constexpr%> endast i C++17 och senare"
#: cp/constexpr.c:216
#, fuzzy, gcc-internal-format
@@ -39740,7 +39636,7 @@ msgstr "ändring av %qE är inte ett konstant uttryck"
#: cp/constexpr.c:5357
#, gcc-internal-format
msgid "because it is used as a glvalue"
-msgstr ""
+msgstr "för att det används som ett gl-värde"
#: cp/constexpr.c:5392
#, gcc-internal-format
@@ -40206,7 +40102,7 @@ msgstr "oanvänd variabel %qD"
#: cp/decl.c:690
#, gcc-internal-format
msgid "structured binding declaration set but not used"
-msgstr ""
+msgstr "strukturerad bindningsdeklaration satt men inte använd"
#: cp/decl.c:909
#, gcc-internal-format
@@ -40408,7 +40304,7 @@ msgstr "överflödig omdeklaration av %qD i samma definitionsområde"
#: cp/decl.c:1952
#, gcc-internal-format
msgid "deleted definition of %q+D"
-msgstr "raderad definition av %q+D"
+msgstr "borttagen definition av %q+D"
#. From [temp.expl.spec]:
#.
@@ -40487,7 +40383,7 @@ msgstr "överflödig omdeklaration av statisk %<constexpr%>-datamedlem %qD"
#: cp/decl.c:2997
#, gcc-internal-format
msgid "local label %qE conflicts with existing label"
-msgstr ""
+msgstr "den lokala etiketten %qE står i konflikt med en befintlig etikett"
#: cp/decl.c:2998
#, fuzzy, gcc-internal-format
@@ -40519,7 +40415,7 @@ msgstr " går in i räckvidden hos %q#D som har en icke-trivial destruerare"
#: cp/decl.c:3200
#, gcc-internal-format, gfc-internal-format
msgid " %s"
-msgstr ""
+msgstr " %s"
#: cp/decl.c:3295 cp/decl.c:3315
#, gcc-internal-format
@@ -42956,7 +42852,7 @@ msgstr "gammal deklaration av %q#D"
#: cp/decl2.c:719
#, gcc-internal-format
msgid "no conversion operators declared"
-msgstr ""
+msgstr "inga konverteringsoperatorer deklarerade"
#: cp/decl2.c:722
#, fuzzy, gcc-internal-format
@@ -43232,7 +43128,7 @@ msgstr "användning av borttagen funktion %qD"
#: cp/decl2.c:5278
#, gcc-internal-format
msgid "use of built-in parameter pack %qD outside of a template"
-msgstr ""
+msgstr "användning av den inbyggda parameterpaketet %qD utanför en mall"
#: cp/error.c:1523
#, gcc-internal-format
@@ -43248,7 +43144,7 @@ msgstr "inga argument"
#: cp/error.c:3780
#, gcc-internal-format
msgid "[...]"
-msgstr ""
+msgstr "[…]"
#: cp/error.c:4140
#, gcc-internal-format
@@ -43283,7 +43179,7 @@ msgstr "enum med räckvidd är endast tillgängliga med -std=c++11 eller -std=gn
#: cp/error.c:4168
#, gcc-internal-format
msgid "defaulted and deleted functions only available with -std=c++11 or -std=gnu++11"
-msgstr "standarddefinierade och raderade funktioner är endast tillgängliga med -std=c++11 eller -std=gnu++11"
+msgstr "standarddefinierade och borttagna funktioner är endast tillgängliga med -std=c++11 eller -std=gnu++11"
#: cp/error.c:4173
#, gcc-internal-format
@@ -43520,7 +43416,7 @@ msgstr "rekursiv instansiering av ickestatisk datamedleminitierare för %qD"
#: cp/init.c:608
#, gcc-internal-format
msgid "default member initializer for %qD required before the end of its enclosing class"
-msgstr ""
+msgstr "standardmedlemsinitieraren för %qD behövs före slutet på dess omgivande klass"
#: cp/init.c:610
#, fuzzy, gcc-internal-format
@@ -43892,7 +43788,7 @@ msgstr "redan infångad %qD i lambdauttryck"
#: cp/lambda.c:632
#, gcc-internal-format
msgid "trying to capture %qD in instantiation of generic lambda"
-msgstr ""
+msgstr "försök att fånga %qD i instantiering av en generisk lambda"
#: cp/lambda.c:807
#, gcc-internal-format
@@ -44071,17 +43967,17 @@ msgstr "standarddefinierad flyttningstilldelning av %qT anropar en icketrivial f
#: cp/method.c:1815
#, gcc-internal-format
msgid "a lambda closure type has a deleted default constructor"
-msgstr "en lambdahöljestyp har en raderad standardkonstruerare"
+msgstr "en lambdahöljestyp har en borttagen standardkonstruerare"
#: cp/method.c:1818
#, gcc-internal-format
msgid "a lambda closure type has a deleted copy assignment operator"
-msgstr "en lambdahöljetyp har en raderad koperingstilldelningsoperator"
+msgstr "en lambdahöljetyp har en borttagen koperingstilldelningsoperator"
#: cp/method.c:1827
#, gcc-internal-format
msgid "%q#D is implicitly declared as deleted because %qT declares a move constructor or move assignment operator"
-msgstr "%q#D är implicit deklarerad som raderad för att %qT deklarerar en flyttkonstruerare eller flyttilldelningsoperator"
+msgstr "%q#D är implicit deklarerad som borttagen för att %qT deklarerar en flyttkonstruerare eller flyttilldelningsoperator"
#: cp/method.c:1838
#, gcc-internal-format
@@ -44091,11 +43987,11 @@ msgstr "%q#D ärver från flera bassubobjekt"
#: cp/method.c:1859
#, gcc-internal-format
msgid "%q#D is implicitly deleted because the default definition would be ill-formed:"
-msgstr "%q#D är underförstått raderad eftersom standarddefinitionen skulle vara felformulerad:"
+msgstr "%q#D är underförstått borttagen eftersom standarddefinitionen skulle vara felformulerad:"
#: cp/method.c:1868
msgid "%q#F is implicitly deleted because its exception-specification does not match the implicit exception-specification %qX"
-msgstr "%q#F raderas implicit för att dess undantagsspecifikation stämmer inte med den implicita undantagsspecifikationen %qX"
+msgstr "%q#F tas implicit bort för att dess undantagsspecifikation stämmer inte med den implicita undantagsspecifikationen %qX"
#: cp/method.c:2188
#, fuzzy, gcc-internal-format
@@ -44223,7 +44119,7 @@ msgstr " använder föråldrad bindning vid %qD"
#: cp/name-lookup.c:3300
#, gcc-internal-format
msgid "this flexibility is deprecated and will be removed"
-msgstr ""
+msgstr "denna flexibilitet bör undvikas och kommer tas bort"
#: cp/name-lookup.c:3354
#, fuzzy, gcc-internal-format
@@ -44373,7 +44269,7 @@ msgstr "föreslaget alternativ: %qs"
#: cp/name-lookup.c:5519
#, gcc-internal-format
msgid "%<std::%s%> is defined in header %qs; did you forget to %<#include %s%>?"
-msgstr ""
+msgstr "%<std::%s%> är definierad i huvudet %qs; glömde du %<#include %s%>?"
#: cp/name-lookup.c:5698
#, fuzzy, gcc-internal-format
@@ -44771,12 +44667,12 @@ msgstr "kan inte hitta en numerisk litteraloperator %qD"
#: cp/parser.c:4435
#, gcc-internal-format
msgid "add %<using namespace std::complex_literals%> (from <complex>) to enable the C++14 user-defined literal suffixes"
-msgstr ""
+msgstr "lägg till %<using namespace std::complex_literals%> (från <complex>) för att aktivera C++14 användardefinierade literala suffix"
#: cp/parser.c:4439
#, gcc-internal-format
msgid "or use %<j%> instead of %<i%> for the GNU built-in suffix"
-msgstr ""
+msgstr "eller använd %<j%> istället för %<i%> som det GNU:s inbyggda suffix"
#: cp/parser.c:4443
#, fuzzy, gcc-internal-format
@@ -45904,7 +45800,7 @@ msgstr "ISO C++ tillåter inte C99:s designerade initierare"
#: cp/parser.c:22111
#, gcc-internal-format
msgid "either all initializer clauses should be designated or none of them should be"
-msgstr ""
+msgstr "antingen skall alla initierarklausuler vara designerade eller så skall ingen av dem var det"
#: cp/parser.c:22136
#, fuzzy, gcc-internal-format
@@ -45915,7 +45811,7 @@ msgstr "ISO C++ tillåter inte designerade initierare"
#: cp/parser.c:22174
#, gcc-internal-format
msgid "%<.%s%> designator used multiple times in the same initializer list"
-msgstr ""
+msgstr "designeraren %<.%s%> använd flera gånger i samma intierarlista"
#: cp/parser.c:22230 cp/parser.c:22356
#, gcc-internal-format
@@ -46034,7 +45930,7 @@ msgstr "minnesjustering angiven för namnlöst bitfält"
#: cp/parser.c:23660
#, gcc-internal-format
msgid "ISO C++ allows bit-field attributes only before the %<:%> token"
-msgstr ""
+msgstr "ISO C++ tillåter endast bitfältsattribut före symbolen %<:%>"
#: cp/parser.c:23805
#, gcc-internal-format
@@ -46631,7 +46527,7 @@ msgstr "implicita mallar får inte vara %<virtual%>"
#: cp/parser.c:39094
#, gcc-internal-format
msgid "%<extern \"C\"%> linkage started here"
-msgstr ""
+msgstr "%<extern \"C\"%>-länkning startade här"
#: cp/pt.c:302
#, gcc-internal-format
@@ -48101,12 +47997,12 @@ msgstr "föreslår uttryckliga klamrar runt tom kropp i %<do%>-sats"
#: cp/semantics.c:1349
#, gcc-internal-format
msgid "catching polymorphic type %q#T by value"
-msgstr ""
+msgstr "fångar polymorf typ %q#T efter värde"
#: cp/semantics.c:1352
#, gcc-internal-format
msgid "catching type %q#T by value"
-msgstr ""
+msgstr "fångar typ %q#T efter värde"
#: cp/semantics.c:1356
#, fuzzy, gcc-internal-format
@@ -48582,7 +48478,7 @@ msgstr "justeringen av %qD ökade i -fabi-version=9 (GCC 5.2)"
#: cp/tree.c:3967
#, gcc-internal-format
msgid " because all of its copy and move constructors are deleted"
-msgstr ""
+msgstr " för att alla dess kopierings- och flyttkonstruerade är borttagna"
#: cp/tree.c:4328
#, gcc-internal-format
@@ -48830,7 +48726,7 @@ msgstr "typen som destrueras är %qT, men destrueraren refererar till %qT"
#: cp/typeck.c:2735
#, gcc-internal-format
msgid "field %q#D can be accessed via %q#D"
-msgstr ""
+msgstr "fältet %q#D kan kommas åt via %q#D"
#: cp/typeck.c:2841 cp/typeck.c:2867
#, gcc-internal-format
@@ -49299,7 +49195,7 @@ msgstr "konvertering från %qT till %qT förlorar precision"
#: cp/typeck.c:7409
msgid "cast between incompatible function types from %qH to %qI"
-msgstr ""
+msgstr "konvertering mellan inkompatibla funktionstyper från %qH till %qT"
#: cp/typeck.c:7420
#, fuzzy
@@ -49695,7 +49591,7 @@ msgstr " för följande virtuella funktioner är rena inuti %qT:"
#: cp/typeck2.c:388
#, gcc-internal-format
msgid "\t%#qD"
-msgstr ""
+msgstr "\t%#qD"
#: cp/typeck2.c:441
#, gcc-internal-format
@@ -51856,7 +51752,7 @@ msgstr "Initiering av allokerbar komponent vid %C är inte tillåtet"
#: fortran/decl.c:2561
#, gcc-internal-format, gfc-internal-format
msgid "The component with KIND or LEN attribute at %C does not not appear in the type parameter list at %L"
-msgstr ""
+msgstr "Komponenten med attributet KIND eller LEN vid %C förekommer inte i typparameterlistan vid %L"
#: fortran/decl.c:2569
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -51933,7 +51829,7 @@ msgstr "Postnamn förväntades efter RECORD vid %C"
#: fortran/decl.c:3247
#, gcc-internal-format, gfc-internal-format
msgid "The type parameter spec list at %C cannot contain both ASSUMED and DEFERRED parameters"
-msgstr ""
+msgstr "Typparameterspecifikationslistan vid %C får inte innehålla både ASSUMED- och DEFERRED-parametrar"
#: fortran/decl.c:3271
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -51956,7 +51852,7 @@ msgstr "Uttryck vid %L måste vara av INTEGER-typ, hittade %s"
#: fortran/decl.c:3355
#, gcc-internal-format
msgid "The KIND parameter '%qs' at %C cannot either be ASSUMED or DEFERRED"
-msgstr ""
+msgstr "KIND-parametern ”%qs” vid %C kan varken vara ASSUMED eller DEFERRED"
#: fortran/decl.c:3362
#, fuzzy, gcc-internal-format
@@ -51967,7 +51863,7 @@ msgstr "Vektor %qs vid %L är en variabel, som inte reduceras till ett konstant
#: fortran/decl.c:3377
#, gcc-internal-format, gfc-internal-format
msgid "The type parameter spec list at %C contains too many parameter expressions"
-msgstr ""
+msgstr "Typparameterspecifikationslitan vid %C innehåller för många parameteruttryck"
#: fortran/decl.c:3386
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -53206,7 +53102,7 @@ msgstr "Syntaxfel i !GCC$ ATTRIBUTES-sats vid %C"
#: fortran/decl.c:10990
#, gcc-internal-format
msgid "%<GCC unroll%> directive requires a non-negative integral constant less than or equal to %u at %C"
-msgstr ""
+msgstr "Direktivet %<GCC unroll%> kräver en icke-negativ heltalskonstant mindre än eller lika med %u vid %C"
#: fortran/decl.c:11004
#, fuzzy, gcc-internal-format, gfc-internal-format
@@ -53758,7 +53654,7 @@ msgstr "Pekartilldelningsmålet har attributet PROTECTED vid %L"
#: fortran/expr.c:3917
#, gcc-internal-format, gfc-internal-format
msgid "Assignment to contiguous pointer from non-contiguous target at %L"
-msgstr ""
+msgstr "Tilldelning till sammanhängande pekare från icke sammanhängande mål vid %L"
#: fortran/expr.c:3956
#, gcc-internal-format, gfc-internal-format
@@ -55928,7 +55824,7 @@ msgstr "typspecifikation i ALLOCATE vid %L"
#: fortran/match.c:4157
#, gcc-internal-format, gfc-internal-format
msgid "The type parameter spec list in the type-spec at %L cannot contain DEFERRED parameters"
-msgstr ""
+msgstr "Typparameterspecifikationslistan i typspecifikationen vid %L får inte innehålla DEFERRED-parametrar"
#: fortran/match.c:4191
#, gcc-internal-format, gfc-internal-format
@@ -56237,7 +56133,7 @@ msgstr "Typspecifikationen skall inte specificera en sekvens härledd typ eller
#: fortran/match.c:6353
#, gcc-internal-format, gfc-internal-format
msgid "All the LEN type parameters in the TYPE IS statement at %C must be ASSUMED"
-msgstr ""
+msgstr "Alla LEN-typparametrar i satsen TYPE IS vid %C måste vara ASSUMED"
#: fortran/match.c:6364
#, gcc-internal-format, gfc-internal-format
@@ -58060,7 +57956,7 @@ msgstr "DATA-sats vid %C efter den första körbara satsen"
#: fortran/parse.c:5423
#, gcc-internal-format
msgid "%<GCC unroll%> directive does not commence a loop at %C"
-msgstr ""
+msgstr "Direktivet %<GCC unroll%> börjar inte en slinga vid %C"
#: fortran/parse.c:5538
#, gcc-internal-format
@@ -58801,7 +58697,7 @@ msgstr "COMMON-block %qs vid %L som också är en global procedur"
#: fortran/resolve.c:1164
#, gcc-internal-format
msgid "The KIND parameter %qs in the PDT constructor at %C has no value"
-msgstr ""
+msgstr "KIND-parametern %qs i PDT-konstrueraren vid %C har inget värde"
#: fortran/resolve.c:1300
#, gcc-internal-format, gfc-internal-format
@@ -60486,7 +60382,7 @@ msgstr "Ej utvidgningsbar härledd typ %qs vid %L får inte vara ABSTRACT"
#: fortran/resolve.c:14053
#, gcc-internal-format
msgid "Parameterized type %qs does not have a component corresponding to parameter %qs at %L"
-msgstr ""
+msgstr "Den parameteriserade typen %qs har inte någon komponent som motsvarar parametern %qs vid %L"
#: fortran/resolve.c:14086
#, gcc-internal-format
@@ -60562,12 +60458,12 @@ msgstr "Enheten %qs vid %L har en fördröjd typparameter och kräver antingen a
#: fortran/resolve.c:14376
#, gcc-internal-format
msgid "The AUTOMATIC object %qs at %L must not have the SAVE attribute or be a variable declared in the main program, a module or a submodule(F08/C513)"
-msgstr ""
+msgstr "AUTOMATIC-objektet %qs vid %L får inte ha attributet SAVE eller vara en variabel deklarerad i huvudprogrammet, en modul eller en submodul(F08/C513)"
#: fortran/resolve.c:14383
#, gcc-internal-format
msgid "The object %qs at %L with ASSUMED type parameters must be a dummy or a SELECT TYPE selector(F08/4.2)"
-msgstr ""
+msgstr "Objektet %qs vid %L med ASSUMED typparametrar måste vara en attrapp eller en SELECT TYPE-selektor(F08/4.2)"
#: fortran/resolve.c:14422
#, gcc-internal-format, gfc-internal-format
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a14db69..4026175 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,120 @@
+2018-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/84341
+ * c-c++-common/gomp/pr84341.c: New test.
+
+2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/68746
+ * gfortran.dg/read_dir.f90: Re-add dg-do run.
+
+2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/68746
+ * gfortran.dg/read_dir.f90: Remove xfails. Also allow iostat
+ of zero for read.
+
+2018-02-12 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/compile/reg-args-size.c: New test.
+
+2018-02-12 Carl Love <cel@us.ibm.com>
+
+ * gcc.target/powerpc/builtins-4-runnable.c (main): Move int128 and
+ uint128 tests to new testfile.
+ * gcc.target/powerpc/builtins-4-int128-runnable.c: New testfile for
+ int128 and uint128 tests.
+ * gcc.target/powerpc/powerpc.exp: Add builtins-4-int128-runnable.c to
+ list of torture tests.
+
+2018-02-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/84273
+ * gfortran.dg/proc_ptr_47.f90: Fix invalid test case.
+ * gfortran.dg/proc_ptr_comp_pass_4.f90: Fix and extend test case.
+
+2018-02-12 Tamar Christina <tamar.christina@arm.com>
+
+ PR target/82641
+ * gcc.target/arm/pragma_arch_switch_2.c: Use armv5te.
+
+2018-02-12 Paolo Bonzini <bonzini@gnu.org>
+
+ PR sanitizer/84307
+ * gcc.dg/asan/pr84307.c: New test.
+
+2018-02-12 Nathan Sidwell <nathan@acm.org>
+
+ * g++.dg/parse/pr84263.C: New.
+
+2018-02-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/79626
+ * g++.dg/template/crash129.C: New.
+
+2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
+
+ PR target/83828
+ * gcc.target/i386/avx512bitalg-vpopcntb-1.c: Fix test.
+ * gcc.target/i386/avx512bitalg-vpopcntw-1.c: Ditto.
+ * gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c: Ditto.
+ * gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c: Ditto.
+ * gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c: Ditto.
+
+2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
+
+ * gcc.target/i386/avx512f-vscalefsd-1.c (_mm_mask_scalef_round_sd,
+ _mm_maskz_scalef_round_sd): Test new intrinsics.
+ * gcc.target/i386/avx512f-vscalefsd-2.c (_mm_scalef_round_sd,
+ (_mm_mask_scalef_round_sd, _mm_maskz_scalef_round_sd): Test new
+ intrinsics.
+ * gcc.target/i386/avx512f-vscalefss-1.c (_mm_mask_scalef_round_ss,
+ _mm_maskz_scalef_round_ss): Test new intrinsics.
+ * gcc.target/i386/avx512f-vscalefss-2.c (_mm_scalef_round_ss,
+ _mm_mask_scalef_round_ss, _mm_maskz_scalef_round_ss): Test new
+ intrinsics.
+ * gcc.target/i386/avx-1.c (__builtin_ia32_scalefsd_round,
+ __builtin_ia32_scalefss_round): Remove builtin.
+ (__builtin_ia32_scalefsd_mask_round,
+ __builtin_ia32_scalefss_mask_round): Test new builtin.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+
+2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
+
+ * gcc.target/i386/avx512f-vsqrtsd-1.c (_mm_mask_sqrt_round_sd)
+ (_mm_maskz_sqrt_round_sd): Test new intrinsics.
+ * gcc.target/i386/avx512f-vsqrtsd-2.c (_mm_sqrt_round_sd)
+ (_mm_mask_sqrt_round_sd, _mm_maskz_sqrt_round_sd): Test new intrinsics.
+ * gcc.target/i386/avx512f-vsqrtss-1.c (_mm_mask_sqrt_round_ss)
+ (_mm_maskz_sqrt_round_ss): Test new intrinsics.
+ * gcc.target/i386/avx512f-vsqrtss-2.c (_mm_sqrt_round_ss)
+ (_mm_mask_sqrt_round_ss,      _mm_maskz_sqrt_round_ss): Test new
+ intrinsics.
+ * gcc.target/i386/avx-1.c (__builtin_ia32_sqrtsd_round)
+ (__builtin_ia32_sqrtss_round): Remove builtins.
+ (__builtin_ia32_sqrtsd_mask_round)
+ (__builtin_ia32_sqrtss_mask_round): Test new builtins.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+
+2018-02-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/35299
+ * gfortran.dg/statement_function_3.f: New test.
+
+2018-02-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/54223
+ PR fortran/84276
+ * gfortran.dg/statement_function_1.f90: New test.
+ * gfortran.dg/statement_function_2.f90: New test.
+
+2018-02-11 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/84074
+ * gfortran.dg/type_to_class_5.f03: New test.
+
2018-02-10 Paul Thomas <pault@gcc.gnu.org>
PR fortran/56691
@@ -12,6 +129,10 @@
PR sanitizer/83987
* g++.dg/ubsan/pr83987-2.C: New test.
+
+2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
+
+ * gcc.target/rx/movsicc.c: New test.
2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
@@ -877,6 +998,10 @@
PR c++/83924
* g++.dg/warn/Wduplicated-branches5.C: New.
+2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
+
+ * gcc.target/rl78/test_addsi3_internal.c: New test.
+
2018-01-26 Segher Boessenkool <segher@kernel.crashing.org>
* gcc.target/powerpc/safe-indirect-jump-1.c: Build on all targets.
diff --git a/gcc/testsuite/c-c++-common/gomp/pr84341.c b/gcc/testsuite/c-c++-common/gomp/pr84341.c
new file mode 100644
index 0000000..557f1ba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr84341.c
@@ -0,0 +1,10 @@
+/* PR c++/84341 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (int i)
+{
+ #pragma omp atomic
+ i = &i + 1; /* { dg-error "invalid form of" } */
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic11.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic11.C
new file mode 100644
index 0000000..01ef7c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic11.C
@@ -0,0 +1,21 @@
+// PR c++/84036
+// { dg-do compile { target c++14 } }
+
+template < typename... T > void sink(T ...){}
+
+template < typename T >
+auto f(T){
+ auto l = [](auto ... i){
+ [i ...]{
+ sink(i...);
+ [=]{ sink(i ...); }();
+ }();
+ };
+ l();
+ l(42);
+ l(0.1,0.2);
+}
+
+int main(){
+ f(0);
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr84263.C b/gcc/testsuite/g++.dg/parse/pr84263.C
new file mode 100644
index 0000000..e492d8c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr84263.C
@@ -0,0 +1,36 @@
+// { dg-do compile { target c++11 } }
+// { dg-additional-options "--param ggc-min-expand=0 --param ggc-min-heapsize=0" }
+// PR 84263, a GC bug exposed on i686 native compiler (and possibly
+// other 32-bit hosts). decltype parsing could create a
+// pointer that would be gc-freed by later actions.
+
+namespace std {
+template <typename a> struct b {
+ int c;
+ a d;
+};
+template <typename> class g;
+template <class> class initializer_list {
+ void *e;
+ __SIZE_TYPE__ f;
+};
+class h;
+class j {
+ typedef b<h> i;
+
+public:
+ j();
+ j(initializer_list<i>);
+};
+template <typename> struct m;
+template <int k> struct m<char[k]> {};
+class h {
+public:
+ template <typename l> h(l &);
+};
+class G {
+ G();
+ j n;
+};
+G::G() { n = decltype(n){{0, ""}, {1, ".unoLineArrowEnd"}}; }
+}
diff --git a/gcc/testsuite/g++.dg/template/crash129.C b/gcc/testsuite/g++.dg/template/crash129.C
new file mode 100644
index 0000000..9f56b80
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash129.C
@@ -0,0 +1,5 @@
+// PR c++/79626
+
+template <class a, class> struct b
+{ b(); b(b &); b(b< a, a >); }; // { dg-error "invalid constructor" }
+int c(b< int, int >(b< int, int >()); // { dg-error "" }
diff --git a/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
new file mode 100644
index 0000000..0ca0b9f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/regs-arg-size.c
@@ -0,0 +1,36 @@
+int foo;
+typedef long unsigned int size_t;
+typedef short unsigned int wchar_t;
+struct tm
+{
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+};
+size_t
+__strftime (wchar_t * s, size_t maxsize, const wchar_t * format, const struct tm *tim_p)
+{
+ size_t count = 0;
+ int len = 0;
+ size_t i, ctloclen;
+ unsigned long width;
+ {
+ if (foo)
+ {
+ {
+ wchar_t *fmt = L"%s%.*d";
+ len = swprintf (&s[count], maxsize, fmt, "-", width, 0);
+ }
+ if ((count) >= maxsize)
+ return 0;
+ }
+ else
+ {
+ len =
+ swprintf (&s[count], maxsize - count, L"%.2d/%.2d/%.2d", 42, 99, 0);
+ if ((count) >= maxsize)
+ return 0;
+
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/asan/pr84307.c b/gcc/testsuite/gcc.dg/asan/pr84307.c
new file mode 100644
index 0000000..6e1a197
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr84307.c
@@ -0,0 +1,21 @@
+/* PR middle-end/83185 */
+/* { dg-do link } */
+/* { dg-options "-O1" } */
+
+struct f {
+ void (*func)(void);
+};
+
+extern void link_error(void);
+extern int printf(const char *f, ...);
+
+static inline struct f *gimme_null(struct f *result)
+{
+ return 0;
+}
+
+int main(int argc, char **argv)
+{
+ struct f *x = gimme_null(&(struct f) { .func = link_error });
+ printf("%p", x);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
index 7f29755..b6211f9 100644
--- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
+++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c
@@ -2,7 +2,7 @@
/* { dg-skip-if "instruction not valid on thumb" { *-*-* } { "-mthumb" } { "" } } */
/* { dg-do assemble } */
/* { dg-require-effective-target arm_arm_ok } */
-/* { dg-additional-options "-Wall -O2 -march=armv5t -std=gnu99 -marm" } */
+/* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99 -marm" } */
#pragma GCC target ("arch=armv6")
int test_assembly (int hi, int lo)
diff --git a/gcc/testsuite/gcc.target/i386/avx-1.c b/gcc/testsuite/gcc.target/i386/avx-1.c
index 2cd3fd1..c877f99 100644
--- a/gcc/testsuite/gcc.target/i386/avx-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-1.c
@@ -287,8 +287,8 @@
#define __builtin_ia32_rndscaless_round(A, B, C, D) __builtin_ia32_rndscaless_round(A, B, 1, 4)
#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
-#define __builtin_ia32_scalefsd_round(A, B, C) __builtin_ia32_scalefsd_round(A, B, 8)
-#define __builtin_ia32_scalefss_round(A, B, C) __builtin_ia32_scalefss_round(A, B, 8)
+#define __builtin_ia32_scalefsd_mask_round(A, B, C, D, E) __builtin_ia32_scalefsd_mask_round(A, B, C, D, 8)
+#define __builtin_ia32_scalefss_mask_round(A, B, C, D, E) __builtin_ia32_scalefss_mask_round(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
@@ -305,8 +305,8 @@
#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
-#define __builtin_ia32_sqrtss_round(A, B, C) __builtin_ia32_sqrtss_round(A, B, 8)
-#define __builtin_ia32_sqrtsd_round(A, B, C) __builtin_ia32_sqrtsd_round(A, B, 8)
+#define __builtin_ia32_sqrtss_mask_round(A, B, C, D, E) __builtin_ia32_sqrtss_mask_round(A, B, C, D, 8)
+#define __builtin_ia32_sqrtsd_mask_round(A, B, C, D, E) __builtin_ia32_sqrtsd_mask_round(A, B, C, D, 8)
#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
#define __builtin_ia32_subsd_round(A, B, C) __builtin_ia32_subsd_round(A, B, 8)
diff --git a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntb-1.c b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntb-1.c
index 9847e2e..3dcd48f 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntb-1.c
@@ -3,11 +3,10 @@
/* { dg-require-effective-target avx512bitalg } */
/* { dg-require-effective-target avx512bw } */
-#include "avx512f-helper.h"
-
#define AVX512BITALG
#define SIZE (AVX512F_LEN / 8)
+#include "avx512f-helper.h"
#include "avx512f-mask-type.h"
#define TYPE char
diff --git a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntw-1.c b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntw-1.c
index c2d5a79..4f866db 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntw-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpopcntw-1.c
@@ -3,11 +3,10 @@
/* { dg-require-effective-target avx512bitalg } */
/* { dg-require-effective-target avx512bw } */
-#include "avx512f-helper.h"
-
#define AVX512BITALG
#define SIZE (AVX512F_LEN / 16)
+#include "avx512f-helper.h"
#include "avx512f-mask-type.h"
#define TYPE short
diff --git a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c
index 727fb13..668064a 100644
--- a/gcc/testsuite/gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512bitalg-vpshufbitqmb-1.c
@@ -2,11 +2,10 @@
/* { dg-options "-O2 -mavx512bitalg -mavx512f -mavx512bw" } */
/* { dg-require-effective-target avx512bitalg } */
-#include "avx512f-helper.h"
-
#define AVX512BITALG
#define SIZE (AVX512F_LEN / 8)
+#include "avx512f-helper.h"
#include "avx512f-mask-type.h"
#define TYPE unsigned long long
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c
index c883192..09bc5c6 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c
@@ -1,14 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
#include <immintrin.h>
volatile __m128d x;
+volatile __mmask8 m;
void extern
avx512f_test (void)
{
x = _mm_scalef_sd (x, x);
x = _mm_scalef_round_sd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm_mask_scalef_round_sd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm_maskz_scalef_round_sd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c
index 28738f7..afe73dc 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c
@@ -6,6 +6,7 @@
#include "avx512f-check.h"
#define SIZE (128 / 64)
+#include "avx512f-mask-type.h"
static void
compute_scalefsd (double *s1, double *s2, double *r)
@@ -17,20 +18,45 @@ compute_scalefsd (double *s1, double *s2, double *r)
void static
avx512f_test (void)
{
- union128d res1, s1, s2;
+ union128d res1, res2, res3, res4;
+ union128d s1, s2;
double res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
int i;
for (i = 0; i < SIZE; i++)
{
s1.a[i] = 11.5 * (i + 1);
s2.a[i] = 10.5 * (i + 1);
+ res_ref[i] = 9.5 * (i + 1);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
}
res1.x = _mm_scalef_sd (s1.x, s2.x);
+ res2.x = _mm_scalef_round_sd (s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res3.x = _mm_mask_scalef_round_sd (s1.x, mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res4.x = _mm_maskz_scalef_round_sd (mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
compute_scalefsd (s1.a, s2.a, res_ref);
if (check_union128d (res1, res_ref))
abort ();
+ if (check_union128d (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 1);
+
+ if (check_union128d (res3, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 1);
+
+ if (check_union128d (res4, res_ref))
+ abort ();
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c
index f59525f..d1af336 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c
@@ -1,14 +1,20 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
volatile __m128 x;
+volatile __mmask8 m;
void extern
avx512f_test (void)
{
x = _mm_scalef_ss (x, x);
x = _mm_scalef_round_ss (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm_mask_scalef_round_ss (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm_maskz_scalef_round_ss (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c
index 9356184..811ff15 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c
@@ -6,6 +6,7 @@
#include "avx512f-check.h"
#define SIZE (128 / 32)
+#include "avx512f-mask-type.h"
static void
compute_scalefss (float *s1, float *s2, float *r)
@@ -19,20 +20,45 @@ compute_scalefss (float *s1, float *s2, float *r)
static void
avx512f_test (void)
{
- union128 res1, s1, s2;
+ union128 res1, res2, res3, res4;
+ union128 s1, s2;
float res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
int i;
for (i = 0; i < SIZE; i++)
{
s1.a[i] = 11.5 * (i + 1);
s2.a[i] = 10.5 * (i + 1);
+ res_ref[i] = 9.5 * (i + 1);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
}
res1.x = _mm_scalef_ss (s1.x, s2.x);
+ res2.x = _mm_scalef_round_ss (s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res3.x = _mm_mask_scalef_round_ss (s1.x, mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res4.x = _mm_maskz_scalef_round_ss (mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
compute_scalefss (s1.a, s2.a, res_ref);
if (check_union128 (res1, res_ref))
abort ();
+ if (check_union128 (res2, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, 1);
+
+ if (check_union128 (res3, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, 1);
+
+ if (check_union128 (res4, res_ref))
+ abort ();
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c
index c0559c0..a7d7af9 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c
@@ -1,13 +1,18 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vsqrtsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtsd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtsd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
#include <immintrin.h>
volatile __m128d x1, x2;
+volatile __mmask8 m;
void extern
avx512f_test (void)
{
x1 = _mm_sqrt_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm_mask_sqrt_round_sd (x1, m, x1, x2, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm_maskz_sqrt_round_sd (m, x1, x2, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-2.c
new file mode 100644
index 0000000..49ca7ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+
+#define SIZE (128 / 64)
+#include "avx512f-mask-type.h"
+
+static void
+compute_sqrtsd (double *s1, double *s2, double *r)
+{
+ r[0] = sqrt(s2[0]);
+ r[1] = s1[1];
+}
+
+void static
+avx512f_test (void)
+{
+ union128d res1, res2, res3;
+ union128d s1, s2;
+ double res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 11.5 * (i + 1);
+ s2.a[i] = 10.5 * (i + 1);
+ res_ref[i] = 9.5 * (i + 1);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm_sqrt_round_sd (s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res2.x = _mm_mask_sqrt_round_sd (s1.x, mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res3.x = _mm_maskz_sqrt_round_sd (mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+
+ compute_sqrtsd (s1.a, s2.a, res_ref);
+
+ if (check_union128d (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 1);
+
+ if (check_union128d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 1);
+
+ if (check_union128d (res3, res_ref))
+ abort ();
+}
+
+
+
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c
index e43b4a1..103ff30 100644
--- a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c
@@ -1,13 +1,19 @@
/* { dg-do compile } */
/* { dg-options "-mavx512f -O2" } */
/* { dg-final { scan-assembler-times "vsqrtss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\{\n\]*%xmm\[0-9\]+(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtss\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}(?:\n|\[ \\t\]+#)" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtss\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\{\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\[^\n\]*%xmm\[0-9\]+\{%k\[1-7\]\}\{z\}(?:\n|\[ \\t\]+#)" 1 } } */
+
#include <immintrin.h>
volatile __m128 x1, x2;
+volatile __mmask8 m;
void extern
avx512f_test (void)
{
x1 = _mm_sqrt_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm_mask_sqrt_round_ss (x1, m, x1, x2, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm_maskz_sqrt_round_ss (m, x1, x2, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-2.c
new file mode 100644
index 0000000..90f88be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-2.c
@@ -0,0 +1,63 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+
+#define SIZE (128 / 32)
+#include "avx512f-mask-type.h"
+
+static void
+compute_sqrtss (float *s1, float *s2, float *r)
+{
+ r[0] = sqrt(s2[0]);
+ int i;
+ for (i = 1; i < SIZE; i++)
+ {
+ r[i] = s1[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ union128 res1, res2, res3;
+ union128 s1, s2;
+ float res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 11.5 * (i + 1);
+ s2.a[i] = 10.5 * (i + 1);
+ res_ref[i] = 9.5 * (i + 1);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm_sqrt_round_ss (s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res2.x = _mm_mask_sqrt_round_ss (s1.x, mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res3.x = _mm_maskz_sqrt_round_ss (mask, s1.x, s2.x,
+ _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+
+ compute_sqrtss (s1.a, s2.a, res_ref);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, 1);
+
+ if (check_union128 (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, 1);
+
+ if (check_union128 (res3, res_ref))
+ abort ();
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c
index 4fb949f..245dcd4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntd-1.c
@@ -2,11 +2,10 @@
/* { dg-options "-O2 -mavx512vpopcntdq" } */
/* { dg-require-effective-target avx512vpopcntdq } */
-#include "avx512f-helper.h"
-
#define AVX512VPOPCNTDQ
#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-helper.h"
#include "avx512f-mask-type.h"
#define TYPE int
diff --git a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c
index cc0d8b8..27555c4 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx512vpopcntdq-vpopcntq-1.c
@@ -2,11 +2,10 @@
/* { dg-options "-O2 -mavx512vpopcntdq" } */
/* { dg-require-effective-target avx512vpopcntdq } */
-#include "avx512f-helper.h"
-
#define AVX512VPOPCNTDQ
#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-helper.h"
#include "avx512f-mask-type.h"
#define TYPE long long
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 63c38a5..b43f903 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -304,8 +304,8 @@
#define __builtin_ia32_rndscaless_round(A, B, C, D) __builtin_ia32_rndscaless_round(A, B, 1, 4)
#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
-#define __builtin_ia32_scalefsd_round(A, B, C) __builtin_ia32_scalefsd_round(A, B, 8)
-#define __builtin_ia32_scalefss_round(A, B, C) __builtin_ia32_scalefss_round(A, B, 8)
+#define __builtin_ia32_scalefsd_mask_round(A, B, C, D, E) __builtin_ia32_scalefsd_mask_round(A, B, C, D, 8)
+#define __builtin_ia32_scalefss_mask_round(A, B, C, D, E) __builtin_ia32_scalefss_mask_round(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
@@ -322,8 +322,8 @@
#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
-#define __builtin_ia32_sqrtss_round(A, B, C) __builtin_ia32_sqrtss_round(A, B, 8)
-#define __builtin_ia32_sqrtsd_round(A, B, C) __builtin_ia32_sqrtsd_round(A, B, 8)
+#define __builtin_ia32_sqrtss_mask_round(A, B, C, D, E) __builtin_ia32_sqrtss_mask_round(A, B, C, E, 8)
+#define __builtin_ia32_sqrtsd_mask_round(A, B, C, D, E) __builtin_ia32_sqrtsd_mask_round(A, B, C, E, 8)
#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
#define __builtin_ia32_subsd_round(A, B, C) __builtin_ia32_subsd_round(A, B, 8)
diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c
index d2fe796..8f93d65 100644
--- a/gcc/testsuite/gcc.target/i386/sse-23.c
+++ b/gcc/testsuite/gcc.target/i386/sse-23.c
@@ -305,8 +305,8 @@
#define __builtin_ia32_rndscaless_round(A, B, C, D) __builtin_ia32_rndscaless_round(A, B, 1, 4)
#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
-#define __builtin_ia32_scalefsd_round(A, B, C) __builtin_ia32_scalefsd_round(A, B, 8)
-#define __builtin_ia32_scalefss_round(A, B, C) __builtin_ia32_scalefss_round(A, B, 8)
+#define __builtin_ia32_scalefsd_mask_round(A, B, C, D, E) __builtin_ia32_scalefsd_mask_round(A, B, C, D, 8)
+#define __builtin_ia32_scalefss_mask_round(A, B, C, D, E) __builtin_ia32_scalefss_mask_round(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
@@ -323,8 +323,8 @@
#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
-#define __builtin_ia32_sqrtss_round(A, B, C) __builtin_ia32_sqrtss_round(A, B, 8)
-#define __builtin_ia32_sqrtsd_round(A, B, C) __builtin_ia32_sqrtsd_round(A, B, 8)
+#define __builtin_ia32_sqrtss_mask_round(A, B, C, D, E) __builtin_ia32_sqrtss_mask_round(A, B, C, D, 8)
+#define __builtin_ia32_sqrtsd_mask_round(A, B, C, D, E) __builtin_ia32_sqrtsd_mask_round(A, B, C, D, 8)
#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
#define __builtin_ia32_subsd_round(A, B, C) __builtin_ia32_subsd_round(A, B, 8)
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-4-int128-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-4-int128-runnable.c
new file mode 100644
index 0000000..162e267
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-4-int128-runnable.c
@@ -0,0 +1,109 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-require-effective-target vsx_hw } */
+/* { dg-options "-maltivec -mvsx" } */
+
+#include <inttypes.h>
+#include <altivec.h> // vector
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+void abort (void);
+
+int main() {
+ int i;
+ __uint128_t data_u128[100];
+ __int128_t data_128[100];
+
+ vector __int128_t vec_128_expected1, vec_128_result1;
+ vector __uint128_t vec_u128_expected1, vec_u128_result1;
+ signed long long zero = (signed long long) 0;
+
+ for (i = 0; i < 100; i++)
+ {
+ data_128[i] = i + 12800000;
+ data_u128[i] = i + 12800001;
+ }
+
+ /* vec_xl() tests */
+
+ vec_128_expected1 = (vector __int128_t){12800000};
+ vec_128_result1 = vec_xl (zero, data_128);
+
+ if (vec_128_expected1[0] != vec_128_result1[0])
+ {
+#ifdef DEBUG
+ printf("Error: vec_xl(), vec_128_result1[0] = %lld %llu; ",
+ vec_128_result1[0] >> 64,
+ vec_128_result1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
+ printf("vec_128_expected1[0] = %lld %llu\n",
+ vec_128_expected1[0] >> 64,
+ vec_128_expected1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
+#else
+ abort ();
+#endif
+ }
+
+ vec_u128_result1 = vec_xl (zero, data_u128);
+ vec_u128_expected1 = (vector __uint128_t){12800001};
+ if (vec_u128_expected1[0] != vec_u128_result1[0])
+ {
+#ifdef DEBUG
+ printf("Error: vec_xl(), vec_u128_result1[0] = %lld; ",
+ vec_u128_result1[0] >> 64,
+ vec_u128_result1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
+ printf("vec_u128_expected1[0] = %lld\n",
+ vec_u128_expected1[0] >> 64,
+ vec_u128_expected1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
+#else
+ abort ();
+#endif
+ }
+
+ /* vec_xl_be() tests */
+
+ vec_128_result1 = vec_xl_be (zero, data_128);
+#ifdef __BIG_ENDIAN__
+ vec_128_expected1 = (vector __int128_t){ (__int128_t)12800000 };
+#else
+ vec_128_expected1 = (vector __int128_t){ (__int128_t)12800000 };
+#endif
+
+ if (vec_128_expected1[0] != vec_128_result1[0])
+ {
+#ifdef DEBUG
+ printf("Error: vec_xl_be(), vec_128_result1[0] = %llu %llu;",
+ vec_128_result1[0] >> 64,
+ vec_128_result1[0] & 0xFFFFFFFFFFFFFFFF);
+ printf(" vec_128_expected1[0] = %llu %llu\n",
+ vec_128_expected1[0] >> 64,
+ vec_128_expected1[0] & 0xFFFFFFFFFFFFFFFF);
+#else
+ abort ();
+#endif
+ }
+
+#ifdef __BIG_ENDIAN__
+ vec_u128_expected1 = (vector __uint128_t){ (__uint128_t)12800001 };
+#else
+ vec_u128_expected1 = (vector __uint128_t){ (__uint128_t)12800001 };
+#endif
+
+ vec_u128_result1 = vec_xl_be (zero, data_u128);
+
+ if (vec_u128_expected1[0] != vec_u128_result1[0])
+ {
+#ifdef DEBUG
+ printf("Error: vec_xl_be(), vec_u128_result1[0] = %llu %llu;",
+ vec_u128_result1[0] >> 64,
+ vec_u128_result1[0] & 0xFFFFFFFFFFFFFFFF);
+ printf(" vec_u128_expected1[0] = %llu %llu\n",
+ vec_u128_expected1[0] >> 64,
+ vec_u128_expected1[0] & 0xFFFFFFFFFFFFFFFF);
+#else
+ abort ();
+#endif
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c b/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c
index de9b916..35884b5 100644
--- a/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c
+++ b/gcc/testsuite/gcc.target/powerpc/builtins-4-runnable.c
@@ -27,9 +27,6 @@ int main() {
float data_f[100];
double data_d[100];
- __uint128_t data_u128[100];
- __int128_t data_128[100];
-
signed long long disp;
vector signed char vec_c_expected1, vec_c_expected2, vec_c_result1, vec_c_result2;
@@ -47,8 +44,6 @@ int main() {
vec_sll_result1, vec_sll_result2;
vector unsigned long long vec_ull_expected1, vec_ull_expected2,
vec_ull_result1, vec_ull_result2;
- vector __int128_t vec_128_expected1, vec_128_result1;
- vector __uint128_t vec_u128_expected1, vec_u128_result1;
vector float vec_f_expected1, vec_f_expected2, vec_f_result1, vec_f_result2;
vector double vec_d_expected1, vec_d_expected2, vec_d_result1, vec_d_result2;
char buf[20];
@@ -66,8 +61,6 @@ int main() {
data_ull[i] = i+1001;
data_f[i] = i+100000.0;
data_d[i] = i+1000000.0;
- data_128[i] = i + 12800000;
- data_u128[i] = i + 12800001;
}
// vec_xl() tests
@@ -319,39 +312,6 @@ int main() {
#endif
}
- vec_128_expected1 = (vector __int128_t){12800000};
- vec_128_result1 = vec_xl (zero, data_128);
-
- if (vec_128_expected1[0] != vec_128_result1[0])
- {
-#ifdef DEBUG
- printf("Error: vec_xl(), vec_128_result1[0] = %lld %llu; ",
- vec_128_result1[0] >> 64,
- vec_128_result1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
- printf("vec_128_expected1[0] = %lld %llu\n",
- vec_128_expected1[0] >> 64,
- vec_128_expected1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
-#else
- abort ();
-#endif
- }
-
- vec_u128_result1 = vec_xl (zero, data_u128);
- vec_u128_expected1 = (vector __uint128_t){12800001};
- if (vec_u128_expected1[0] != vec_u128_result1[0])
- {
-#ifdef DEBUG
- printf("Error: vec_xl(), vec_u128_result1[0] = %lld; ",
- vec_u128_result1[0] >> 64,
- vec_u128_result1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
- printf("vec_u128_expected1[0] = %lld\n",
- vec_u128_expected1[0] >> 64,
- vec_u128_expected1[0] & (__int128_t)0xFFFFFFFFFFFFFFFF);
-#else
- abort ();
-#endif
- }
-
// vec_xl_be() tests
disp = 1;
#ifdef __BIG_ENDIAN__
@@ -710,48 +670,4 @@ int main() {
abort ();
#endif
}
-
- disp = 0;
- vec_128_result1 = vec_xl_be (zero, data_128);
-#ifdef __BIG_ENDIAN__
- vec_128_expected1 = (vector __int128_t){ (__int128_t)12800000 };
-#else
- vec_128_expected1 = (vector __int128_t){ (__int128_t)12800000 };
-#endif
-
- if (vec_128_expected1[0] != vec_128_result1[0])
- {
-#ifdef DEBUG
- printf("Error: vec_xl_be(), vec_128_result1[0] = %llu %llu;",
- vec_128_result1[0] >> 64,
- vec_128_result1[0] & 0xFFFFFFFFFFFFFFFF);
- printf(" vec_128_expected1[0] = %llu %llu\n",
- vec_128_expected1[0] >> 64,
- vec_128_expected1[0] & 0xFFFFFFFFFFFFFFFF);
-#else
- abort ();
-#endif
- }
-
-#ifdef __BIG_ENDIAN__
- vec_u128_expected1 = (vector __uint128_t){ (__uint128_t)12800001 };
-#else
- vec_u128_expected1 = (vector __uint128_t){ (__uint128_t)12800001 };
-#endif
-
- vec_u128_result1 = vec_xl_be (zero, data_u128);
-
- if (vec_u128_expected1[0] != vec_u128_result1[0])
- {
-#ifdef DEBUG
- printf("Error: vec_xl_be(), vec_u128_result1[0] = %llu %llu;",
- vec_u128_result1[0] >> 64,
- vec_u128_result1[0] & 0xFFFFFFFFFFFFFFFF);
- printf(" vec_u128_expected1[0] = %llu %llu\n",
- vec_u128_expected1[0] >> 64,
- vec_u128_expected1[0] & 0xFFFFFFFFFFFFFFFF);
-#else
- abort ();
-#endif
- }
}
diff --git a/gcc/testsuite/gcc.target/powerpc/powerpc.exp b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
index 148acb1..fdb3e93 100644
--- a/gcc/testsuite/gcc.target/powerpc/powerpc.exp
+++ b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
@@ -54,6 +54,7 @@ torture-init
# Test load/store builtins at multiple optimizations
set-torture-options [list -O0 -Os -O1 -O2 -O3]
gcc-dg-runtest [list $srcdir/$subdir/builtins-4-runnable.c \
+ $srcdir/$subdir/builtins-4-int128-runnable.c \
$srcdir/$subdir/builtins-6-runnable.c \
$srcdir/$subdir/builtins-5-p9-runnable.c \
$srcdir/$subdir/builtins-6-p9-runnable.c] "" $DEFAULT_CFLAGS
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_47.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_47.f90
index 43084f6..80a78f3 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_47.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_47.f90
@@ -21,13 +21,9 @@
contains
function foo(A)
- class(AA), allocatable :: A
+ class(AA) :: A
type(AA) foo
- if (.not.allocated (A)) then
- allocate (A, source = AA (2, foo))
- endif
-
select type (A)
type is (AA)
foo = AA (3, foo)
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
index b0e7a77..1632e27 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
@@ -37,22 +37,23 @@ module m
type :: t8
procedure(foo8), pass, pointer :: f8 ! { dg-error "must be of the derived type" }
+ procedure(foo9), pass, pointer :: f9 ! { dg-error "Non-polymorphic passed-object dummy argument" }
end type
contains
subroutine foo1 (x1,y1)
- type(t1) :: x1(:)
+ class(t1) :: x1(:)
type(t1) :: y1
end subroutine
subroutine foo2 (x2,y2)
- type(t2),pointer :: x2
+ class(t2),pointer :: x2
type(t2) :: y2
end subroutine
subroutine foo3 (x3,y3)
- type(t3),allocatable :: x3
+ class(t3),allocatable :: x3
type(t3) :: y3
end subroutine
@@ -69,4 +70,8 @@ contains
integer :: i
end function
+ subroutine foo9(x)
+ type(t8) :: x
+ end subroutine
+
end module m
diff --git a/gcc/testsuite/gfortran.dg/read_dir.f90 b/gcc/testsuite/gfortran.dg/read_dir.f90
index 9df0142..4e713e7 100644
--- a/gcc/testsuite/gfortran.dg/read_dir.f90
+++ b/gcc/testsuite/gfortran.dg/read_dir.f90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-*-freebsd* *-*-dragonfly* hppa*-*-hpux* powerpc-ibm-aix* } }
+! { dg-do run }
! PR67367
program bug
implicit none
@@ -12,7 +12,7 @@ program bug
call abort
end if
read(10, iostat=ios) c
- if (ios.ne.21) then
+ if (ios.ne.21.and.ios.ne.0) then
close(10, status='delete')
call abort
end if
diff --git a/gcc/testsuite/gfortran.dg/statement_function_1.f90 b/gcc/testsuite/gfortran.dg/statement_function_1.f90
new file mode 100644
index 0000000..f26f25c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/statement_function_1.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! PR fortran/84276
+ subroutine stepns(hh, h, s, w)
+ real, intent(inout) :: h, hh, s
+ real, intent(out) :: w
+ real :: qofs
+ integer i
+ qofs(s) = s
+ w = qofs(hh + h)
+ i = 42
+ w = qofs(i) ! { dg-error "Type mismatch in argument" }
+ end subroutine stepns
+
+ subroutine step(hh, h, s, w)
+ real, intent(inout) :: h, hh, s
+ real, intent(out) :: w
+ real :: qofs
+ integer i
+ qofs(s, i) = i * s
+ i = 42
+ w = qofs(hh, i)
+!
+! The following line should cause an error, because keywords are not
+! allowed in a function with an implicit interface.
+!
+ w = qofs(i = i, s = hh)
+ end subroutine step
+! { dg-prune-output " Obsolescent feature" }
diff --git a/gcc/testsuite/gfortran.dg/statement_function_2.f90 b/gcc/testsuite/gfortran.dg/statement_function_2.f90
new file mode 100644
index 0000000..703ca171
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/statement_function_2.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! PR fortran/54223
+subroutine r(d)
+ implicit none
+ integer, optional :: d
+ integer :: h, q
+ q(d) = d + 1 ! statement function statement
+ h = q(d)
+end subroutine r
+
+subroutine s(x)
+ implicit none
+ integer, optional :: x
+ integer :: g, z
+ g(x) = x + 1 ! statement function statement
+ z = g() ! { dg-error "Missing actual argument" }
+end subroutine s
+
+subroutine t(a)
+ implicit none
+ integer :: a
+ integer :: f, y
+ f(a) = a + 1 ! statement function statement
+ y = f() ! { dg-error "Missing actual argument" }
+end subroutine t
+! { dg-prune-output " Obsolescent feature" }
diff --git a/gcc/testsuite/gfortran.dg/statement_function_3.f b/gcc/testsuite/gfortran.dg/statement_function_3.f
new file mode 100644
index 0000000..dcfb3e2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/statement_function_3.f
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! PR fortran/35299
+ subroutine phtod(e,n,i,h)
+ dimension e(n)
+ hstar(e,b)=b**.4*((1.25*fun(-e/40)+.18)) ! { dg-error "must be scalar" }
+ a = 1.
+ h = hstar(e(i-1), a)
+ end
+
+ function fun(a)
+ real a(*)
+ fun = 42
+ end
+! { dg-prune-output " Obsolescent feature" }
+
diff --git a/gcc/testsuite/gfortran.dg/type_to_class_5.f03 b/gcc/testsuite/gfortran.dg/type_to_class_5.f03
new file mode 100644
index 0000000..29a4b40
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/type_to_class_5.f03
@@ -0,0 +1,29 @@
+! { dg-do run }
+!
+! Test the fix for PR84074
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+!
+ type :: t
+ integer :: n
+ end type
+
+ type(t) :: array(4) = [t(1),t(2),t(3),t(4)]
+
+ call sub(array((/3,1/)), [3,1,0,0]) ! Does not increment any elements of 'array'.
+ call sub(array(1:3:2), [1,3,0,0])
+ call sub(array(3:1:-2), [4,2,0,0])
+ call sub(array, [3,2,5,4]) ! Elements 1 and 3 should have been incremented twice.
+
+contains
+
+ subroutine sub(a, iarray)
+ class(t) :: a(:)
+ integer :: iarray(4)
+ integer :: i
+ do i=1,size(a)
+ if (a(i)%n .ne. iarray(i)) call abort
+ a(i)%n = a(i)%n+1
+ enddo
+ end subroutine
+end program
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index c9f0fea..73aa227 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -1308,37 +1308,65 @@ vect_build_slp_tree_2 (vec_info *vinfo,
&& nops == 2
&& oprnds_info[1]->first_dt == vect_internal_def
&& is_gimple_assign (stmt)
- && commutative_tree_code (gimple_assign_rhs_code (stmt))
- && ! two_operators
/* Do so only if the number of not successful permutes was nor more
than a cut-ff as re-trying the recursive match on
possibly each level of the tree would expose exponential
behavior. */
&& *npermutes < 4)
{
- /* Verify if we can safely swap or if we committed to a specific
- operand order already. */
- for (j = 0; j < group_size; ++j)
- if (!matches[j]
- && (swap[j] != 0
- || STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmts[j]))))
- {
- if (dump_enabled_p ())
- {
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "Build SLP failed: cannot swap operands "
- "of shared stmt ");
- dump_gimple_stmt (MSG_MISSED_OPTIMIZATION, TDF_SLIM,
- stmts[j], 0);
- }
- goto fail;
- }
+ /* See whether we can swap the matching or the non-matching
+ stmt operands. */
+ bool swap_not_matching = true;
+ do
+ {
+ for (j = 0; j < group_size; ++j)
+ {
+ if (matches[j] != !swap_not_matching)
+ continue;
+ gimple *stmt = stmts[j];
+ /* Verify if we can swap operands of this stmt. */
+ if (!is_gimple_assign (stmt)
+ || !commutative_tree_code (gimple_assign_rhs_code (stmt)))
+ {
+ if (!swap_not_matching)
+ goto fail;
+ swap_not_matching = false;
+ break;
+ }
+ /* Verify if we can safely swap or if we committed to a
+ specific operand order already.
+ ??? Instead of modifying GIMPLE stmts here we could
+ record whether we want to swap operands in the SLP
+ node and temporarily do that when processing it
+ (or wrap operand accessors in a helper). */
+ else if (swap[j] != 0
+ || STMT_VINFO_NUM_SLP_USES (vinfo_for_stmt (stmt)))
+ {
+ if (!swap_not_matching)
+ {
+ if (dump_enabled_p ())
+ {
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION,
+ vect_location,
+ "Build SLP failed: cannot swap "
+ "operands of shared stmt ");
+ dump_gimple_stmt (MSG_MISSED_OPTIMIZATION,
+ TDF_SLIM, stmts[j], 0);
+ }
+ goto fail;
+ }
+ swap_not_matching = false;
+ break;
+ }
+ }
+ }
+ while (j != group_size);
/* Swap mismatched definition stmts. */
dump_printf_loc (MSG_NOTE, vect_location,
"Re-trying with swapped operands of stmts ");
for (j = 0; j < group_size; ++j)
- if (!matches[j])
+ if (matches[j] == !swap_not_matching)
{
std::swap (oprnds_info[0]->def_stmts[j],
oprnds_info[1]->def_stmts[j]);
@@ -1367,7 +1395,7 @@ vect_build_slp_tree_2 (vec_info *vinfo,
for (j = 0; j < group_size; ++j)
{
gimple *stmt = stmts[j];
- if (!matches[j])
+ if (matches[j] == !swap_not_matching)
{
/* Avoid swapping operands twice. */
if (gimple_plf (stmt, GF_PLF_1))
@@ -1382,7 +1410,8 @@ vect_build_slp_tree_2 (vec_info *vinfo,
for (j = 0; j < group_size; ++j)
{
gimple *stmt = stmts[j];
- gcc_assert (gimple_plf (stmt, GF_PLF_1) == ! matches[j]);
+ gcc_assert (gimple_plf (stmt, GF_PLF_1)
+ == (matches[j] == !swap_not_matching));
}
/* If we have all children of child built up from scalars then
@@ -1974,17 +2003,13 @@ vect_analyze_slp_cost_1 (slp_instance instance, slp_tree node,
/* Compute the cost for the SLP instance INSTANCE. */
static void
-vect_analyze_slp_cost (slp_instance instance, void *data)
+vect_analyze_slp_cost (slp_instance instance, void *data, scalar_stmts_set_t *visited)
{
stmt_vector_for_cost body_cost_vec, prologue_cost_vec;
unsigned ncopies_for_cost;
stmt_info_for_cost *si;
unsigned i;
- if (dump_enabled_p ())
- dump_printf_loc (MSG_NOTE, vect_location,
- "=== vect_analyze_slp_cost ===\n");
-
/* Calculate the number of vector stmts to create based on the unrolling
factor (number of vectors is 1 if NUNITS >= GROUP_SIZE, and is
GROUP_SIZE / NUNITS otherwise. */
@@ -2021,11 +2046,9 @@ vect_analyze_slp_cost (slp_instance instance, void *data)
prologue_cost_vec.create (10);
body_cost_vec.create (10);
- scalar_stmts_set_t *visited = new scalar_stmts_set_t ();
vect_analyze_slp_cost_1 (instance, SLP_INSTANCE_TREE (instance),
&prologue_cost_vec, &body_cost_vec,
ncopies_for_cost, visited);
- delete visited;
/* Record the prologue costs, which were delayed until we were
sure that SLP was successful. */
@@ -2842,13 +2865,19 @@ vect_slp_analyze_operations (vec_info *vinfo)
vinfo->slp_instances.ordered_remove (i);
}
else
- {
- /* Compute the costs of the SLP instance. */
- vect_analyze_slp_cost (instance, vinfo->target_cost_data);
- i++;
- }
+ i++;
}
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_NOTE, vect_location,
+ "=== vect_analyze_slp_cost ===\n");
+
+ /* Compute the costs of the SLP instances. */
+ scalar_stmts_set_t *visited = new scalar_stmts_set_t ();
+ for (i = 0; vinfo->slp_instances.iterate (i, &instance); ++i)
+ vect_analyze_slp_cost (instance, vinfo->target_cost_data, visited);
+ delete visited;
+
return !vinfo->slp_instances.is_empty ();
}
@@ -4217,19 +4246,20 @@ vect_schedule_slp (vec_info *vinfo)
unsigned int i;
bool is_store = false;
+
+ scalar_stmts_to_slp_tree_map_t *bst_map
+ = new scalar_stmts_to_slp_tree_map_t ();
slp_instances = vinfo->slp_instances;
FOR_EACH_VEC_ELT (slp_instances, i, instance)
{
/* Schedule the tree of INSTANCE. */
- scalar_stmts_to_slp_tree_map_t *bst_map
- = new scalar_stmts_to_slp_tree_map_t ();
is_store = vect_schedule_slp_instance (SLP_INSTANCE_TREE (instance),
instance, bst_map);
- delete bst_map;
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"vectorizing stmts using SLP.\n");
}
+ delete bst_map;
FOR_EACH_VEC_ELT (slp_instances, i, instance)
{
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 6066a52..a98e0e5 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -826,8 +826,7 @@ vect_model_simple_cost (stmt_vec_info stmt_info, int ncopies,
int inside_cost = 0, prologue_cost = 0;
/* The SLP costs were already calculated during SLP tree build. */
- if (PURE_SLP_STMT (stmt_info))
- return;
+ gcc_assert (!PURE_SLP_STMT (stmt_info));
/* Cost the "broadcast" of a scalar operand in to a vector operand.
Use scalar_to_vec to cost the broadcast, as elsewhere in the vector
@@ -864,8 +863,7 @@ vect_model_promotion_demotion_cost (stmt_vec_info stmt_info,
void *target_cost_data;
/* The SLP costs were already calculated during SLP tree build. */
- if (PURE_SLP_STMT (stmt_info))
- return;
+ gcc_assert (!PURE_SLP_STMT (stmt_info));
if (loop_vinfo)
target_cost_data = LOOP_VINFO_TARGET_COST_DATA (loop_vinfo);
@@ -2891,7 +2889,7 @@ vectorizable_bswap (gimple *stmt, gimple_stmt_iterator *gsi,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location, "=== vectorizable_bswap ==="
"\n");
- if (! PURE_SLP_STMT (stmt_info))
+ if (! slp_node)
{
add_stmt_cost (stmt_info->vinfo->target_cost_data,
1, vector_stmt, stmt_info, 0, vect_prologue);
@@ -3210,10 +3208,13 @@ vectorizable_call (gimple *gs, gimple_stmt_iterator *gsi, gimple **vec_stmt,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location, "=== vectorizable_call ==="
"\n");
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
- if (ifn != IFN_LAST && modifier == NARROW && !slp_node)
- add_stmt_cost (stmt_info->vinfo->target_cost_data, ncopies / 2,
- vec_promote_demote, stmt_info, 0, vect_body);
+ if (!slp_node)
+ {
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
+ if (ifn != IFN_LAST && modifier == NARROW && !slp_node)
+ add_stmt_cost (stmt_info->vinfo->target_cost_data, ncopies / 2,
+ vec_promote_demote, stmt_info, 0, vect_body);
+ }
return true;
}
@@ -4742,17 +4743,20 @@ vectorizable_conversion (gimple *stmt, gimple_stmt_iterator *gsi,
if (code == FIX_TRUNC_EXPR || code == FLOAT_EXPR)
{
STMT_VINFO_TYPE (stmt_info) = type_conversion_vec_info_type;
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
}
else if (modifier == NARROW)
{
STMT_VINFO_TYPE (stmt_info) = type_demotion_vec_info_type;
- vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
+ if (!slp_node)
+ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
}
else
{
STMT_VINFO_TYPE (stmt_info) = type_promotion_vec_info_type;
- vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
+ if (!slp_node)
+ vect_model_promotion_demotion_cost (stmt_info, dt, multi_step_cvt);
}
interm_types.release ();
return true;
@@ -5149,7 +5153,8 @@ vectorizable_assignment (gimple *stmt, gimple_stmt_iterator *gsi,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"=== vectorizable_assignment ===\n");
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
return true;
}
@@ -5513,7 +5518,8 @@ vectorizable_shift (gimple *stmt, gimple_stmt_iterator *gsi,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"=== vectorizable_shift ===\n");
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
return true;
}
@@ -5836,7 +5842,8 @@ vectorizable_operation (gimple *stmt, gimple_stmt_iterator *gsi,
if (dump_enabled_p ())
dump_printf_loc (MSG_NOTE, vect_location,
"=== vectorizable_operation ===\n");
- vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies, dt, ndts, NULL, NULL);
return true;
}
@@ -6240,7 +6247,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
STMT_VINFO_TYPE (stmt_info) = store_vec_info_type;
/* The SLP costs are calculated during SLP analysis. */
- if (!PURE_SLP_STMT (stmt_info))
+ if (!slp_node)
vect_model_store_cost (stmt_info, ncopies, memory_access_type,
vls_type, NULL, NULL, NULL);
return true;
@@ -7451,7 +7458,7 @@ vectorizable_load (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt,
STMT_VINFO_TYPE (stmt_info) = load_vec_info_type;
/* The SLP costs are calculated during SLP analysis. */
- if (!PURE_SLP_STMT (stmt_info))
+ if (! slp_node)
vect_model_load_cost (stmt_info, ncopies, memory_access_type,
NULL, NULL, NULL);
return true;
@@ -8673,7 +8680,8 @@ vectorizable_condition (gimple *stmt, gimple_stmt_iterator *gsi,
if (expand_vec_cond_expr_p (vectype, comp_vectype,
cond_code))
{
- vect_model_simple_cost (stmt_info, ncopies, dts, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies, dts, ndts, NULL, NULL);
return true;
}
return false;
@@ -9037,8 +9045,9 @@ vectorizable_comparison (gimple *stmt, gimple_stmt_iterator *gsi,
if (!vec_stmt)
{
STMT_VINFO_TYPE (stmt_info) = comparison_vec_info_type;
- vect_model_simple_cost (stmt_info, ncopies * (1 + (bitop2 != NOP_EXPR)),
- dts, ndts, NULL, NULL);
+ if (!slp_node)
+ vect_model_simple_cost (stmt_info, ncopies * (1 + (bitop2 != NOP_EXPR)),
+ dts, ndts, NULL, NULL);
if (bitop1 == NOP_EXPR)
return expand_vec_cmp_expr_p (vectype, mask_type, code);
else
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 77ae9f7..2220ec2 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,34 @@
+2018-02-12 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * libgfortran.h (GFC_ARRAY_DESCRIPTOR): Remove dimension
+ of descriptor to use vaiable members for dim.
+ Change usage of GFC_ARRAY_DESCRIPTOR accordingly.
+ (GFC_FILL_ARRAY_DESCRIPTOR): New macro.
+ (gfc_full_array_i4): New type.
+ * intrinsics/date_and_time.c (secnds): Use sizeof
+ (gfc_array_i4) + sizeof (descriptor_dimension) for memory
+ allocation.
+ * intrinsics/reshape_generic.c: Use GFC_FULL_ARRAY_DESCRIPTOR.
+ * io/format.c: Use sizeof (gfc_array_i4) + sizeof
+ (descriptor_dimension) for memoy allocation.
+ * io/list_read.c (list_formatted_read_scalar): Use
+ gfc_full_array_i4 for variable.
+ (nml_read_obj): Likewise.
+ * io/write.c (list_formatted_write_scalar): Likewise.
+ (nml_write_obj): Likewise.
+ * m4/reshape.m4: Use GFC_FULL_ARRAY_DESCRIPTOR.
+ * generated/reshape_c10.c: Regenerated.
+ * generated/reshape_c16.c: Regenerated.
+ * generated/reshape_c4.c: Regenerated.
+ * generated/reshape_c8.c: Regenerated.
+ * generated/reshape_i16.c: Regenerated.
+ * generated/reshape_i4.c: Regenerated.
+ * generated/reshape_i8.c: Regenerated.
+ * generated/reshape_r10.c: Regenerated.
+ * generated/reshape_r16.c: Regenerated.
+ * generated/reshape_r4.c: Regenerated.
+ * generated/reshape_r8.c: Regenerated.
+
2018-01-31 Janne Blomqvist <jb@gcc.gnu.org>
* generated/cshift1_16.c (cshift1): Regenerated.
diff --git a/libgfortran/generated/reshape_c10.c b/libgfortran/generated/reshape_c10.c
index dbea98d..a607755 100644
--- a/libgfortran/generated/reshape_c10.c
+++ b/libgfortran/generated/reshape_c10.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_COMPLEX_10)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_c10 (gfc_array_c10 * const restrict,
diff --git a/libgfortran/generated/reshape_c16.c b/libgfortran/generated/reshape_c16.c
index 4cf875f..daecd1e 100644
--- a/libgfortran/generated/reshape_c16.c
+++ b/libgfortran/generated/reshape_c16.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_COMPLEX_16)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_c16 (gfc_array_c16 * const restrict,
diff --git a/libgfortran/generated/reshape_c4.c b/libgfortran/generated/reshape_c4.c
index da718ad..c2f89e9 100644
--- a/libgfortran/generated/reshape_c4.c
+++ b/libgfortran/generated/reshape_c4.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_COMPLEX_4)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_c4 (gfc_array_c4 * const restrict,
diff --git a/libgfortran/generated/reshape_c8.c b/libgfortran/generated/reshape_c8.c
index 9fa7aca..2b2a0b8 100644
--- a/libgfortran/generated/reshape_c8.c
+++ b/libgfortran/generated/reshape_c8.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_COMPLEX_8)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_c8 (gfc_array_c8 * const restrict,
diff --git a/libgfortran/generated/reshape_i16.c b/libgfortran/generated/reshape_i16.c
index 8d3e218..620d74b 100644
--- a/libgfortran/generated/reshape_i16.c
+++ b/libgfortran/generated/reshape_i16.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_INTEGER_16)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_16 (gfc_array_i16 * const restrict,
diff --git a/libgfortran/generated/reshape_i4.c b/libgfortran/generated/reshape_i4.c
index d534852..fb616e6 100644
--- a/libgfortran/generated/reshape_i4.c
+++ b/libgfortran/generated/reshape_i4.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_INTEGER_4)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_4 (gfc_array_i4 * const restrict,
diff --git a/libgfortran/generated/reshape_i8.c b/libgfortran/generated/reshape_i8.c
index 205d45e..abe4663 100644
--- a/libgfortran/generated/reshape_i8.c
+++ b/libgfortran/generated/reshape_i8.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_INTEGER_8)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_8 (gfc_array_i8 * const restrict,
diff --git a/libgfortran/generated/reshape_r10.c b/libgfortran/generated/reshape_r10.c
index 15e68f1..e2f6cb6 100644
--- a/libgfortran/generated/reshape_r10.c
+++ b/libgfortran/generated/reshape_r10.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_REAL_10)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_r10 (gfc_array_r10 * const restrict,
diff --git a/libgfortran/generated/reshape_r16.c b/libgfortran/generated/reshape_r16.c
index 4e17d31..0a24a75 100644
--- a/libgfortran/generated/reshape_r16.c
+++ b/libgfortran/generated/reshape_r16.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_REAL_16)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_r16 (gfc_array_r16 * const restrict,
diff --git a/libgfortran/generated/reshape_r4.c b/libgfortran/generated/reshape_r4.c
index 7f419b1..db8d76a 100644
--- a/libgfortran/generated/reshape_r4.c
+++ b/libgfortran/generated/reshape_r4.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_REAL_4)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_r4 (gfc_array_r4 * const restrict,
diff --git a/libgfortran/generated/reshape_r8.c b/libgfortran/generated/reshape_r8.c
index 0315b0b..06fc72f 100644
--- a/libgfortran/generated/reshape_r8.c
+++ b/libgfortran/generated/reshape_r8.c
@@ -28,7 +28,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#if defined (HAVE_GFC_REAL_8)
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
extern void reshape_r8 (gfc_array_r8 * const restrict,
diff --git a/libgfortran/intrinsics/date_and_time.c b/libgfortran/intrinsics/date_and_time.c
index a493b44..78a7cd0 100644
--- a/libgfortran/intrinsics/date_and_time.c
+++ b/libgfortran/intrinsics/date_and_time.c
@@ -267,8 +267,10 @@ secnds (GFC_REAL_4 *x)
GFC_INTEGER_4 values[VALUES_SIZE];
GFC_REAL_4 temp1, temp2;
- /* Make the INTEGER*4 array for passing to date_and_time. */
- gfc_array_i4 *avalues = xmalloc (sizeof (gfc_array_i4));
+ /* Make the INTEGER*4 array for passing to date_and_time, with enough space
+ for a rank-one array. */
+ gfc_array_i4 *avalues = xmalloc (sizeof (gfc_array_i4)
+ + sizeof (descriptor_dimension));
avalues->base_addr = &values[0];
GFC_DESCRIPTOR_DTYPE (avalues).type = BT_REAL;
GFC_DESCRIPTOR_DTYPE (avalues).elem_len = 4;
diff --git a/libgfortran/intrinsics/reshape_generic.c b/libgfortran/intrinsics/reshape_generic.c
index 94e45f5..276c69c 100644
--- a/libgfortran/intrinsics/reshape_generic.c
+++ b/libgfortran/intrinsics/reshape_generic.c
@@ -26,8 +26,8 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
#include "libgfortran.h"
#include <string.h>
-typedef GFC_ARRAY_DESCRIPTOR(1, index_type) shape_type;
-typedef GFC_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, index_type) shape_type;
+typedef GFC_FULL_ARRAY_DESCRIPTOR(GFC_MAX_DIMENSIONS, char) parray;
static void
reshape_internal (parray *ret, parray *source, shape_type *shape,
diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c
index b718faa..b4920aa 100644
--- a/libgfortran/io/format.c
+++ b/libgfortran/io/format.c
@@ -1024,8 +1024,9 @@ parse_format_list (st_parameter_dt *dtp, bool *seen_dd)
t = format_lex (fmt);
- /* Initialize the vlist to a zero size array. */
- tail->u.udf.vlist= xmalloc (sizeof(gfc_array_i4));
+ /* Initialize the vlist to a zero size, rank-one array. */
+ tail->u.udf.vlist= xmalloc (sizeof(gfc_array_i4)
+ + sizeof (descriptor_dimension));
GFC_DESCRIPTOR_DATA(tail->u.udf.vlist) = NULL;
GFC_DIMENSION_SET(tail->u.udf.vlist->dim[0],1, 0, 0);
diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c
index fbd7dc2..d052d1f 100644
--- a/libgfortran/io/list_read.c
+++ b/libgfortran/io/list_read.c
@@ -2198,7 +2198,7 @@ list_formatted_read_scalar (st_parameter_dt *dtp, bt type, void *p,
gfc_charlen_type child_iomsg_len;
int noiostat;
int *child_iostat = NULL;
- gfc_array_i4 vlist;
+ gfc_full_array_i4 vlist;
GFC_DESCRIPTOR_DATA(&vlist) = NULL;
GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0);
@@ -2996,7 +2996,7 @@ nml_read_obj (st_parameter_dt *dtp, namelist_info *nl, index_type offset,
gfc_charlen_type child_iomsg_len;
int noiostat;
int *child_iostat = NULL;
- gfc_array_i4 vlist;
+ gfc_full_array_i4 vlist;
formatted_dtio dtio_ptr = (formatted_dtio)nl->dtio_sub;
GFC_DESCRIPTOR_DATA(&vlist) = NULL;
diff --git a/libgfortran/io/write.c b/libgfortran/io/write.c
index 28ea852..50ea133 100644
--- a/libgfortran/io/write.c
+++ b/libgfortran/io/write.c
@@ -1886,7 +1886,7 @@ list_formatted_write_scalar (st_parameter_dt *dtp, bt type, void *p, int kind,
gfc_charlen_type child_iomsg_len;
int noiostat;
int *child_iostat = NULL;
- gfc_array_i4 vlist;
+ gfc_full_array_i4 vlist;
GFC_DESCRIPTOR_DATA(&vlist) = NULL;
GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0);
@@ -2211,7 +2211,7 @@ nml_write_obj (st_parameter_dt *dtp, namelist_info *obj, index_type offset,
gfc_charlen_type child_iomsg_len;
int noiostat;
int *child_iostat = NULL;
- gfc_array_i4 vlist;
+ gfc_full_array_i4 vlist;
formatted_dtio dtio_ptr = (formatted_dtio)obj->dtio_sub;
GFC_DIMENSION_SET(vlist.dim[0],1, 0, 0);
diff --git a/libgfortran/libgfortran.h b/libgfortran/libgfortran.h
index 3b1dc72..38e364f 100644
--- a/libgfortran/libgfortran.h
+++ b/libgfortran/libgfortran.h
@@ -339,51 +339,65 @@ typedef struct dtype_type
}
dtype_type;
-#define GFC_ARRAY_DESCRIPTOR(r, type) \
+#define GFC_ARRAY_DESCRIPTOR(type) \
struct {\
type *base_addr;\
size_t offset;\
dtype_type dtype;\
index_type span;\
- descriptor_dimension dim[r];\
+ descriptor_dimension dim[];\
}
/* Commonly used array descriptor types. */
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) gfc_array_void;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, char) gfc_array_char;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_1) gfc_array_i1;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_2) gfc_array_i2;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_array_i4;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_8) gfc_array_i8;
+typedef GFC_ARRAY_DESCRIPTOR (void) gfc_array_void;
+typedef GFC_ARRAY_DESCRIPTOR (char) gfc_array_char;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_1) gfc_array_i1;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_2) gfc_array_i2;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_4) gfc_array_i4;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_8) gfc_array_i8;
#ifdef HAVE_GFC_INTEGER_16
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_16) gfc_array_i16;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_INTEGER_16) gfc_array_i16;
#endif
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_4) gfc_array_r4;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_8) gfc_array_r8;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_4) gfc_array_r4;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_8) gfc_array_r8;
#ifdef HAVE_GFC_REAL_10
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_10) gfc_array_r10;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_10) gfc_array_r10;
#endif
#ifdef HAVE_GFC_REAL_16
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_REAL_16) gfc_array_r16;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_REAL_16) gfc_array_r16;
#endif
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_4) gfc_array_c4;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_8) gfc_array_c8;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_4) gfc_array_c4;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_8) gfc_array_c8;
#ifdef HAVE_GFC_COMPLEX_10
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_10) gfc_array_c10;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_10) gfc_array_c10;
#endif
#ifdef HAVE_GFC_COMPLEX_16
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_COMPLEX_16) gfc_array_c16;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_COMPLEX_16) gfc_array_c16;
#endif
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_1) gfc_array_l1;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_2) gfc_array_l2;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_4) gfc_array_l4;
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_8) gfc_array_l8;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_1) gfc_array_l1;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_2) gfc_array_l2;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_4) gfc_array_l4;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_8) gfc_array_l8;
#ifdef HAVE_GFC_LOGICAL_16
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_LOGICAL_16) gfc_array_l16;
+typedef GFC_ARRAY_DESCRIPTOR (GFC_LOGICAL_16) gfc_array_l16;
#endif
typedef gfc_array_i1 gfc_array_s1;
typedef gfc_array_i4 gfc_array_s4;
+/* These are for when you actually want to declare a descriptor, as
+ opposed to a pointer to it. */
+
+#define GFC_FULL_ARRAY_DESCRIPTOR(r, type) \
+struct {\
+ type *base_addr;\
+ size_t offset;\
+ dtype_type dtype;\
+ index_type span;\
+ descriptor_dimension dim[r];\
+}
+
+typedef GFC_FULL_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, GFC_INTEGER_4) gfc_full_array_i4;
+
#define GFC_DESCRIPTOR_RANK(desc) ((desc)->dtype.rank)
#define GFC_DESCRIPTOR_TYPE(desc) ((desc)->dtype.type)
#define GFC_DESCRIPTOR_SIZE(desc) ((desc)->dtype.elem_len)
@@ -1345,7 +1359,7 @@ iexport_proto(random_seed_i8);
/* size.c */
-typedef GFC_ARRAY_DESCRIPTOR (GFC_MAX_DIMENSIONS, void) array_t;
+typedef GFC_ARRAY_DESCRIPTOR (void) array_t;
extern index_type size0 (const array_t * array);
iexport_proto(size0);
diff --git a/libgfortran/m4/reshape.m4 b/libgfortran/m4/reshape.m4
index 1089116..c96ad9f 100644
--- a/libgfortran/m4/reshape.m4
+++ b/libgfortran/m4/reshape.m4
@@ -29,7 +29,7 @@ include(iparm.m4)dnl
`#if defined (HAVE_'rtype_name`)
-typedef GFC_ARRAY_DESCRIPTOR(1, 'index_type`) 'shape_type`;'
+typedef GFC_FULL_ARRAY_DESCRIPTOR(1, 'index_type`) 'shape_type`;'
dnl For integer routines, only the kind (ie size) is used to name the
dnl function. The same function will be used for integer and logical
diff --git a/libgo/go/runtime/atomic_pointer.go b/libgo/go/runtime/atomic_pointer.go
new file mode 100644
index 0000000..b66ef58
--- /dev/null
+++ b/libgo/go/runtime/atomic_pointer.go
@@ -0,0 +1,69 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package runtime
+
+import (
+ "runtime/internal/atomic"
+ "unsafe"
+)
+
+// These functions cannot have go:noescape annotations,
+// because while ptr does not escape, new does.
+// If new is marked as not escaping, the compiler will make incorrect
+// escape analysis decisions about the pointer value being stored.
+// Instead, these are wrappers around the actual atomics (casp1 and so on)
+// that use noescape to convey which arguments do not escape.
+
+// atomicstorep performs *ptr = new atomically and invokes a write barrier.
+//
+//go:nosplit
+func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
+ writebarrierptr_prewrite((*uintptr)(ptr), uintptr(new))
+ atomic.StorepNoWB(noescape(ptr), new)
+}
+
+//go:nosplit
+func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
+ // The write barrier is only necessary if the CAS succeeds,
+ // but since it needs to happen before the write becomes
+ // public, we have to do it conservatively all the time.
+ writebarrierptr_prewrite((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+ return atomic.Casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new)
+}
+
+// Like above, but implement in terms of sync/atomic's uintptr operations.
+// We cannot just call the runtime routines, because the race detector expects
+// to be able to intercept the sync/atomic forms but not the runtime forms.
+
+//go:linkname sync_atomic_StoreUintptr sync_atomic.StoreUintptr
+func sync_atomic_StoreUintptr(ptr *uintptr, new uintptr)
+
+//go:linkname sync_atomic_StorePointer sync_atomic.StorePointer
+//go:nosplit
+func sync_atomic_StorePointer(ptr *unsafe.Pointer, new unsafe.Pointer) {
+ writebarrierptr_prewrite((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+ sync_atomic_StoreUintptr((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+}
+
+//go:linkname sync_atomic_SwapUintptr sync_atomic.SwapUintptr
+func sync_atomic_SwapUintptr(ptr *uintptr, new uintptr) uintptr
+
+//go:linkname sync_atomic_SwapPointer sync_atomic.SwapPointer
+//go:nosplit
+func sync_atomic_SwapPointer(ptr *unsafe.Pointer, new unsafe.Pointer) unsafe.Pointer {
+ writebarrierptr_prewrite((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+ old := unsafe.Pointer(sync_atomic_SwapUintptr((*uintptr)(noescape(unsafe.Pointer(ptr))), uintptr(new)))
+ return old
+}
+
+//go:linkname sync_atomic_CompareAndSwapUintptr sync_atomic.CompareAndSwapUintptr
+func sync_atomic_CompareAndSwapUintptr(ptr *uintptr, old, new uintptr) bool
+
+//go:linkname sync_atomic_CompareAndSwapPointer sync_atomic.CompareAndSwapPointer
+//go:nosplit
+func sync_atomic_CompareAndSwapPointer(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
+ writebarrierptr_prewrite((*uintptr)(unsafe.Pointer(ptr)), uintptr(new))
+ return sync_atomic_CompareAndSwapUintptr((*uintptr)(noescape(unsafe.Pointer(ptr))), uintptr(old), uintptr(new))
+}
diff --git a/libgo/go/runtime/extern.go b/libgo/go/runtime/extern.go
index 36787e3..b3afd10 100644
--- a/libgo/go/runtime/extern.go
+++ b/libgo/go/runtime/extern.go
@@ -157,10 +157,6 @@ package runtime
import "runtime/internal/sys"
-// Gosched yields the processor, allowing other goroutines to run. It does not
-// suspend the current goroutine, so execution resumes automatically.
-func Gosched()
-
// Caller reports file and line number information about function invocations on
// the calling goroutine's stack. The argument skip is the number of stack frames
// to ascend, with 0 identifying the caller of Caller. (For historical reasons the
diff --git a/libgo/go/runtime/stubs.go b/libgo/go/runtime/stubs.go
index fa3b1ce..bda2c69 100644
--- a/libgo/go/runtime/stubs.go
+++ b/libgo/go/runtime/stubs.go
@@ -5,7 +5,6 @@
package runtime
import (
- "runtime/internal/atomic"
"runtime/internal/sys"
"unsafe"
)
@@ -307,19 +306,6 @@ func setSupportAES(v bool) {
support_aes = v
}
-// Here for gccgo until we port atomic_pointer.go and mgc.go.
-//go:nosplit
-func casp(ptr *unsafe.Pointer, old, new unsafe.Pointer) bool {
- if !atomic.Casp1((*unsafe.Pointer)(noescape(unsafe.Pointer(ptr))), noescape(old), new) {
- return false
- }
- return true
-}
-
-// Here for gccgo until we port lock_*.go.
-func lock(l *mutex)
-func unlock(l *mutex)
-
// Here for gccgo.
func errno() int
@@ -327,9 +313,6 @@ func errno() int
func entersyscall(int32)
func entersyscallblock(int32)
-// Here for gccgo until we port mgc.go.
-func GC()
-
// For gccgo to call from C code, so that the C code and the Go code
// can share the memstats variable for now.
//go:linkname getMstats runtime.getMstats
@@ -337,22 +320,6 @@ func getMstats() *mstats {
return &memstats
}
-// Temporary for gccgo until we port mem_GOOS.go.
-func sysAlloc(n uintptr, sysStat *uint64) unsafe.Pointer
-func sysFree(v unsafe.Pointer, n uintptr, sysStat *uint64)
-
-// Temporary for gccgo until we port malloc.go
-func persistentalloc(size, align uintptr, sysStat *uint64) unsafe.Pointer
-
-// Temporary for gccgo until we port mheap.go
-func setprofilebucket(p unsafe.Pointer, b *bucket)
-
-// Temporary for gccgo until we port atomic_pointer.go.
-//go:nosplit
-func atomicstorep(ptr unsafe.Pointer, new unsafe.Pointer) {
- atomic.StorepNoWB(noescape(ptr), new)
-}
-
// Get signal trampoline, written in C.
func getSigtramp() uintptr
diff --git a/libgo/go/sync/atomic/atomic.c b/libgo/go/sync/atomic/atomic.c
index 32cbf03..07a4306 100644
--- a/libgo/go/sync/atomic/atomic.c
+++ b/libgo/go/sync/atomic/atomic.c
@@ -62,16 +62,6 @@ SwapUintptr (uintptr_t *addr, uintptr_t new)
return __atomic_exchange_n (addr, new, __ATOMIC_SEQ_CST);
}
-void *SwapPointer (void **, void *)
- __asm__ (GOSYM_PREFIX "sync_atomic.SwapPointer")
- __attribute__ ((no_split_stack));
-
-void *
-SwapPointer (void **addr, void *new)
-{
- return __atomic_exchange_n (addr, new, __ATOMIC_SEQ_CST);
-}
-
_Bool CompareAndSwapInt32 (int32_t *, int32_t, int32_t)
__asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapInt32")
__attribute__ ((no_split_stack));
@@ -126,16 +116,6 @@ CompareAndSwapUintptr (uintptr_t *val, uintptr_t old, uintptr_t new)
return __sync_bool_compare_and_swap (val, old, new);
}
-_Bool CompareAndSwapPointer (void **, void *, void *)
- __asm__ (GOSYM_PREFIX "sync_atomic.CompareAndSwapPointer")
- __attribute__ ((no_split_stack));
-
-_Bool
-CompareAndSwapPointer (void **val, void *old, void *new)
-{
- return __sync_bool_compare_and_swap (val, old, new);
-}
-
int32_t AddInt32 (int32_t *, int32_t)
__asm__ (GOSYM_PREFIX "sync_atomic.AddInt32")
__attribute__ ((no_split_stack));
@@ -357,17 +337,3 @@ StoreUintptr (uintptr_t *addr, uintptr_t val)
while (! __sync_bool_compare_and_swap (addr, v, val))
v = *addr;
}
-
-void StorePointer (void **addr, void *val)
- __asm__ (GOSYM_PREFIX "sync_atomic.StorePointer")
- __attribute__ ((no_split_stack));
-
-void
-StorePointer (void **addr, void *val)
-{
- void *v;
-
- v = *addr;
- while (! __sync_bool_compare_and_swap (addr, v, val))
- v = *addr;
-}
diff --git a/libgo/misc/cgo/test/issue9400/gccgo.go b/libgo/misc/cgo/test/issue9400/gccgo.go
index 0ef3a8c..a9b62b0 100644
--- a/libgo/misc/cgo/test/issue9400/gccgo.go
+++ b/libgo/misc/cgo/test/issue9400/gccgo.go
@@ -16,6 +16,8 @@ import (
// without writing more assembly code, which we haven't bothered to
// do. So this is not much of a test.
+var Baton int32
+
func RewindAndSetgid() {
atomic.StoreInt32(&Baton, 1)
for atomic.LoadInt32(&Baton) != 0 {
diff --git a/libgo/misc/cgo/test/issue9400/stubs.go b/libgo/misc/cgo/test/issue9400/stubs.go
index 60193dc..7b50cef 100644
--- a/libgo/misc/cgo/test/issue9400/stubs.go
+++ b/libgo/misc/cgo/test/issue9400/stubs.go
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// +build !gccgo
+
package issue9400
var Baton int32