diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-26 20:14:01 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2017-01-26 20:14:01 +0000 |
commit | 1d05ab3690b26285c5b4801c18caaabae7acb333 (patch) | |
tree | 962832cf9778c19d47e3baa0e6b4b524143d58e9 | |
parent | 7903b8c4cf2efa3ef05a755740160f6114275d47 (diff) | |
parent | 41d3d0ac409a6e85a39e453be6ecb99c622284a8 (diff) | |
download | gcc-1d05ab3690b26285c5b4801c18caaabae7acb333.zip gcc-1d05ab3690b26285c5b4801c18caaabae7acb333.tar.gz gcc-1d05ab3690b26285c5b4801c18caaabae7acb333.tar.bz2 |
Merge from trunk revision 244947.
From-SVN: r244952
147 files changed, 850 insertions, 277 deletions
@@ -1,7 +1,6 @@ 2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> Martin Jambor <mjambor@suse.cz> - * Makefile.def (target_modules): Added libhsail-rt. (languages): Added language brig. * Makefile.in: Regenerated. @@ -9,11 +8,6 @@ tgarget-libhsail-rt. Make brig unsupported on untested architectures. * configure: Regenerated. -2017-01-19 Uros Bizjak <ubizjak@gmail.com> - - PR target/78478 - * config/ax_check_define.m4: New file. - 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 diff --git a/config/ChangeLog b/config/ChangeLog index 0ad1a30..8fb3e1e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,8 @@ +2017-01-19 Uros Bizjak <ubizjak@gmail.com> + + PR target/78478 + * ax_check_define.m4: New file. + 2017-01-17 Jakub Jelinek <jakub@redhat.com> PR other/79046 diff --git a/contrib/ChangeLog b/contrib/ChangeLog index 2f862fa..07f7b57 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,9 @@ +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + * update-copyright.py: Add libhsail-rt to self.default_dirs + and call self.add_dir on it. Add Intel Corporation to external + authors. + 2017-01-25 Thomas Schwinge <thomas@codesourcery.com> * gcc_update (files_and_dependencies): Care for "libhsail-rt". diff --git a/contrib/update-copyright.py b/contrib/update-copyright.py index fd88e9a..ddc929c 100755 --- a/contrib/update-copyright.py +++ b/contrib/update-copyright.py @@ -663,6 +663,7 @@ class GCCCopyright (Copyright): self.add_external_author ('Florida State University') self.add_external_author ('Greg Colvin and Beman Dawes.') self.add_external_author ('Hewlett-Packard Company') + self.add_external_author ('Intel Corporation') self.add_external_author ('Information Technology Industry Council.') self.add_external_author ('James Theiler, Brian Gough') self.add_external_author ('Makoto Matsumoto and Takuji Nishimura,') @@ -710,6 +711,7 @@ class GCCCmdLine (CmdLine): self.add_dir ('libgfortran') # libgo is imported from upstream. self.add_dir ('libgomp') + self.add_dir ('libhsail-rt') self.add_dir ('libiberty') self.add_dir ('libitm') self.add_dir ('libobjc') @@ -735,6 +737,7 @@ class GCCCmdLine (CmdLine): 'libgcc', 'libgfortran', 'libgomp', + 'libhsail-rt', 'libiberty', 'libitm', 'libobjc', diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4712d7c..74d5df7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,77 @@ +2017-01-26 Carl Love <cel@us.ibm.com> + + * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove + bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins + +2017-01-26 Vladimir Makarov <vmakarov@redhat.com> + + PR target/79131 + * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take + endianess for subregs into account. + * lra-constraints.c (lra_constraints): Do risky transformations + always on the first iteration. + * lra-lives.c (check_pseudos_live_through_calls): Add arg + last_call_used_reg_set. + (process_bb_lives): Define and use last_call_used_reg_set. + * lra.c (lra): Always continue after lra_constraints on the first + iteration. + +2017-01-26 Kirill Yukhin <kirill.yukhin@gmail.com> + + * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long + constant. + * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + * config/i386/avx512fintrin.h (_ktest_mask16_u8, + _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ... + * config/i386/avx512dqintrin.h (_ktest_mask16_u8, + _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here. + * config/i386/i386-builtin.def (__builtin_ia32_ktestchi, + __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use + OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F. + * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator. + (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ. + +2017-01-26 Marek Polacek <polacek@redhat.com> + + PR c/79199 + * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL + for the third operand. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + PR middle-end/79236 + * omp-low.c (struct omp_context): Add simt_stmt field. + (scan_omp_for): Return omp_context *. + (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD + context to the _simt_ SIMD stmt. + (lower_omp_for): For combined SIMD with sibling _simt_ + SIMD, make sure to use the same decls in _looptemp_ + clauses as in the sibling. + +2017-01-26 David Sherwood <david.sherwood@arm.com> + + PR middle-end/79212 + * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in + all contexts. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + PR target/70465 + * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1); + emit fld b; fld a; if possible. + + * brig-builtins.def: Update copyright years. + * config/arm/arm_acle_builtins.def: Update copyright years. + +2017-01-25 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/79179 + * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY + constraint instead of o for the stxsd instruction. + 2017-01-25 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order @@ -115,7 +189,7 @@ (record_nonwrapping_iv): Improve boundary using above function if no value range information. -2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> +2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> Martin Jambor <mjambor@suse.cz> * brig-builtins.def: New file. diff --git a/gcc/DATESTAMP b/gcc/DATESTAMP index 781f17e..1ca31ff 100644 --- a/gcc/DATESTAMP +++ b/gcc/DATESTAMP @@ -1 +1 @@ -20170125 +20170126 diff --git a/gcc/brig-builtins.def b/gcc/brig-builtins.def index 329c88e..b73ab7e 100644 --- a/gcc/brig-builtins.def +++ b/gcc/brig-builtins.def @@ -1,6 +1,6 @@ /* This file contains the definitions and documentation for the HSAIL builtins used in the GNU compiler. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/ChangeLog b/gcc/brig/ChangeLog index dcea9d3..d947c5a 100644 --- a/gcc/brig/ChangeLog +++ b/gcc/brig/ChangeLog @@ -1,4 +1,8 @@ -2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + Update copyright years. + +2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> Martin Jambor <mjambor@suse.cz> * Make-lang.in: New file. diff --git a/gcc/brig/Make-lang.in b/gcc/brig/Make-lang.in index b85b1b0..d7566bf 100644 --- a/gcc/brig/Make-lang.in +++ b/gcc/brig/Make-lang.in @@ -1,7 +1,7 @@ # Make-lang.in -- Top level -*- makefile -*- fragment for gcc BRIG (HSAIL) # frontend. -# Copyright (C) 2015 Free Software Foundation, Inc. +# Copyright (C) 2015-2017 Free Software Foundation, Inc. # This file is part of GCC. diff --git a/gcc/brig/brig-builtins.h b/gcc/brig/brig-builtins.h index ef9d11f..d9093f5 100644 --- a/gcc/brig/brig-builtins.h +++ b/gcc/brig/brig-builtins.h @@ -1,5 +1,5 @@ /* brig-builtins.h -- brig builtin definitions - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brig-c.h b/gcc/brig/brig-c.h index c4e2f2d..be3e282 100644 --- a/gcc/brig/brig-c.h +++ b/gcc/brig/brig-c.h @@ -1,5 +1,5 @@ /* brig-c.h -- Header file for brig input's gcc C interface. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brig-lang.c b/gcc/brig/brig-lang.c index 1642a95..bd5310d 100644 --- a/gcc/brig/brig-lang.c +++ b/gcc/brig/brig-lang.c @@ -1,5 +1,5 @@ /* brig-lang.c -- brig (HSAIL) input gcc interface. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-arg-block-handler.cc b/gcc/brig/brigfrontend/brig-arg-block-handler.cc index 99945ee..8e9d923 100644 --- a/gcc/brig/brigfrontend/brig-arg-block-handler.cc +++ b/gcc/brig/brigfrontend/brig-arg-block-handler.cc @@ -1,5 +1,5 @@ /* brig-arg-block-handler.cc -- brig arg block start/end directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-atomic-inst-handler.cc b/gcc/brig/brigfrontend/brig-atomic-inst-handler.cc index 87abab8..2b04d99 100644 --- a/gcc/brig/brigfrontend/brig-atomic-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-atomic-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-atomic-inst-handler.cc -- brig atomic instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-basic-inst-handler.cc b/gcc/brig/brigfrontend/brig-basic-inst-handler.cc index 638f818..68d8198 100644 --- a/gcc/brig/brigfrontend/brig-basic-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-basic-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-basic-inst-handler.cc -- brig basic instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-branch-inst-handler.cc b/gcc/brig/brigfrontend/brig-branch-inst-handler.cc index 040ae5d..9cec5b6 100644 --- a/gcc/brig/brigfrontend/brig-branch-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-branch-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-branch-inst-handler.cc -- brig branch instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-cmp-inst-handler.cc b/gcc/brig/brigfrontend/brig-cmp-inst-handler.cc index f455d1e..c6dd06c 100644 --- a/gcc/brig/brigfrontend/brig-cmp-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-cmp-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-cmp-inst-handler.cc -- brig cmp instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-code-entry-handler.cc b/gcc/brig/brigfrontend/brig-code-entry-handler.cc index 5fe2012..b78005a 100644 --- a/gcc/brig/brigfrontend/brig-code-entry-handler.cc +++ b/gcc/brig/brigfrontend/brig-code-entry-handler.cc @@ -1,5 +1,5 @@ /* brig-code-entry-handler.cc -- a gccbrig base class - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-code-entry-handler.h b/gcc/brig/brigfrontend/brig-code-entry-handler.h index 8e7fbe8..3f8c028 100644 --- a/gcc/brig/brigfrontend/brig-code-entry-handler.h +++ b/gcc/brig/brigfrontend/brig-code-entry-handler.h @@ -1,5 +1,5 @@ /* brig-code-entry-handler.h -- a gccbrig base class - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-comment-handler.cc b/gcc/brig/brigfrontend/brig-comment-handler.cc index 61a187f..442b3aa 100644 --- a/gcc/brig/brigfrontend/brig-comment-handler.cc +++ b/gcc/brig/brigfrontend/brig-comment-handler.cc @@ -1,5 +1,5 @@ /* brig-comment-handler.cc -- brig comment directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-control-handler.cc b/gcc/brig/brigfrontend/brig-control-handler.cc index 2e4f5e3..91ff283 100644 --- a/gcc/brig/brigfrontend/brig-control-handler.cc +++ b/gcc/brig/brigfrontend/brig-control-handler.cc @@ -1,5 +1,5 @@ /* brig-control-handler.cc -- brig control directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc b/gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc index 08ff26d..f853dc3 100644 --- a/gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-copy-move-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-copy-move-inst-handler.cc -- brig copy/move instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-cvt-inst-handler.cc b/gcc/brig/brigfrontend/brig-cvt-inst-handler.cc index a5b1619..0297f8b 100644 --- a/gcc/brig/brigfrontend/brig-cvt-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-cvt-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-cvt-inst-handler.cc -- brig cvt (convert) instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-fbarrier-handler.cc b/gcc/brig/brigfrontend/brig-fbarrier-handler.cc index b236885..802d51c 100644 --- a/gcc/brig/brigfrontend/brig-fbarrier-handler.cc +++ b/gcc/brig/brigfrontend/brig-fbarrier-handler.cc @@ -1,5 +1,5 @@ /* brig-fbarrier-handler.cc -- brig fbarrier directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-function-handler.cc b/gcc/brig/brigfrontend/brig-function-handler.cc index 4e05680..ebfca39 100644 --- a/gcc/brig/brigfrontend/brig-function-handler.cc +++ b/gcc/brig/brigfrontend/brig-function-handler.cc @@ -1,5 +1,5 @@ /* brig-code-entry-handler.cc -- brig function directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-function.cc b/gcc/brig/brigfrontend/brig-function.cc index 5f9784c..382bec0 100644 --- a/gcc/brig/brigfrontend/brig-function.cc +++ b/gcc/brig/brigfrontend/brig-function.cc @@ -1,5 +1,5 @@ /* brig-function.cc -- declaration of brig_function class. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-function.h b/gcc/brig/brigfrontend/brig-function.h index 81c3f89..71b5d3f 100644 --- a/gcc/brig/brigfrontend/brig-function.h +++ b/gcc/brig/brigfrontend/brig-function.h @@ -1,5 +1,5 @@ /* brig-function.h -- declaration of brig_function class. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-inst-mod-handler.cc b/gcc/brig/brigfrontend/brig-inst-mod-handler.cc index 8cd5503..43e2b68 100644 --- a/gcc/brig/brigfrontend/brig-inst-mod-handler.cc +++ b/gcc/brig/brigfrontend/brig-inst-mod-handler.cc @@ -1,5 +1,5 @@ /* brig-inst-mod-handler.cc -- brig rounding moded instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-label-handler.cc b/gcc/brig/brigfrontend/brig-label-handler.cc index 890cf5b..737e1bf 100644 --- a/gcc/brig/brigfrontend/brig-label-handler.cc +++ b/gcc/brig/brigfrontend/brig-label-handler.cc @@ -1,5 +1,5 @@ /* brig-label-handler.cc -- brig label directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-lane-inst-handler.cc b/gcc/brig/brigfrontend/brig-lane-inst-handler.cc index 5cfe8d9..bc85c03 100644 --- a/gcc/brig/brigfrontend/brig-lane-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-lane-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-lane-inst-handler.cc -- brig lane instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-machine.c b/gcc/brig/brigfrontend/brig-machine.c index 62f07f7..3c41d65 100644 --- a/gcc/brig/brigfrontend/brig-machine.c +++ b/gcc/brig/brigfrontend/brig-machine.c @@ -1,5 +1,5 @@ /* brig-machine.c -- gccbrig machine queries - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-machine.h b/gcc/brig/brigfrontend/brig-machine.h index 96efbf6..b8493b5 100644 --- a/gcc/brig/brigfrontend/brig-machine.h +++ b/gcc/brig/brigfrontend/brig-machine.h @@ -1,5 +1,5 @@ /* brig-machine.h -- gccbrig machine queries - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. This file is part of GCC. diff --git a/gcc/brig/brigfrontend/brig-mem-inst-handler.cc b/gcc/brig/brigfrontend/brig-mem-inst-handler.cc index dfd3369..2b245a1 100644 --- a/gcc/brig/brigfrontend/brig-mem-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-mem-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-mem-inst-handler.cc -- brig memory inst handler - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-module-handler.cc b/gcc/brig/brigfrontend/brig-module-handler.cc index 2c25189..1b9a15c 100644 --- a/gcc/brig/brigfrontend/brig-module-handler.cc +++ b/gcc/brig/brigfrontend/brig-module-handler.cc @@ -1,5 +1,5 @@ /* brig-module-handler.cc -- brig module directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-queue-inst-handler.cc b/gcc/brig/brigfrontend/brig-queue-inst-handler.cc index eaf9d8d..8027d18 100644 --- a/gcc/brig/brigfrontend/brig-queue-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-queue-inst-handler.cc @@ -1,6 +1,6 @@ /* brig-queue-inst-handler.cc -- brig user mode queue related instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-seg-inst-handler.cc b/gcc/brig/brigfrontend/brig-seg-inst-handler.cc index e680114..f471084 100644 --- a/gcc/brig/brigfrontend/brig-seg-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-seg-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-seg-inst-handler.cc -- brig segment related instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-signal-inst-handler.cc b/gcc/brig/brigfrontend/brig-signal-inst-handler.cc index 5dd2268..26f81d1c 100644 --- a/gcc/brig/brigfrontend/brig-signal-inst-handler.cc +++ b/gcc/brig/brigfrontend/brig-signal-inst-handler.cc @@ -1,5 +1,5 @@ /* brig-signal-inst-handler.cc -- brig signal instruction handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-to-generic.cc b/gcc/brig/brigfrontend/brig-to-generic.cc index d3a6786..1672158 100644 --- a/gcc/brig/brigfrontend/brig-to-generic.cc +++ b/gcc/brig/brigfrontend/brig-to-generic.cc @@ -1,5 +1,5 @@ /* brig2tree.cc -- brig to gcc generic/gimple tree conversion - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-to-generic.h b/gcc/brig/brigfrontend/brig-to-generic.h index 8e15589..09d7c42 100644 --- a/gcc/brig/brigfrontend/brig-to-generic.h +++ b/gcc/brig/brigfrontend/brig-to-generic.h @@ -1,5 +1,5 @@ /* brig-to-generic.h -- brig to gcc generic conversion - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-util.cc b/gcc/brig/brigfrontend/brig-util.cc index 8b17b59..f96ae6a 100644 --- a/gcc/brig/brigfrontend/brig-util.cc +++ b/gcc/brig/brigfrontend/brig-util.cc @@ -1,5 +1,5 @@ /* brig-util.cc -- gccbrig utility functions - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-util.h b/gcc/brig/brigfrontend/brig-util.h index 3786616..3060f5b 100644 --- a/gcc/brig/brigfrontend/brig-util.h +++ b/gcc/brig/brigfrontend/brig-util.h @@ -1,5 +1,5 @@ /* brig-util.h -- gccbrig utility functions - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/brig-variable-handler.cc b/gcc/brig/brigfrontend/brig-variable-handler.cc index b4a8d67..b2e869b 100644 --- a/gcc/brig/brigfrontend/brig-variable-handler.cc +++ b/gcc/brig/brigfrontend/brig-variable-handler.cc @@ -1,5 +1,5 @@ /* brig-variable-handler.cc -- brig variable directive handling - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigfrontend/phsa.h b/gcc/brig/brigfrontend/phsa.h index 00e0a7c..2da21c8 100644 --- a/gcc/brig/brigfrontend/phsa.h +++ b/gcc/brig/brigfrontend/phsa.h @@ -1,5 +1,5 @@ /* phsa.h -- interfacing between the gcc BRIG FE and the phsa runtime - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/brigspec.c b/gcc/brig/brigspec.c index 42b7d53..b1610ef 100644 --- a/gcc/brig/brigspec.c +++ b/gcc/brig/brigspec.c @@ -1,5 +1,5 @@ /* brigspec.c -- Specific flags and argument handling of the gcc BRIG front end. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/config-lang.in b/gcc/brig/config-lang.in index 6d07cae..ab139b3 100644 --- a/gcc/brig/config-lang.in +++ b/gcc/brig/config-lang.in @@ -1,6 +1,6 @@ # config-lang.in -- Top level configure fragment for gcc BRIG (HSAIL) frontend. -# Copyright (C) 2015 Free Software Foundation, Inc. +# Copyright (C) 2015-2017 Free Software Foundation, Inc. # This file is part of GCC. diff --git a/gcc/brig/lang-specs.h b/gcc/brig/lang-specs.h index c5b9f5e..065ff5e 100644 --- a/gcc/brig/lang-specs.h +++ b/gcc/brig/lang-specs.h @@ -1,5 +1,5 @@ /* lang-specs.h -- gcc driver specs for BRIG (HSAIL) frontend. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/gcc/brig/lang.opt b/gcc/brig/lang.opt index 0ba70ae..e0c71b2 100644 --- a/gcc/brig/lang.opt +++ b/gcc/brig/lang.opt @@ -1,6 +1,6 @@ ; lang.opt -- Options for the gcc BRIG (HSAIL) front end. -; Copyright (C) 2015 Free Software Foundation, Inc. +; Copyright (C) 2015-2017 Free Software Foundation, Inc. ; ; This file is part of GCC. ; diff --git a/gcc/config/arm/arm_acle_builtins.def b/gcc/config/arm/arm_acle_builtins.def index bd1f662..2f6c478 100644 --- a/gcc/config/arm/arm_acle_builtins.def +++ b/gcc/config/arm/arm_acle_builtins.def @@ -1,5 +1,5 @@ /* ACLE builtin definitions for ARM. - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of GCC. diff --git a/gcc/config/i386/avx512dqintrin.h b/gcc/config/i386/avx512dqintrin.h index 670e41e..88e8adb 100644 --- a/gcc/config/i386/avx512dqintrin.h +++ b/gcc/config/i386/avx512dqintrin.h @@ -58,6 +58,28 @@ _ktestc_mask8_u8 (__mmask8 __A, __mmask8 __B) extern __inline unsigned char __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_ktest_mask16_u8 (__mmask16 __A, __mmask16 __B, unsigned char *__CF) +{ + *__CF = (unsigned char) __builtin_ia32_ktestchi (__A, __B); + return (unsigned char) __builtin_ia32_ktestzhi (__A, __B); +} + +extern __inline unsigned char +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_ktestz_mask16_u8 (__mmask16 __A, __mmask16 __B) +{ + return (unsigned char) __builtin_ia32_ktestzhi (__A, __B); +} + +extern __inline unsigned char +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_ktestc_mask16_u8 (__mmask16 __A, __mmask16 __B) +{ + return (unsigned char) __builtin_ia32_ktestchi (__A, __B); +} + +extern __inline unsigned char +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _kortest_mask8_u8 (__mmask8 __A, __mmask8 __B, unsigned char *__CF) { *__CF = (unsigned char) __builtin_ia32_kortestcqi (__A, __B); @@ -85,6 +107,13 @@ _kadd_mask8 (__mmask8 __A, __mmask8 __B) return (__mmask8) __builtin_ia32_kaddqi ((__mmask8) __A, (__mmask8) __B); } +extern __inline __mmask16 +__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) +_kadd_mask16 (__mmask16 __A, __mmask16 __B) +{ + return (__mmask16) __builtin_ia32_kaddhi ((__mmask16) __A, (__mmask16) __B); +} + extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _cvtmask8_u32 (__mmask8 __A) diff --git a/gcc/config/i386/avx512fintrin.h b/gcc/config/i386/avx512fintrin.h index 6c11453..68c3d6a 100644 --- a/gcc/config/i386/avx512fintrin.h +++ b/gcc/config/i386/avx512fintrin.h @@ -10008,28 +10008,6 @@ _mm512_maskz_expandloadu_epi32 (__mmask16 __U, void const *__P) extern __inline unsigned char __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_ktest_mask16_u8 (__mmask16 __A, __mmask16 __B, unsigned char *__CF) -{ - *__CF = (unsigned char) __builtin_ia32_ktestchi (__A, __B); - return (unsigned char) __builtin_ia32_ktestzhi (__A, __B); -} - -extern __inline unsigned char -__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_ktestz_mask16_u8 (__mmask16 __A, __mmask16 __B) -{ - return (unsigned char) __builtin_ia32_ktestzhi (__A, __B); -} - -extern __inline unsigned char -__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_ktestc_mask16_u8 (__mmask16 __A, __mmask16 __B) -{ - return (unsigned char) __builtin_ia32_ktestchi (__A, __B); -} - -extern __inline unsigned char -__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _kortest_mask16_u8 (__mmask16 __A, __mmask16 __B, unsigned char *__CF) { *__CF = (unsigned char) __builtin_ia32_kortestchi (__A, __B); @@ -10052,13 +10030,6 @@ _kortestc_mask16_u8 (__mmask16 __A, __mmask16 __B) (__mmask16) __B); } -extern __inline __mmask16 -__attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) -_kadd_mask16 (__mmask16 __A, __mmask16 __B) -{ - return (__mmask16) __builtin_ia32_kaddhi ((__mmask16) __A, (__mmask16) __B); -} - extern __inline unsigned int __attribute__ ((__gnu_inline__, __always_inline__, __artificial__)) _cvtmask16_u32 (__mmask16 __A) diff --git a/gcc/config/i386/i386-builtin.def b/gcc/config/i386/i386-builtin.def index 137aa3e..a8fe0a5 100644 --- a/gcc/config/i386/i386-builtin.def +++ b/gcc/config/i386/i386-builtin.def @@ -1466,8 +1466,8 @@ BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kiorsi, "__builtin_ia32_korsi", IX86_B BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kiordi, "__builtin_ia32_kordi", IX86_BUILTIN_KOR64, UNKNOWN, (int) UDI_FTYPE_UDI_UDI) BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_ktestqi, "__builtin_ia32_ktestcqi", IX86_BUILTIN_KTESTC8, UNKNOWN, (int) UQI_FTYPE_UQI_UQI) BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_ktestqi, "__builtin_ia32_ktestzqi", IX86_BUILTIN_KTESTZ8, UNKNOWN, (int) UQI_FTYPE_UQI_UQI) -BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_ktesthi, "__builtin_ia32_ktestchi", IX86_BUILTIN_KTESTC16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) -BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_ktesthi, "__builtin_ia32_ktestzhi", IX86_BUILTIN_KTESTZ16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) +BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_ktesthi, "__builtin_ia32_ktestchi", IX86_BUILTIN_KTESTC16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) +BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_ktesthi, "__builtin_ia32_ktestzhi", IX86_BUILTIN_KTESTZ16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_ktestsi, "__builtin_ia32_ktestcsi", IX86_BUILTIN_KTESTC32, UNKNOWN, (int) USI_FTYPE_USI_USI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_ktestsi, "__builtin_ia32_ktestzsi", IX86_BUILTIN_KTESTZ32, UNKNOWN, (int) USI_FTYPE_USI_USI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_ktestdi, "__builtin_ia32_ktestcdi", IX86_BUILTIN_KTESTC64, UNKNOWN, (int) UDI_FTYPE_UDI_UDI) @@ -1495,7 +1495,7 @@ BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_kmovw, "__builtin_ia32_kmovw", IX86_BUI BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kmovd, "__builtin_ia32_kmovd", IX86_BUILTIN_KMOV32, UNKNOWN, (int) USI_FTYPE_USI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kmovq, "__builtin_ia32_kmovq", IX86_BUILTIN_KMOV64, UNKNOWN, (int) UDI_FTYPE_UDI) BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_kaddqi, "__builtin_ia32_kaddqi", IX86_BUILTIN_KADD8, UNKNOWN, (int) UQI_FTYPE_UQI_UQI) -BDESC (OPTION_MASK_ISA_AVX512F, CODE_FOR_kaddhi, "__builtin_ia32_kaddhi", IX86_BUILTIN_KADD16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) +BDESC (OPTION_MASK_ISA_AVX512DQ, CODE_FOR_kaddhi, "__builtin_ia32_kaddhi", IX86_BUILTIN_KADD16, UNKNOWN, (int) UHI_FTYPE_UHI_UHI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kaddsi, "__builtin_ia32_kaddsi", IX86_BUILTIN_KADD32, UNKNOWN, (int) USI_FTYPE_USI_USI) BDESC (OPTION_MASK_ISA_AVX512BW, CODE_FOR_kadddi, "__builtin_ia32_kadddi", IX86_BUILTIN_KADD64, UNKNOWN, (int) UDI_FTYPE_UDI_UDI) diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 0d074f8..a19c8f2 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -1302,6 +1302,11 @@ (define_mode_iterator SWI1248_AVX512BW [QI HI (SI "TARGET_AVX512BW") (DI "TARGET_AVX512BW")]) +;; All integer modes with AVX512BW/DQ, even HImode requires DQ. +(define_mode_iterator SWI1248_AVX512BWDQ2 + [(QI "TARGET_AVX512DQ") (HI "TARGET_AVX512DQ") + (SI "TARGET_AVX512BW") (DI "TARGET_AVX512BW")]) + (define_expand "kmov<mskmodesuffix>" [(set (match_operand:SWI1248_AVX512BWDQ 0 "nonimmediate_operand") (match_operand:SWI1248_AVX512BWDQ 1 "nonimmediate_operand"))] @@ -1398,10 +1403,10 @@ (const_string "<MODE>")))]) (define_insn "kadd<mode>" - [(set (match_operand:SWI1248_AVX512BWDQ 0 "register_operand" "=k") - (plus:SWI1248_AVX512BWDQ - (match_operand:SWI1248_AVX512BWDQ 1 "register_operand" "k") - (match_operand:SWI1248_AVX512BWDQ 2 "register_operand" "k"))) + [(set (match_operand:SWI1248_AVX512BWDQ2 0 "register_operand" "=k") + (plus:SWI1248_AVX512BWDQ2 + (match_operand:SWI1248_AVX512BWDQ2 1 "register_operand" "k") + (match_operand:SWI1248_AVX512BWDQ2 2 "register_operand" "k"))) (unspec [(const_int 0)] UNSPEC_MASKOP)] "TARGET_AVX512F" "kadd<mskmodesuffix>\t{%2, %1, %0|%0, %1, %2}" @@ -1427,8 +1432,8 @@ (define_insn "ktest<mode>" [(set (reg:CC FLAGS_REG) (unspec:CC - [(match_operand:SWI1248_AVX512BWDQ 0 "register_operand" "k") - (match_operand:SWI1248_AVX512BWDQ 1 "register_operand" "k")] + [(match_operand:SWI1248_AVX512BWDQ2 0 "register_operand" "k") + (match_operand:SWI1248_AVX512BWDQ2 1 "register_operand" "k")] UNSPEC_KTEST))] "TARGET_AVX512F" "ktest<mskmodesuffix>\t{%1, %0|%0, %1}" diff --git a/gcc/config/rs6000/rs6000-c.c b/gcc/config/rs6000/rs6000-c.c index ed4d8ff..b0a7d33 100644 --- a/gcc/config/rs6000/rs6000-c.c +++ b/gcc/config/rs6000/rs6000-c.c @@ -4789,10 +4789,6 @@ const struct altivec_builtin_types altivec_overloaded_builtins[] = { RS6000_BTI_V16QI, RS6000_BTI_V16QI, 0, 0 }, { P8V_BUILTIN_VEC_VGBBD, P8V_BUILTIN_VGBBD, RS6000_BTI_unsigned_V16QI, RS6000_BTI_unsigned_V16QI, 0, 0 }, - { P8V_BUILTIN_VEC_VGBBD, P8V_BUILTIN_VGBBD, - RS6000_BTI_V16QI, 0, 0, 0 }, - { P8V_BUILTIN_VEC_VGBBD, P8V_BUILTIN_VGBBD, - RS6000_BTI_unsigned_V16QI, 0, 0, 0 }, { P9V_BUILTIN_VEC_VINSERT4B, P9V_BUILTIN_VINSERT4B, RS6000_BTI_V16QI, RS6000_BTI_V4SI, diff --git a/gcc/config/rs6000/vsx.md b/gcc/config/rs6000/vsx.md index 28bbeb2..b10ade4 100644 --- a/gcc/config/rs6000/vsx.md +++ b/gcc/config/rs6000/vsx.md @@ -2323,7 +2323,7 @@ ;; Optimize storing a single scalar element that is the right location to ;; memory (define_insn "*vsx_extract_<mode>_store" - [(set (match_operand:<VS_scalar> 0 "memory_operand" "=m,Z,o") + [(set (match_operand:<VS_scalar> 0 "memory_operand" "=m,Z,wY") (vec_select:<VS_scalar> (match_operand:VSX_D 1 "register_operand" "d,wv,wb") (parallel [(match_operand:QI 2 "vsx_scalar_64bit" "wD,wD,wD")])))] diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 47eaa55..48d6952 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,25 @@ +2017-01-26 Jason Merrill <jason@redhat.com> + + * name-lookup.c (parse_using_directive): Deprecate strong using. + + PR c++/79176 - lambda ICE with -flto -Os + * decl2.c (vague_linkage_p): Handle decloned 'tors. + * tree.c (decl_linkage): Likewise. + +2017-01-25 Martin Sebor <msebor@redhat.com> + + * decl.c (grokdeclarator): Fix a typo in a comment. + +2017-01-25 Jakub Jelinek <jakub@redhat.com> + + PR c++/78896 + * decl.c (cp_finish_decomp): Disallow memberwise decomposition of + lambda expressions. + + PR c++/77914 + * parser.c (cp_parser_lambda_declarator_opt): Pedwarn with + OPT_Wpedantic on lambda templates for -std=c++14 and higher. + 2017-01-25 Maxim Ostapenko <m.ostapenko@samsung.com> PR lto/79061 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index af74dcd..44aefd8 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7562,6 +7562,11 @@ cp_finish_decomp (tree decl, tree first, unsigned int count) error_at (loc, "cannot decompose non-array non-class type %qT", type); goto error_out; } + else if (LAMBDA_TYPE_P (type)) + { + error_at (loc, "cannot decompose lambda closure type %qT", type); + goto error_out; + } else { tree btype = find_decomp_class_base (loc, type, NULL_TREE); @@ -11797,8 +11802,19 @@ grokdeclarator (const cp_declarator *declarator, error ("flexible array member in union"); type = error_mark_node; } - else + else { + /* Array is a flexible member. */ + if (in_system_header_at (input_location)) + /* Do not warn on flexible array members in system + headers because glibc uses them. */; + else if (name) + pedwarn (input_location, OPT_Wpedantic, + "ISO C++ forbids flexible array member %<%s%>", name); + else + pedwarn (input_location, OPT_Wpedantic, + "ISO C++ forbids flexible array members"); + /* Flexible array member has a null domain. */ type = build_cplus_array_type (TREE_TYPE (type), NULL_TREE); } diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0a4c567..a9a1d22 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1816,6 +1816,14 @@ vague_linkage_p (tree decl) { if (!TREE_PUBLIC (decl)) { + /* maybe_thunk_body clears TREE_PUBLIC on the maybe-in-charge 'tor + variants, check one of the "clones" for the real linkage. */ + if ((DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl) + || DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)) + && DECL_CHAIN (decl) + && DECL_CLONED_FUNCTION (DECL_CHAIN (decl))) + return vague_linkage_p (DECL_CHAIN (decl)); + gcc_checking_assert (!DECL_COMDAT (decl)); return false; } diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 4004640..10fb540 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -4125,6 +4125,8 @@ parse_using_directive (tree name_space, tree attribs) tree name = get_attribute_name (a); if (is_attribute_p ("strong", name)) { + warning (OPT_Wdeprecated, "strong using is deprecated; use inline " + "namespaces instead"); if (!toplevel_bindings_p ()) error ("strong using only meaningful at namespace scope"); else if (name_space != error_mark_node) diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 4ab0b69..372a01e 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10174,6 +10174,9 @@ cp_parser_lambda_declarator_opt (cp_parser* parser, tree lambda_expr) pedwarn (parser->lexer->next_token->location, 0, "lambda templates are only available with " "-std=c++14 or -std=gnu++14"); + else + pedwarn (parser->lexer->next_token->location, OPT_Wpedantic, + "ISO C++ does not support lambda templates"); cp_lexer_consume_token (parser->lexer); diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 6fbc99e..3ecc2b0 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -4418,6 +4418,14 @@ decl_linkage (tree decl) if (TREE_PUBLIC (decl)) return lk_external; + /* maybe_thunk_body clears TREE_PUBLIC on the maybe-in-charge 'tor variants, + check one of the "clones" for the real linkage. */ + if ((DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (decl) + || DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (decl)) + && DECL_CHAIN (decl) + && DECL_CLONED_FUNCTION (DECL_CHAIN (decl))) + return decl_linkage (DECL_CHAIN (decl)); + if (TREE_CODE (decl) == NAMESPACE_DECL) return lk_external; diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 5cb4748..20eba82 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -21802,7 +21802,6 @@ Predefined Macros,cpp,The GNU C Preprocessor}). method denoted by a @samp{->*} or @samp{.*} expression. * C++ Attributes:: Variable, function, and type attributes for C++ only. * Function Multiversioning:: Declaring multiple function versions. -* Namespace Association:: Strong using-directives for namespace association. * Type Traits:: Compiler support for type traits. * C++ Concepts:: Improved support for generic programming. * Deprecated Features:: Things will disappear from G++. @@ -22368,8 +22367,6 @@ does not have constructors or destructors. @end table -See also @ref{Namespace Association}. - @node Function Multiversioning @section Function Multiversioning @cindex function versions @@ -22428,51 +22425,6 @@ dispatching to call the right version at runtime. Refer to the @uref{http://gcc.gnu.org/wiki/FunctionMultiVersioning, GCC wiki on Function Multiversioning} for more details. -@node Namespace Association -@section Namespace Association - -@strong{Caution:} The semantics of this extension are equivalent -to C++ 2011 inline namespaces. Users should use inline namespaces -instead as this extension will be removed in future versions of G++. - -A using-directive with @code{__attribute ((strong))} is stronger -than a normal using-directive in two ways: - -@itemize @bullet -@item -Templates from the used namespace can be specialized and explicitly -instantiated as though they were members of the using namespace. - -@item -The using namespace is considered an associated namespace of all -templates in the used namespace for purposes of argument-dependent -name lookup. -@end itemize - -The used namespace must be nested within the using namespace so that -normal unqualified lookup works properly. - -This is useful for composing a namespace transparently from -implementation namespaces. For example: - -@smallexample -namespace std @{ - namespace debug @{ - template <class T> struct A @{ @}; - @} - using namespace debug __attribute ((__strong__)); - template <> struct A<int> @{ @}; // @r{OK to specialize} - - template <class T> void f (A<T>); -@} - -int main() -@{ - f (std::A<float>()); // @r{lookup finds} std::f - f (std::A<int>()); -@} -@end smallexample - @node Type Traits @section Type Traits diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 5576d59..a8bb8af 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -3147,7 +3147,7 @@ operand_equal_p (const_tree arg0, const_tree arg1, unsigned int flags) TREE_OPERAND (arg1, 0), flags)); case COND_EXPR: - if (! OP_SAME (1) || ! OP_SAME (2)) + if (! OP_SAME (1) || ! OP_SAME_WITH_NULL (2)) return 0; flags &= ~OEP_ADDRESS_OF; return OP_SAME (0); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 61a1ba5..feb5fa0 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7152,7 +7152,7 @@ omp_notice_variable (struct gimplify_omp_ctx *ctx, tree decl, bool in_code) gcc_assert (DECL_P (t)); n2 = splay_tree_lookup (ctx->variables, (splay_tree_key) t); if (n2) - n2->value |= GOVD_SEEN; + omp_notice_variable (ctx, t, true); } } diff --git a/gcc/go/gofrontend/MERGE b/gcc/go/gofrontend/MERGE index 582a86b..7900e1a 100644 --- a/gcc/go/gofrontend/MERGE +++ b/gcc/go/gofrontend/MERGE @@ -1,4 +1,4 @@ -5c6c93f58e2aaae186bac5dcde9df1679d4896b1 +2c62d5223e814887801b1540162c72b90299d910 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. diff --git a/gcc/lra-assigns.c b/gcc/lra-assigns.c index 8e21a49..74a3195 100644 --- a/gcc/lra-assigns.c +++ b/gcc/lra-assigns.c @@ -1179,9 +1179,19 @@ setup_live_pseudos_and_spill_after_risky_transforms (bitmap /* If it is multi-register pseudos they should start on the same hard register. */ || hard_regno != reg_renumber[conflict_regno]) - add_to_hard_reg_set (&conflict_set, - lra_reg_info[conflict_regno].biggest_mode, - reg_renumber[conflict_regno]); + { + int conflict_hard_regno = reg_renumber[conflict_regno]; + machine_mode biggest_mode = lra_reg_info[conflict_regno].biggest_mode; + int biggest_nregs = hard_regno_nregs[conflict_hard_regno][biggest_mode]; + int nregs_diff = (biggest_nregs + - (hard_regno_nregs + [conflict_hard_regno] + [PSEUDO_REGNO_MODE (conflict_regno)])); + add_to_hard_reg_set (&conflict_set, + biggest_mode, + conflict_hard_regno + - (WORDS_BIG_ENDIAN ? nregs_diff : 0)); + } if (! overlaps_hard_reg_set_p (conflict_set, mode, hard_regno)) { update_lives (regno, false); diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 7b0d2f4..2586913 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -4511,7 +4511,10 @@ lra_constraints (bool first_p) && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER) lra_risky_transformations_p = true; else - lra_risky_transformations_p = false; + /* On the first iteration we should check IRA assignment + correctness. In rare cases, the assignments can be wrong as + early clobbers operands are ignored in IRA. */ + lra_risky_transformations_p = first_p; new_insn_uid_start = get_max_uid (); new_regno_start = first_p ? lra_constraint_new_regno_start : max_reg_num (); /* Mark used hard regs for target stack size calulations. */ diff --git a/gcc/lra-lives.c b/gcc/lra-lives.c index 010d4e6..f019438 100644 --- a/gcc/lra-lives.c +++ b/gcc/lra-lives.c @@ -560,10 +560,11 @@ lra_setup_reload_pseudo_preferenced_hard_reg (int regno, } /* Check that REGNO living through calls and setjumps, set up conflict - regs, and clear corresponding bits in PSEUDOS_LIVE_THROUGH_CALLS and - PSEUDOS_LIVE_THROUGH_SETJUMPS. */ + regs using LAST_CALL_USED_REG_SET, and clear corresponding bits in + PSEUDOS_LIVE_THROUGH_CALLS and PSEUDOS_LIVE_THROUGH_SETJUMPS. */ static inline void -check_pseudos_live_through_calls (int regno) +check_pseudos_live_through_calls (int regno, + HARD_REG_SET last_call_used_reg_set) { int hr; @@ -571,7 +572,7 @@ check_pseudos_live_through_calls (int regno) return; sparseset_clear_bit (pseudos_live_through_calls, regno); IOR_HARD_REG_SET (lra_reg_info[regno].conflict_hard_regs, - call_used_reg_set); + last_call_used_reg_set); for (hr = 0; hr < FIRST_PSEUDO_REGISTER; hr++) if (HARD_REGNO_CALL_PART_CLOBBERED (hr, PSEUDO_REGNO_MODE (regno))) @@ -604,11 +605,13 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) rtx_insn *next; rtx link, *link_loc; bool need_curr_point_incr; - + HARD_REG_SET last_call_used_reg_set; + reg_live_out = df_get_live_out (bb); sparseset_clear (pseudos_live); sparseset_clear (pseudos_live_through_calls); sparseset_clear (pseudos_live_through_setjumps); + CLEAR_HARD_REG_SET (last_call_used_reg_set); REG_SET_TO_HARD_REG_SET (hard_regs_live, reg_live_out); AND_COMPL_HARD_REG_SET (hard_regs_live, eliminable_regset); EXECUTE_IF_SET_IN_BITMAP (reg_live_out, FIRST_PSEUDO_REGISTER, j, bi) @@ -795,7 +798,8 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) need_curr_point_incr |= mark_regno_live (reg->regno, reg->biggest_mode, curr_point); - check_pseudos_live_through_calls (reg->regno); + check_pseudos_live_through_calls (reg->regno, + last_call_used_reg_set); } for (reg = curr_static_id->hard_regs; reg != NULL; reg = reg->next) @@ -831,15 +835,27 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) if (call_p) { - if (flag_ipa_ra) + if (! flag_ipa_ra) + COPY_HARD_REG_SET(last_call_used_reg_set, call_used_reg_set); + else { HARD_REG_SET this_call_used_reg_set; get_call_reg_set_usage (curr_insn, &this_call_used_reg_set, call_used_reg_set); + bool flush = (! hard_reg_set_empty_p (last_call_used_reg_set) + && ! hard_reg_set_equal_p (last_call_used_reg_set, + this_call_used_reg_set)); + EXECUTE_IF_SET_IN_SPARSESET (pseudos_live, j) - IOR_HARD_REG_SET (lra_reg_info[j].actual_call_used_reg_set, - this_call_used_reg_set); + { + IOR_HARD_REG_SET (lra_reg_info[j].actual_call_used_reg_set, + this_call_used_reg_set); + if (flush) + check_pseudos_live_through_calls + (j, last_call_used_reg_set); + } + COPY_HARD_REG_SET(last_call_used_reg_set, this_call_used_reg_set); } sparseset_ior (pseudos_live_through_calls, @@ -866,7 +882,8 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) need_curr_point_incr |= mark_regno_live (reg->regno, reg->biggest_mode, curr_point); - check_pseudos_live_through_calls (reg->regno); + check_pseudos_live_through_calls (reg->regno, + last_call_used_reg_set); } for (reg = curr_static_id->hard_regs; reg != NULL; reg = reg->next) @@ -1009,7 +1026,7 @@ process_bb_lives (basic_block bb, int &curr_point, bool dead_insn_p) if (sparseset_cardinality (pseudos_live_through_calls) == 0) break; if (sparseset_bit_p (pseudos_live_through_calls, j)) - check_pseudos_live_through_calls (j); + check_pseudos_live_through_calls (j, last_call_used_reg_set); } if (need_curr_point_incr) @@ -2295,7 +2295,7 @@ void lra (FILE *f) { int i; - bool live_p, scratch_p, inserted_p; + bool live_p, inserted_p; lra_dump_file = f; @@ -2332,7 +2332,6 @@ lra (FILE *f) lra_constraint_new_regno_start = lra_new_regno_start = max_reg_num (); lra_bad_spill_regno_start = INT_MAX; remove_scratches (); - scratch_p = lra_constraint_new_regno_start != max_reg_num (); /* A function that has a non-local label that can reach the exit block via non-exceptional paths must save all call-saved @@ -2372,11 +2371,12 @@ lra (FILE *f) for (;;) { /* We should try to assign hard registers to scratches even - if there were no RTL transformations in - lra_constraints. */ + if there were no RTL transformations in lra_constraints. + Also we should check IRA assignments on the first + iteration as they can be wrong because of early clobbers + operands which are ignored in IRA. */ if (! lra_constraints (lra_constraint_iter == 0) - && (lra_constraint_iter > 1 - || (! scratch_p && ! caller_save_needed))) + && lra_constraint_iter > 1) break; /* Constraint transformations may result in that eliminable hard regs become uneliminable and pseudos which use them diff --git a/gcc/omp-low.c b/gcc/omp-low.c index 15209a3..ff0f447 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -108,6 +108,10 @@ struct omp_context barriers should jump to during omplower pass. */ tree cancel_label; + /* The sibling GIMPLE_OMP_FOR simd with _simt_ clause or NULL + otherwise. */ + gimple *simt_stmt; + /* What to do with variables with implicitly determined sharing attributes. */ enum omp_clause_default_kind default_kind; @@ -2127,7 +2131,7 @@ check_oacc_kernel_gwv (gomp_for *stmt, omp_context *ctx) /* Scan a GIMPLE_OMP_FOR. */ -static void +static omp_context * scan_omp_for (gomp_for *stmt, omp_context *outer_ctx) { omp_context *ctx; @@ -2200,6 +2204,7 @@ scan_omp_for (gomp_for *stmt, omp_context *outer_ctx) scan_omp_op (gimple_omp_for_incr_ptr (stmt, i), ctx); } scan_omp (gimple_omp_body_ptr (stmt), ctx); + return ctx; } /* Duplicate #pragma omp simd, one for SIMT, another one for SIMD. */ @@ -2241,7 +2246,7 @@ scan_omp_simd (gimple_stmt_iterator *gsi, gomp_for *stmt, gimple_bind_set_body (bind, seq); update_stmt (bind); scan_omp_for (new_stmt, outer_ctx); - scan_omp_for (stmt, outer_ctx); + scan_omp_for (stmt, outer_ctx)->simt_stmt = new_stmt; } /* Scan an OpenMP sections directive. */ @@ -6750,11 +6755,15 @@ lower_omp_for (gimple_stmt_iterator *gsi_p, omp_context *ctx) = (gimple_omp_for_kind (stmt) == GF_OMP_FOR_KIND_FOR || gimple_omp_for_kind (stmt) == GF_OMP_FOR_KIND_TASKLOOP); tree outerc = NULL, *pc = gimple_omp_for_clauses_ptr (stmt); + tree simtc = NULL; tree clauses = *pc; if (taskreg_for) outerc = omp_find_clause (gimple_omp_taskreg_clauses (ctx->outer->stmt), OMP_CLAUSE__LOOPTEMP_); + if (ctx->simt_stmt) + simtc = omp_find_clause (gimple_omp_for_clauses (ctx->simt_stmt), + OMP_CLAUSE__LOOPTEMP_); for (i = 0; i < count; i++) { tree temp; @@ -6767,12 +6776,22 @@ lower_omp_for (gimple_stmt_iterator *gsi_p, omp_context *ctx) } else { - temp = create_tmp_var (type); + /* If there are 2 adjacent SIMD stmts, one with _simt_ + clause, another without, make sure they have the same + decls in _looptemp_ clauses, because the outer stmt + they are combined into will look up just one inner_stmt. */ + if (ctx->simt_stmt) + temp = OMP_CLAUSE_DECL (simtc); + else + temp = create_tmp_var (type); insert_decl_map (&ctx->outer->cb, temp, temp); } *pc = build_omp_clause (UNKNOWN_LOCATION, OMP_CLAUSE__LOOPTEMP_); OMP_CLAUSE_DECL (*pc) = temp; pc = &OMP_CLAUSE_CHAIN (*pc); + if (ctx->simt_stmt) + simtc = omp_find_clause (OMP_CLAUSE_CHAIN (simtc), + OMP_CLAUSE__LOOPTEMP_); } *pc = clauses; } diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c index 063ef54..7bf007c 100644 --- a/gcc/reg-stack.c +++ b/gcc/reg-stack.c @@ -887,6 +887,77 @@ emit_swap_insn (rtx_insn *insn, stack_ptr regstack, rtx reg) && REG_P (i1src) && REGNO (i1src) == FIRST_STACK_REG && find_regno_note (i1, REG_DEAD, FIRST_STACK_REG) == NULL_RTX) return; + + /* Instead of + fld a + fld b + fxch %st(1) + just use + fld b + fld a + if possible. */ + + if (REG_P (i1dest) + && REGNO (i1dest) == FIRST_STACK_REG + && MEM_P (SET_SRC (i1set)) + && !side_effects_p (SET_SRC (i1set)) + && hard_regno == FIRST_STACK_REG + 1 + && i1 != BB_HEAD (current_block)) + { + /* i1 is the last insn that involves stack regs before insn, and + is known to be a load without other side-effects, i.e. fld b + in the above comment. */ + rtx_insn *i2 = NULL; + rtx i2set; + rtx_insn *tmp = PREV_INSN (i1); + rtx_insn *limit = PREV_INSN (BB_HEAD (current_block)); + /* Find the previous insn involving stack regs, but don't pass a + block boundary. */ + while (tmp != limit) + { + if (LABEL_P (tmp) + || CALL_P (tmp) + || NOTE_INSN_BASIC_BLOCK_P (tmp) + || (NONJUMP_INSN_P (tmp) + && stack_regs_mentioned (tmp))) + { + i2 = tmp; + break; + } + tmp = PREV_INSN (tmp); + } + if (i2 != NULL_RTX + && (i2set = single_set (i2)) != NULL_RTX) + { + rtx i2dest = *get_true_reg (&SET_DEST (i2set)); + /* If the last two insns before insn that involve + stack regs are loads, where the latter (i1) + pushes onto the register stack and thus + moves the value from the first load (i2) from + %st to %st(1), consider swapping them. */ + if (REG_P (i2dest) + && REGNO (i2dest) == FIRST_STACK_REG + && MEM_P (SET_SRC (i2set)) + /* Ensure i2 doesn't have other side-effects. */ + && !side_effects_p (SET_SRC (i2set)) + /* And that the two instructions can actually be + swapped, i.e. there shouldn't be any stores + in between i2 and i1 that might alias with + the i1 memory, and the memory address can't + use registers set in between i2 and i1. */ + && !modified_between_p (SET_SRC (i1set), i2, i1)) + { + /* Move i1 (fld b above) right before i2 (fld a + above. */ + remove_insn (i1); + SET_PREV_INSN (i1) = NULL_RTX; + SET_NEXT_INSN (i1) = NULL_RTX; + set_block_for_insn (i1, NULL); + emit_insn_before (i1, i2); + return; + } + } + } } /* Avoid emitting the swap if this is the first register stack insn diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9deb57d..876151b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,95 @@ +2017-01-26 David Edelsohn <dje.gcc@gmail.com> + + * g++.dg/opt/declone3.C: Require LTO. + +2017-01-26 Vladimir Makarov <vmakarov@redhat.com> + + PR target/79131 + * gcc.target/arm/pr79131.c: New. + +2017-01-26 Bin Cheng <bin.cheng@arm.com> + + * gcc.target/aarch64/ldp_vec_64_1.c: Xfail. + +2017-01-26 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/79190 + * g++.dg/cpp1z/aligned-new3.C: Replace operator new so behaviour + matches replaced operator delete. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + * gcc.target/i386/avx512f-kaddw-1.c: Renamed to ... + * gcc.target/i386/avx512dq-kaddw-1.c: ... this. New test. Replace + avx512f with avx512dq. + * gcc.target/i386/avx512f-ktestw-1.c: Renamed to ... + * gcc.target/i386/avx512dq-ktestw-1.c: ... this. New test. Replace + avx512f with avx512dq. + * gcc.target/i386/avx512f-ktestw-2.c: Renamed to ... + * gcc.target/i386/avx512dq-ktestw-2.c: ... this. New test. Replace + avx512f with avx512dq. + +2017-01-26 Marek Polacek <polacek@redhat.com> + + PR c/79199 + * c-c++-common/Wduplicated-branches-13.c: New test. + +2017-01-26 David Sherwood <david.sherwood@arm.com> + + PR middle-end/79212 + * gfortran.dg/gomp/sharing-4.f90: New test. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + PR target/70465 + * gcc.target/i386/pr70465.c: New test. + + * brig.dg/dg.exp: Update copyright years. + * lib/brig-dg.exp: Update copyright years. + * lib/brig.exp: Update copyright years. + +2017-01-25 Michael Meissner <meissner@linux.vnet.ibm.com> + + PR target/79179 + * gcc.target/powerpc/pr79179.c: New test. + +2017-01-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com> + + * gcc.target/powerpc/vsx-elemrev-4.c: Change expected code + generation to accept D-mode memory accesses. + +2017-01-25 Martin Sebor <msebor@redhat.com> + + PR c++/71290 + * g++.dg/ext/flexarray-mangle-2.C: Adjust. + * g++.dg/ext/flexarray-mangle.C: Same. + * g++.dg/ext/flexarray-subst.C: Same. + * g++.dg/ext/flexary10.C: Same. + * g++.dg/ext/flexary11.C: Same. + * g++.dg/ext/flexary14.C: Same. + * g++.dg/ext/flexary16.C: Same. + * g++.dg/ext/flexary18.C: Same. + * g++.dg/ext/flexary19.C: Same. + * g++.dg/ext/flexary7.C: Same. + * gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C: Same. + * gcc/testsuite/g++.dg/ubsan/object-size-1.C: Same. + * gcc/testsuite/obj-c++.dg/property/at-property-23.mm: Same. + +2017-01-25 Jakub Jelinek <jakub@redhat.com> + + PR c++/78896 + * g++.dg/cpp1z/decomp24.C: New test. + + PR c++/77914 + * g++.dg/cpp1y/lambda-generic-77914.C: New test. + * g++.dg/cpp1y/lambda-generic-dep.C: Add -pedantic to dg-options, + expect a warning. + * g++.dg/cpp1y/lambda-generic-x.C: Add -Wpedantic to dg-options, + expect warnings. + * g++.dg/cpp1y/lambda-generic-mixed.C: Add empty dg-options. + * g++.dg/cpp1y/pr59636.C: Likewise. + * g++.dg/cpp1y/pr60190.C: Likewise. + 2017-01-25 Bin Cheng <bin.cheng@arm.com> * gcc.dg/vect/vect-24.c: Remove xfail on ARM targets. diff --git a/gcc/testsuite/brig.dg/dg.exp b/gcc/testsuite/brig.dg/dg.exp index d4f37e6..c3c485c 100644 --- a/gcc/testsuite/brig.dg/dg.exp +++ b/gcc/testsuite/brig.dg/dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c b/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c new file mode 100644 index 0000000..7aa5b37 --- /dev/null +++ b/gcc/testsuite/c-c++-common/Wduplicated-branches-13.c @@ -0,0 +1,23 @@ +/* PR c/79199 */ +/* { dg-do compile } */ +/* { dg-options "-Wduplicated-branches" } */ + +unsigned int a, b, c, d, e; +void +fn1 (void) +{ + if (0) /* { dg-warning "this condition has identical branches" } */ + { + if (d > 4294967293) + (void) 5; + c = d; + b = e | a; + } + else + { + if (d > 4294967293) + (void) 5; + c = d; + b = e | a; + } +} diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-1.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns6.C index aa0c5f9..aa0c5f9 100644 --- a/gcc/testsuite/g++.dg/lookup/strong-using-1.C +++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns6.C diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-2.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns7.C index d9f99a8..d9f99a8 100644 --- a/gcc/testsuite/g++.dg/lookup/strong-using-2.C +++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns7.C diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-3.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns8.C index 7679c6f..7679c6f 100644 --- a/gcc/testsuite/g++.dg/lookup/strong-using-3.C +++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns8.C diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-5.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns9.C index 555adb0..555adb0 100644 --- a/gcc/testsuite/g++.dg/lookup/strong-using-5.C +++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns9.C diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-77914.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-77914.C new file mode 100644 index 0000000..d069c33 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-77914.C @@ -0,0 +1,9 @@ +// PR c++/77914 +// { dg-do compile { target c++14 } } + +int +main () +{ + auto l = [] <typename T> () {}; // { dg-error "does not support lambda templates" } + l.operator () <void> (); +} diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C index dbf8b70..c66d393 100644 --- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C @@ -1,5 +1,6 @@ // Generic lambda type dependence test part from N3690 5.1.2.12 // { dg-do compile { target c++14 } } +// { dg-options "-pedantic" } void f(int, const int (&)[2] = {}) { } // #1 void f(const int&, const int (&)[1]) { } // #2 @@ -26,7 +27,7 @@ struct S { int main() { - auto f = [] <typename T> (T const& s) mutable { + auto f = [] <typename T> (T const& s) mutable { // { dg-warning "does not support lambda templates" } typename T::N x; return x.test (); }; diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C index 59b5cca..aa96824 100644 --- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C @@ -1,5 +1,6 @@ // Mixed explicit and implicit generic lambda test. // { dg-do compile { target c++14 } } +// { dg-options "" } int main() { diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C index 5334091..b37a614 100644 --- a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C +++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C @@ -1,21 +1,22 @@ // Explicit generic lambda test from N3690 5.1.2.5 // { dg-do compile { target c++14 } } +// { dg-options "-Wpedantic" } #include <iostream> int main() { - auto glambda = [] <typename A, typename B> (A a, B&& b) { return a < b; }; + auto glambda = [] <typename A, typename B> (A a, B&& b) { return a < b; }; // { dg-warning "does not support lambda templates" } bool b = glambda(3, 3.14); // OK - auto vglambda = [] <typename P> (P printer) { + auto vglambda = [] <typename P> (P printer) { // { dg-warning "does not support lambda templates" } return [=] <typename... T> (T&& ... ts) { // OK: ts is a function parameter pack - printer(std::forward<decltype(ts)>(ts)...); + printer(std::forward<decltype(ts)>(ts)...); // { dg-warning "does not support lambda templates" "" { target *-*-* } .-1 } return [=]() { printer(ts ...); }; }; }; - auto p = vglambda( [] <typename A, + auto p = vglambda( [] <typename A, // { dg-warning "does not support lambda templates" } typename B, typename C> (A v1, B v2, C v3) { std::cout << v1 << v2 << v3; } ); diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59636.C b/gcc/testsuite/g++.dg/cpp1y/pr59636.C index 847cecd..271491e 100644 --- a/gcc/testsuite/g++.dg/cpp1y/pr59636.C +++ b/gcc/testsuite/g++.dg/cpp1y/pr59636.C @@ -1,4 +1,5 @@ // PR c++/59636 // { dg-do compile { target c++14 } } +// { dg-options "" } auto f = []() { return []<>() {}; }; // { dg-error "expected identifier" } diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60190.C b/gcc/testsuite/g++.dg/cpp1y/pr60190.C index 9e439ce..f2d1bbf 100644 --- a/gcc/testsuite/g++.dg/cpp1y/pr60190.C +++ b/gcc/testsuite/g++.dg/cpp1y/pr60190.C @@ -1,4 +1,5 @@ // PR c++/60190 // { dg-do compile { target c++14 } } +// { dg-options "" } auto f = []<int>() -> int() {}; // { dg-error "returning a function|expected" } diff --git a/gcc/testsuite/g++.dg/cpp1z/aligned-new3.C b/gcc/testsuite/g++.dg/cpp1z/aligned-new3.C index 73e3343..e50e62c 100644 --- a/gcc/testsuite/g++.dg/cpp1z/aligned-new3.C +++ b/gcc/testsuite/g++.dg/cpp1z/aligned-new3.C @@ -7,6 +7,11 @@ struct alignas(64) A { int i; }; +void* operator new (std::size_t n, std::align_val_t) +{ + return operator new (n); +} + bool deleted = false; void operator delete (void *p, std::size_t, std::align_val_t) { diff --git a/gcc/testsuite/g++.dg/cpp1z/decomp24.C b/gcc/testsuite/g++.dg/cpp1z/decomp24.C new file mode 100644 index 0000000..0e874fa --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/decomp24.C @@ -0,0 +1,11 @@ +// PR c++/78896 +// { dg-do compile { target c++11 } } +// { dg-options "" } + +int +foo () +{ + int a {10}; + auto [b] { [&a](){} }; // { dg-error "cannot decompose lambda closure type" } + return b - a; // { dg-warning "decomposition declaration only available with" "" { target c++14_down } .-1 } +} diff --git a/gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C b/gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C index 73d80bf..bca03a1 100644 --- a/gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C +++ b/gcc/testsuite/g++.dg/cpp1z/has-unique-obj-representations1.C @@ -1,4 +1,5 @@ // { dg-do compile { target c++11 } } +// { dg-additional-options "-Wno-error=pedantic" } #define INTB (__SIZEOF_INT__ * __CHAR_BIT__) struct S { int i : INTB * 3 / 4; S (); }; @@ -7,7 +8,9 @@ struct U { int i : INTB * 3 / 4; int j : INTB / 4; }; struct V { int i : INTB * 3 / 4; int j : INTB / 4 + 1; }; struct W {}; struct X : public W { int i; void bar (); }; -struct Y { char a[3]; char b[]; }; +struct Y { + char a[3]; char b[]; // { dg-warning "forbids flexible array member" } +}; struct Z { int a; float b; }; struct A { int i : INTB * 2; int j; }; // { dg-warning "exceeds its type" } union B { long a; unsigned long b; }; diff --git a/gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C b/gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C index 98bd5f5..3abb407 100644 --- a/gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C +++ b/gcc/testsuite/g++.dg/ext/flexarray-mangle-2.C @@ -1,9 +1,10 @@ // PR c++/69277 - [6 Regression] ICE mangling a flexible array member // { dg-do compile { target c++11 } } +// { dg-additional-options "-Wno-error=pedantic" } struct A { int n; - char a []; + char a[]; // { dg-warning "forbids flexible array member" } }; // Declare but do not define function templates. diff --git a/gcc/testsuite/g++.dg/ext/flexarray-mangle.C b/gcc/testsuite/g++.dg/ext/flexarray-mangle.C index d8a8c0a..658d935 100644 --- a/gcc/testsuite/g++.dg/ext/flexarray-mangle.C +++ b/gcc/testsuite/g++.dg/ext/flexarray-mangle.C @@ -1,9 +1,10 @@ // PR c++/69277 - [6 Regression] ICE mangling a flexible array member // { dg-do compile } +// { dg-additional-options "-Wno-error=pedantic" } struct A { int n; - char a []; + char a[]; // { dg-warning "forbids flexible array member" } }; // Declare but do not define function templates. diff --git a/gcc/testsuite/g++.dg/ext/flexarray-subst.C b/gcc/testsuite/g++.dg/ext/flexarray-subst.C index f644636..6cf03a4 100644 --- a/gcc/testsuite/g++.dg/ext/flexarray-subst.C +++ b/gcc/testsuite/g++.dg/ext/flexarray-subst.C @@ -1,8 +1,12 @@ // PR c++/69251 - [6 Regression] ICE (segmentation fault) in unify_array_domain // on i686-linux-gnu // { dg-do compile } +// { dg-additional-options "-Wno-error=pedantic" } -struct A { int n; char a[]; }; +struct A { + int n; + char a[]; // { dg-warning "forbids flexible array member" } +}; template <class> struct B; diff --git a/gcc/testsuite/g++.dg/ext/flexary10.C b/gcc/testsuite/g++.dg/ext/flexary10.C index f2868f3..4d1ff56 100644 --- a/gcc/testsuite/g++.dg/ext/flexary10.C +++ b/gcc/testsuite/g++.dg/ext/flexary10.C @@ -4,7 +4,7 @@ struct A { int n; - int a []; + int a[]; // { dg-warning "forbids flexible array member" } }; struct A foo (void) diff --git a/gcc/testsuite/g++.dg/ext/flexary11.C b/gcc/testsuite/g++.dg/ext/flexary11.C index 5bf774f..f958cc5 100644 --- a/gcc/testsuite/g++.dg/ext/flexary11.C +++ b/gcc/testsuite/g++.dg/ext/flexary11.C @@ -4,7 +4,7 @@ struct A { int n; - char a []; + char a[]; // { dg-error "forbids flexible array member" } }; void f () diff --git a/gcc/testsuite/g++.dg/ext/flexary14.C b/gcc/testsuite/g++.dg/ext/flexary14.C index 7365357..add150a 100644 --- a/gcc/testsuite/g++.dg/ext/flexary14.C +++ b/gcc/testsuite/g++.dg/ext/flexary14.C @@ -9,7 +9,9 @@ struct A<T[]> { typedef int X; }; template <class T> int foo (T&, typename A<T>::X = 0) { return 0; } -struct B { int n, a[]; }; +struct B { + int n, a[]; // { dg-error "forbids flexible array member" } +}; void bar (B *b) { diff --git a/gcc/testsuite/g++.dg/ext/flexary16.C b/gcc/testsuite/g++.dg/ext/flexary16.C index a3e040d..64a9f5d 100644 --- a/gcc/testsuite/g++.dg/ext/flexary16.C +++ b/gcc/testsuite/g++.dg/ext/flexary16.C @@ -1,6 +1,7 @@ // PR c++/71147 - [6 Regression] Flexible array member wrongly rejected // in template // { dg-do compile } +// { dg-options "-Wpedantic -Wno-error=pedantic" } template <typename> struct container @@ -11,7 +12,7 @@ struct container struct incomplete { int x; - elem array[]; + elem array[]; // { dg-warning "forbids flexible array member" } }; }; @@ -26,7 +27,7 @@ struct D: container<T> { struct S { int x; - typename container<T>::elem array[]; + typename container<T>::elem array[]; // { dg-warning "forbids flexible array member" } }; }; diff --git a/gcc/testsuite/g++.dg/ext/flexary18.C b/gcc/testsuite/g++.dg/ext/flexary18.C index 4353425..4ab864d 100644 --- a/gcc/testsuite/g++.dg/ext/flexary18.C +++ b/gcc/testsuite/g++.dg/ext/flexary18.C @@ -211,3 +211,5 @@ struct StructUnion9 { // { dg-message "in the definition" } b2; // { dg-warning "invalid use" } } a2; // { dg-message "next member" } }; + +// { dg-prune-output "forbids flexible array member" } diff --git a/gcc/testsuite/g++.dg/ext/flexary19.C b/gcc/testsuite/g++.dg/ext/flexary19.C index 27d08ec..5eaf11b 100644 --- a/gcc/testsuite/g++.dg/ext/flexary19.C +++ b/gcc/testsuite/g++.dg/ext/flexary19.C @@ -341,3 +341,4 @@ struct S35 typedef D D2; }; +// { dg-prune-output "forbids flexible array member" } diff --git a/gcc/testsuite/g++.dg/ext/flexary7.C b/gcc/testsuite/g++.dg/ext/flexary7.C index fdea4d4..1b22f21 100644 --- a/gcc/testsuite/g++.dg/ext/flexary7.C +++ b/gcc/testsuite/g++.dg/ext/flexary7.C @@ -5,7 +5,7 @@ struct FlexChar { int n; - char a[]; + char a[]; // { dg-warning "forbids flexible array member" } }; struct FlexChar ac = @@ -18,7 +18,7 @@ typedef __WCHAR_TYPE__ wchar_t; struct FlexWchar { int n; - wchar_t a[]; + wchar_t a[]; // { dg-warning "forbids flexible array member" } }; struct FlexWchar awc = @@ -27,7 +27,7 @@ struct FlexWchar awc = struct FlexInt { int n; - int a[]; + int a[]; // { dg-warning "forbids flexible array member" } }; // Verify that no warning is issued for the case when a flexible array @@ -48,7 +48,7 @@ struct FlexInt ai2 = template <class T> struct FlexT { int n; - T a[]; + T a[]; // { dg-warning "forbids flexible array member" } }; struct FlexT<char> atc = diff --git a/gcc/testsuite/g++.dg/ext/pr71290.C b/gcc/testsuite/g++.dg/ext/pr71290.C new file mode 100644 index 0000000..e782eb1 --- /dev/null +++ b/gcc/testsuite/g++.dg/ext/pr71290.C @@ -0,0 +1,17 @@ +// PR c++/71290 - [6/7 Regression] Flexible array member is not diagnosed +// with -pedantic + +// { dg-do compile }s +// { dg-options "-Wall -Wpedantic" } + +struct A +{ + int i; + int arr[]; // { dg-warning "forbids flexible array member .arr." } +}; + +template <class T> +struct B { + T n; + T a[]; // { dg-warning "forbids flexible array member .a." } +}; diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-4.C b/gcc/testsuite/g++.dg/lookup/strong-using-4.C deleted file mode 100644 index 5ea1784..0000000 --- a/gcc/testsuite/g++.dg/lookup/strong-using-4.C +++ /dev/null @@ -1,8 +0,0 @@ -// PR c++/16301 - -// { dg-do compile } - -namespace NS2 -{ - using namespace NS1 __attribute__ ((strong)); // { dg-error "" } -} diff --git a/gcc/testsuite/g++.dg/opt/declone3.C b/gcc/testsuite/g++.dg/opt/declone3.C new file mode 100644 index 0000000..26f3b52 --- /dev/null +++ b/gcc/testsuite/g++.dg/opt/declone3.C @@ -0,0 +1,17 @@ +// PR c++/79176 +// { dg-do compile { target c++11 } } +// { dg-require-effective-target lto } +// { dg-options "-flto -Os" } + +struct A {}; +struct Object { + virtual bool m_fn1(); + virtual ~Object(); +}; +struct Item : Object, virtual A { + ~Item() { + [] {}; + } + bool m_fn1(); +}; +bool Item::m_fn1() {} diff --git a/gcc/testsuite/g++.dg/ubsan/object-size-1.C b/gcc/testsuite/g++.dg/ubsan/object-size-1.C index e6cdefc..d2881d6 100644 --- a/gcc/testsuite/g++.dg/ubsan/object-size-1.C +++ b/gcc/testsuite/g++.dg/ubsan/object-size-1.C @@ -1,7 +1,10 @@ // { dg-do compile } // { dg-options "-Wpedantic -Wno-error=pedantic -fsanitize=undefined -fpermissive" } -struct T { int c; char d[]; }; +struct T +{ + int c; char d[]; // { dg-warning "forbids flexible array member" } +}; struct T t = { 1, "a" }; // { dg-warning "initialization of a flexible array member " } diff --git a/gcc/testsuite/gcc.target/aarch64/ldp_vec_64_1.c b/gcc/testsuite/gcc.target/aarch64/ldp_vec_64_1.c index 62213f3..59cf914 100644 --- a/gcc/testsuite/gcc.target/aarch64/ldp_vec_64_1.c +++ b/gcc/testsuite/gcc.target/aarch64/ldp_vec_64_1.c @@ -13,4 +13,6 @@ foo (int32x2_t *foo, int32x2_t *bar) foo[i] = bar[i] + bar[i + 1]; } -/* { dg-final { scan-assembler "ldp\td\[0-9\]+, d\[0-9\]" } } */ +/* Xfail for now since IVOPT doesn't choose [base+offset] addressing mode. + See PR79213. */ +/* { dg-final { scan-assembler "ldp\td\[0-9\]+, d\[0-9\]" { xfail *-*-* } } } */ diff --git a/gcc/testsuite/gcc.target/arm/pr79131.c b/gcc/testsuite/gcc.target/arm/pr79131.c new file mode 100644 index 0000000..3bd9e0f --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr79131.c @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mbig-endian" } */ + +long long a; +enum { NILFS_SEGMENT_USAGE_ACTIVE, NILFS_SEGMENT_USAGE_DIRTY } b; +void nilfs_sufile_mod_counter(long long p1) { + long c = p1; + unsigned d = __builtin_bswap64(a); + a = __builtin_bswap64(d + c); +} +void nilfs_sufile_do_free() { + int e, f; + e = __builtin_bswap32(b) & 1 << NILFS_SEGMENT_USAGE_DIRTY; + f = e; + nilfs_sufile_mod_counter(f ? -1 : 0); +} diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-kshiftlq-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-kshiftlq-2.c index 4dabb4a..f578625 100644 --- a/gcc/testsuite/gcc.target/i386/avx512bw-kshiftlq-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512bw-kshiftlq-2.c @@ -11,6 +11,6 @@ avx512bw_test () unsigned int i = 53; volatile __mmask64 r = _kshiftli_mask64 (k1, i); - if (r != 1 << i) + if (r != 1ULL << i) abort (); } diff --git a/gcc/testsuite/gcc.target/i386/avx512bw-kshiftrq-2.c b/gcc/testsuite/gcc.target/i386/avx512bw-kshiftrq-2.c index 655f926..c6ba0b2 100644 --- a/gcc/testsuite/gcc.target/i386/avx512bw-kshiftrq-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512bw-kshiftrq-2.c @@ -1,3 +1,4 @@ + /* { dg-do run } */ /* { dg-options "-O2 -mavx512bw" } */ /* { dg-require-effective-target avx512bw } */ @@ -8,7 +9,7 @@ void avx512bw_test () { unsigned int i = 53; - __mmask64 k1 = 1 << i; + __mmask64 k1 = 1ULL << i; volatile __mmask64 r = _kshiftri_mask64 (k1, i); if (r != 1) diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kaddw-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-kaddw-1.c index 957a395..86d92b9 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-kaddw-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-kaddw-1.c @@ -1,11 +1,11 @@ /* { dg-do compile } */ -/* { dg-options "-mavx512f -O2" } */ +/* { dg-options "-mavx512dq -O2" } */ /* { dg-final { scan-assembler-times "kaddw\[ \\t\]+\[^\{\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 1 } } */ #include <immintrin.h> void -avx512f_test () +avx512dq_test () { __mmask16 k = _kadd_mask16 (11, 12); asm volatile ("" : "+k" (k)); diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ktestw-1.c b/gcc/testsuite/gcc.target/i386/avx512dq-ktestw-1.c index f6151d1..5394604 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-ktestw-1.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-ktestw-1.c @@ -1,11 +1,11 @@ /* { dg-do compile } */ -/* { dg-options "-O0 -mavx512f" } */ +/* { dg-options "-O0 -mavx512dq" } */ /* { dg-final { scan-assembler-times "ktestw\[ \\t\]+\[^\{\n\]*%k\[0-7\](?:\n|\[ \\t\]+#)" 2 } } */ #include <immintrin.h> void -avx512f_test () { +avx512dq_test () { volatile __mmask16 k1; __mmask16 k2; diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ktestw-2.c b/gcc/testsuite/gcc.target/i386/avx512dq-ktestw-2.c index 6602c7a..fcc0cf4 100644 --- a/gcc/testsuite/gcc.target/i386/avx512f-ktestw-2.c +++ b/gcc/testsuite/gcc.target/i386/avx512dq-ktestw-2.c @@ -1,11 +1,11 @@ /* { dg-do run } */ -/* { dg-options "-O2 -mavx512f" } */ -/* { dg-require-effective-target avx512f } */ +/* { dg-options "-O2 -mavx512dq" } */ +/* { dg-require-effective-target avx512dq } */ -#include "avx512f-check.h" +#include "avx512dq-check.h" void -avx512f_test () +avx512dq_test () { volatile __mmask16 k1, k2; unsigned char r1, r2; diff --git a/gcc/testsuite/gcc.target/i386/pr70465.c b/gcc/testsuite/gcc.target/i386/pr70465.c new file mode 100644 index 0000000..2d45e1b --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr70465.c @@ -0,0 +1,12 @@ +/* PR target/70465 */ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -mfpmath=387 -fomit-frame-pointer" } */ +/* { dg-final { scan-assembler-not "fxch\t%st.1" } } */ + +double +atan2 (double y, double x) +{ + double res = 0.0; + asm ("fpatan" : "=t" (res) : "u" (y), "0" (x) : "st(1)"); + return res; +} diff --git a/gcc/testsuite/gcc.target/powerpc/pr79179.c b/gcc/testsuite/gcc.target/powerpc/pr79179.c new file mode 100644 index 0000000..0815a2e --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/pr79179.c @@ -0,0 +1,23 @@ +/* { dg-do assemble { target { powerpc*-*-* && lp64 } } } */ +/* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ +/* { dg-require-effective-target powerpc_p9vector_ok } */ +/* { dg-options "-mcpu=power9 -O3" } */ + +/* Compile with -O3 -mcpu=power9. It originally generated + + stxsd 12,1(9) + + which is illegal. */ + +#pragma pack(1) +struct { + signed : 1; + unsigned long a; +} b; + +void c(void) +{ + b.a = 0; + for (; b.a <= 45; b.a = (long)b.a + 1) + ; +} diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c b/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c index a116316..f409463 100644 --- a/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c +++ b/gcc/testsuite/gcc.target/powerpc/vsx-elemrev-4.c @@ -3,8 +3,11 @@ /* { dg-options "-mcpu=power9 -O0" } */ /* { dg-require-effective-target powerpc_p9vector_ok } */ /* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */ -/* { dg-final { scan-assembler-times "lxvx" 40 } } */ -/* { dg-final { scan-assembler-times "stxvx" 40 } } */ + +/* Following will match either lxv or lxvx, either stxv or stxvx. + This is purposeful as either is fine. */ +/* { dg-final { scan-assembler-times "lxv" 40 } } */ +/* { dg-final { scan-assembler-times "stxv" 40 } } */ #include <altivec.h> diff --git a/gcc/testsuite/gfortran.dg/gomp/sharing-4.f90 b/gcc/testsuite/gfortran.dg/gomp/sharing-4.f90 new file mode 100644 index 0000000..05640df --- /dev/null +++ b/gcc/testsuite/gfortran.dg/gomp/sharing-4.f90 @@ -0,0 +1,24 @@ +! { dg-do compile } +! { dg-options "-fopenmp" } + +subroutine foo (v, n, r) + integer :: n + integer, intent(in) :: v(:) + integer, intent(out) :: r + integer :: i + + r = 0 + +!$omp parallel +!$omp single + + do i = 1, n +!$omp task shared (v) + r = r + v(i) +!$omp end task + enddo + +!$omp end single +!$omp end parallel + +end diff --git a/gcc/testsuite/lib/brig-dg.exp b/gcc/testsuite/lib/brig-dg.exp index ee96708..b69e48a 100644 --- a/gcc/testsuite/lib/brig-dg.exp +++ b/gcc/testsuite/lib/brig-dg.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2014 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/lib/brig.exp b/gcc/testsuite/lib/brig.exp index d1c967d..75b7ee9 100644 --- a/gcc/testsuite/lib/brig.exp +++ b/gcc/testsuite/lib/brig.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009-2016 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by diff --git a/gcc/testsuite/obj-c++.dg/property/at-property-23.mm b/gcc/testsuite/obj-c++.dg/property/at-property-23.mm index 035cc8b..0edb37b 100644 --- a/gcc/testsuite/obj-c++.dg/property/at-property-23.mm +++ b/gcc/testsuite/obj-c++.dg/property/at-property-23.mm @@ -14,4 +14,6 @@ @property int a[8]; /* { dg-error "property can not be an array" } */ @property int b:8; /* { dg-error "expected" } */ @property int c[]; /* { dg-error "property can not be an array" } */ +/* { dg-error "forbids flexible array member" "flexible array member" { target \ +*-*-* } .-1 } */ @end diff --git a/libgo/go/runtime/signal_unix.go b/libgo/go/runtime/signal_unix.go index cd6f3fb..13b7930 100644 --- a/libgo/go/runtime/signal_unix.go +++ b/libgo/go/runtime/signal_unix.go @@ -66,6 +66,11 @@ var signalsOK bool //go:nosplit //go:nowritebarrierrec func initsig(preinit bool) { + if preinit { + // preinit is only passed as true if isarchive should be true. + isarchive = true + } + if !preinit { // It's now OK for signal handlers to run. signalsOK = true diff --git a/libgo/runtime/proc.c b/libgo/runtime/proc.c index 60d5bdb..06a9c2a 100644 --- a/libgo/runtime/proc.c +++ b/libgo/runtime/proc.c @@ -631,7 +631,7 @@ void getTraceback(G* me, G* gp) #ifdef USING_SPLIT_STACK __splitstack_getcontext(&me->stackcontext[0]); #endif - getcontext(ucontext_arg(&me->stackcontext[0])); + getcontext(ucontext_arg(&me->context[0])); if (gp->traceback != nil) { runtime_gogo(gp); diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index be6a13a..b10ed35 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,4 +1,9 @@ -2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + * testsuite/libgomp.fortran/declare-simd-4.f90: Add cleanup-modules + directive. + +2017-01-24 Pekka Jääskeläinen <pekka@parmance.com> Martin Jambor <mjambor@suse.cz> * plugin/hsa.h: Moved to top level include. diff --git a/libgomp/testsuite/libgomp.fortran/declare-simd-4.f90 b/libgomp/testsuite/libgomp.fortran/declare-simd-4.f90 index bfdf9cf..1827f3f 100644 --- a/libgomp/testsuite/libgomp.fortran/declare-simd-4.f90 +++ b/libgomp/testsuite/libgomp.fortran/declare-simd-4.f90 @@ -3,5 +3,6 @@ ! { dg-additional-sources declare-simd-3.f90 } ! { dg-additional-options "-msse2" { target sse2_runtime } } ! { dg-additional-options "-mavx" { target avx_runtime } } +! { dg-final { cleanup-modules "declare_simd_2_mod" } } include 'declare-simd-2.f90' diff --git a/libhsail-rt/ChangeLog b/libhsail-rt/ChangeLog index 0184c24..b986286 100644 --- a/libhsail-rt/ChangeLog +++ b/libhsail-rt/ChangeLog @@ -1,3 +1,7 @@ +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + Update copyright years. + 2017-01-25 Thomas Schwinge <thomas@codesourcery.com> * config.h.in: Remove stale file. diff --git a/libhsail-rt/include/internal/fibers.h b/libhsail-rt/include/internal/fibers.h index 033146c..ab19df3 100644 --- a/libhsail-rt/include/internal/fibers.h +++ b/libhsail-rt/include/internal/fibers.h @@ -1,5 +1,5 @@ /* fibers.h -- an extremely simple lightweight thread (fiber) implementation - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/include/internal/phsa-queue-interface.h b/libhsail-rt/include/internal/phsa-queue-interface.h index 646cee4..a78f566 100644 --- a/libhsail-rt/include/internal/phsa-queue-interface.h +++ b/libhsail-rt/include/internal/phsa-queue-interface.h @@ -2,7 +2,7 @@ representation of a user mode queue to be used with the phsa/gccbrig implementation. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/include/internal/phsa-rt.h b/libhsail-rt/include/internal/phsa-rt.h index 40813cb..d47cbfcd 100644 --- a/libhsail-rt/include/internal/phsa-rt.h +++ b/libhsail-rt/include/internal/phsa-rt.h @@ -1,7 +1,7 @@ /* phsa-rt.h -- Data structures and functions of the PHSA device side runtime scheduler, and HSAIL built-ins. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/include/internal/workitems.h b/libhsail-rt/include/internal/workitems.h index 6c96b2e..e7d386d 100644 --- a/libhsail-rt/include/internal/workitems.h +++ b/libhsail-rt/include/internal/workitems.h @@ -1,7 +1,7 @@ /* workitems.h -- Types for context data passed as hidden parameters to special built-ins. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/arithmetic.c b/libhsail-rt/rt/arithmetic.c index 6749752..369addc 100644 --- a/libhsail-rt/rt/arithmetic.c +++ b/libhsail-rt/rt/arithmetic.c @@ -1,7 +1,7 @@ /* arithmetic.c -- Builtins for HSAIL arithmetic instructions for which there is no feasible direct gcc GENERIC expression. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/atomics.c b/libhsail-rt/rt/atomics.c index 04f02f0..2fabed1 100644 --- a/libhsail-rt/rt/atomics.c +++ b/libhsail-rt/rt/atomics.c @@ -1,7 +1,7 @@ /* atomic.c -- Builtins for HSAIL atomic instructions for which there is no feasible direct gcc GENERIC expression. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/bitstring.c b/libhsail-rt/rt/bitstring.c index 44d9b0a..559e29e 100644 --- a/libhsail-rt/rt/bitstring.c +++ b/libhsail-rt/rt/bitstring.c @@ -1,6 +1,6 @@ /* bitstring.c -- Builtins for HSAIL bitstring instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/fbarrier.c b/libhsail-rt/rt/fbarrier.c index 608cec9..7d756ac 100644 --- a/libhsail-rt/rt/fbarrier.c +++ b/libhsail-rt/rt/fbarrier.c @@ -1,6 +1,6 @@ /* fbarrier.c -- HSAIL fbarrier built-ins. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/fibers.c b/libhsail-rt/rt/fibers.c index a3056a9..8650623 100644 --- a/libhsail-rt/rt/fibers.c +++ b/libhsail-rt/rt/fibers.c @@ -1,9 +1,9 @@ /* fibers.c -- extremely simple lightweight thread (fiber) implementation - Copyright (C) 2016 Free Software Foundation, Inc. + Copyright (C) 2016-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/fp16.c b/libhsail-rt/rt/fp16.c index 01cb1e0..887b700 100644 --- a/libhsail-rt/rt/fp16.c +++ b/libhsail-rt/rt/fp16.c @@ -1,7 +1,7 @@ /* Half-float conversion routines. Code mostly borrowed from the ARM's builtin function. - Copyright (C) 2008-2015 Free Software Foundation, Inc. + Copyright (C) 2008-2017 Free Software Foundation, Inc. Contributed by CodeSourcery. This file is free software; you can redistribute it and/or modify it diff --git a/libhsail-rt/rt/misc.c b/libhsail-rt/rt/misc.c index 547734e..1699f6d 100644 --- a/libhsail-rt/rt/misc.c +++ b/libhsail-rt/rt/misc.c @@ -1,6 +1,6 @@ /* misc.c -- Builtins for HSAIL misc instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/multimedia.c b/libhsail-rt/rt/multimedia.c index 31125ed..bd6927a 100644 --- a/libhsail-rt/rt/multimedia.c +++ b/libhsail-rt/rt/multimedia.c @@ -1,6 +1,6 @@ /* multimedia.c -- Builtins for HSAIL multimedia instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/queue.c b/libhsail-rt/rt/queue.c index 3d7ff76..7a3e901 100644 --- a/libhsail-rt/rt/queue.c +++ b/libhsail-rt/rt/queue.c @@ -1,6 +1,6 @@ /* queue.c -- Builtins for HSAIL queue related instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/sat_arithmetic.c b/libhsail-rt/rt/sat_arithmetic.c index 3e40245..71d86af 100644 --- a/libhsail-rt/rt/sat_arithmetic.c +++ b/libhsail-rt/rt/sat_arithmetic.c @@ -1,6 +1,6 @@ /* sat_arithmetic.c -- Builtins for HSAIL saturating arithmetic instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/segment.c b/libhsail-rt/rt/segment.c index a1d2c84..5a95a99 100644 --- a/libhsail-rt/rt/segment.c +++ b/libhsail-rt/rt/segment.c @@ -1,6 +1,6 @@ /* segment.c -- Builtins for HSAIL segment related instructions. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libhsail-rt/rt/workitems.c b/libhsail-rt/rt/workitems.c index 80bcadd..d500e64 100644 --- a/libhsail-rt/rt/workitems.c +++ b/libhsail-rt/rt/workitems.c @@ -2,7 +2,7 @@ various ways and the builtin functions closely related to the implementation. - Copyright (C) 2015-2016 Free Software Foundation, Inc. + Copyright (C) 2015-2017 Free Software Foundation, Inc. Contributed by Pekka Jaaskelainen <pekka.jaaskelainen@parmance.com> for General Processor Tech. diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 41b5d78..1428ffe 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,37 @@ +2017-01-26 Jonathan Wakely <jwakely@redhat.com> + + PR libstdc++/79243 + * include/bits/c++config (literals::string_view_literals::__7): Add. + Only declare versioned namespaces for the relevant C++ dialects. + * include/experimental/bits/erase_if.h (fundamentals_v2::__detail): + Add versioning macros. + * include/experimental/bits/lfts_config.h: + (fundamentals_v1::__detail::__7, fundamentals_v2::__detail::__7): Add. + * include/experimental/string_view (fundamentals_v2::__detail): + Add versioning macros. + (fundamentals_v2::__detail::__identity): Remove. + (fundamentals_v2::__detail::__idt): Use common_type instead of + __detail::__identity. + * include/std/string_view (__detail::__identity, __detail::__idt): + Likewise. + (literals::string_view_literals): Fix nesting of versioning macros. + + PR libstdc++/79190 + * libsupc++/del_opa.cc (operator delete(void*, std::align_val_t)) + [!_GLIBCXX_HAVE_ALIGNED_ALLOC && !_GLIBCXX_HAVE_POSIX_MEMALIGN + && !_GLIBCXX_HAVE_MEMALIGN && !_GLIBCXX_HAVE__ALIGNED_MALLOC]: + Retrieve original pointer value allocated by malloc. + * libsupc++/new_opa.cc [!_GLIBCXX_HAVE_ALIGNED_ALLOC + && !_GLIBCXX_HAVE_POSIX_MEMALIGN && !_GLIBCXX_HAVE_MEMALIGN + && !_GLIBCXX_HAVE__ALIGNED_MALLOC] (aligned_alloc(size_t, size_t)): + Define, adjusting pointer value allocated by malloc and storing for + retrieval by operator delete. + +2017-01-26 Jakub Jelinek <jakub@redhat.com> + + * libsupc++/eh_atomics.h: Update copyright years. + * testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years. + 2017-01-25 Jonathan Wakely <jwakely@redhat.com> PR libstdc++/61791 diff --git a/libstdc++-v3/doc/html/manual/debug_mode_design.html b/libstdc++-v3/doc/html/manual/debug_mode_design.html index 3373471..3fcdb2d 100644 --- a/libstdc++-v3/doc/html/manual/debug_mode_design.html +++ b/libstdc++-v3/doc/html/manual/debug_mode_design.html @@ -250,7 +250,6 @@ namespace std }; } // namespace __cxx1998 - // namespace __debug __attribute__ ((strong)); inline namespace __debug { } } </pre></div><div class="section"><div class="titlepage"><div><div><h5 class="title"><a id="methods.coexistence.link"></a>Link- and run-time coexistence of release- and diff --git a/libstdc++-v3/doc/xml/manual/debug_mode.xml b/libstdc++-v3/doc/xml/manual/debug_mode.xml index ff2f1cc..9e97a1d 100644 --- a/libstdc++-v3/doc/xml/manual/debug_mode.xml +++ b/libstdc++-v3/doc/xml/manual/debug_mode.xml @@ -656,7 +656,6 @@ namespace std }; } // namespace __cxx1998 - // namespace __debug __attribute__ ((strong)); inline namespace __debug { } } </programlisting> diff --git a/libstdc++-v3/include/bits/c++config b/libstdc++-v3/include/bits/c++config index bc1ab5f..3b694e0 100644 --- a/libstdc++-v3/include/bits/c++config +++ b/libstdc++-v3/include/bits/c++config @@ -179,7 +179,9 @@ namespace __profile { } namespace __cxx1998 { } - namespace __detail { } + namespace __detail { + namespace __variant { } // C++17 + } namespace rel_ops { } @@ -194,14 +196,15 @@ namespace decimal { } - namespace chrono { } - namespace placeholders { } - namespace regex_constants { } - namespace this_thread { } - inline namespace literals { - inline namespace chrono_literals { } - inline namespace complex_literals { } - inline namespace string_literals { } + namespace chrono { } // C++11 + namespace placeholders { } // C++11 + namespace regex_constants { } // C++11 + namespace this_thread { } // C++11 + inline namespace literals { // C++14 + inline namespace chrono_literals { } // C++14 + inline namespace complex_literals { } // C++14 + inline namespace string_literals { } // C++14 + inline namespace string_view_literals { } // C++17 } } @@ -282,20 +285,29 @@ namespace std namespace decimal { inline namespace __7 { } } +#if __cplusplus >= 201103L namespace chrono { inline namespace __7 { } } namespace placeholders { inline namespace __7 { } } namespace regex_constants { inline namespace __7 { } } namespace this_thread { inline namespace __7 { } } +#if __cplusplus >= 201402L inline namespace literals { inline namespace chrono_literals { inline namespace __7 { } } inline namespace complex_literals { inline namespace __7 { } } inline namespace string_literals { inline namespace __7 { } } +#if __cplusplus > 201402L + inline namespace string_view_literals { inline namespace __7 { } } +#endif // C++17 } +#endif // C++14 +#endif // C++11 namespace __detail { inline namespace __7 { } +#if __cplusplus > 201402L namespace __variant { inline namespace __7 { } } +#endif } } diff --git a/libstdc++-v3/include/experimental/bits/erase_if.h b/libstdc++-v3/include/experimental/bits/erase_if.h index c4ac282..7dc47db 100644 --- a/libstdc++-v3/include/experimental/bits/erase_if.h +++ b/libstdc++-v3/include/experimental/bits/erase_if.h @@ -43,9 +43,9 @@ namespace experimental { inline namespace fundamentals_v2 { - namespace __detail { +_GLIBCXX_BEGIN_NAMESPACE_VERSION template<typename _Container, typename _Predicate> void __erase_nodes_if(_Container& __cont, _Predicate __pred) @@ -59,9 +59,8 @@ inline namespace fundamentals_v2 ++__iter; } } - } - - +_GLIBCXX_END_NAMESPACE_VERSION + } // namespace __detail } // inline namespace fundamentals_v2 } // namespace experimental } // namespace std diff --git a/libstdc++-v3/include/experimental/bits/lfts_config.h b/libstdc++-v3/include/experimental/bits/lfts_config.h index 97f090f..a9faa47 100644 --- a/libstdc++-v3/include/experimental/bits/lfts_config.h +++ b/libstdc++-v3/include/experimental/bits/lfts_config.h @@ -46,10 +46,14 @@ inline namespace fundamentals_v2 { inline namespace __7 { } } namespace experimental { -inline namespace fundamentals_v1 { inline namespace __7 { } } +inline namespace fundamentals_v1 { + inline namespace __7 { } + namespace __detail { inline namespace __7 { } } +} inline namespace fundamentals_v2 { inline namespace __7 { } namespace pmr { inline namespace __7 { } } + namespace __detail { inline namespace __7 { } } } // namespace fundamentals_v2 inline namespace literals { inline namespace string_view_literals { inline namespace __7 { } diff --git a/libstdc++-v3/include/experimental/string_view b/libstdc++-v3/include/experimental/string_view index 2a2364c..bd212ac 100644 --- a/libstdc++-v3/include/experimental/string_view +++ b/libstdc++-v3/include/experimental/string_view @@ -434,24 +434,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION const _CharT* _M_str; }; +_GLIBCXX_END_NAMESPACE_VERSION // [string.view.comparison], non-member basic_string_view comparison functions namespace __detail { - // Identity transform to make ADL work with just one argument. - // See n3766.html. - template<typename _Tp = void> - struct __identity - { typedef _Tp type; }; - - template<> - struct __identity<void>; - +_GLIBCXX_BEGIN_NAMESPACE_VERSION + // Identity transform to create a non-deduced context, so that only one + // argument participates in template argument deduction and the other + // argument gets implicitly converted to the deduced type. See n3766.html. template<typename _Tp> - using __idt = typename __identity<_Tp>::type; + using __idt = common_type_t<_Tp>; +_GLIBCXX_END_NAMESPACE_VERSION } +_GLIBCXX_BEGIN_NAMESPACE_VERSION + template<typename _CharT, typename _Traits> inline bool operator==(basic_string_view<_CharT, _Traits> __x, diff --git a/libstdc++-v3/include/std/string_view b/libstdc++-v3/include/std/string_view index a719185..311d6d7 100644 --- a/libstdc++-v3/include/std/string_view +++ b/libstdc++-v3/include/std/string_view @@ -430,20 +430,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION // [string.view.comparison], non-member basic_string_view comparison function + namespace __detail { _GLIBCXX_BEGIN_NAMESPACE_VERSION - // Identity transform to make ADL work with just one argument. - // See n3766.html. - template<typename _Tp = void> - struct __identity - { typedef _Tp type; }; - - template<> - struct __identity<void>; - + // Identity transform to create a non-deduced context, so that only one + // argument participates in template argument deduction and the other + // argument gets implicitly converted to the deduced type. See n3766.html. template<typename _Tp> - using __idt = typename __identity<_Tp>::type; + using __idt = common_type_t<_Tp>; _GLIBCXX_END_NAMESPACE_VERSION } @@ -639,12 +634,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct __is_fast_hash<hash<u32string_view>> : std::false_type { }; #endif +_GLIBCXX_END_NAMESPACE_VERSION inline namespace literals { inline namespace string_view_literals { - _GLIBCXX_BEGIN_NAMESPACE_VERSION +_GLIBCXX_BEGIN_NAMESPACE_VERSION inline constexpr basic_string_view<char> operator""sv(const char* __str, size_t __len) @@ -666,11 +662,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { return basic_string_view<char32_t>{__str, __len}; } #endif - _GLIBCXX_END_NAMESPACE_VERSION +_GLIBCXX_END_NAMESPACE_VERSION } // namespace string_literals } // namespace literals -_GLIBCXX_END_NAMESPACE_VERSION } // namespace std #include <bits/string_view.tcc> diff --git a/libstdc++-v3/libsupc++/del_opa.cc b/libstdc++-v3/libsupc++/del_opa.cc index c9afb46..f7bf7a4 100644 --- a/libstdc++-v3/libsupc++/del_opa.cc +++ b/libstdc++-v3/libsupc++/del_opa.cc @@ -46,9 +46,13 @@ _GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_WEAK_DEFINITION void operator delete(void* ptr, std::align_val_t) _GLIBCXX_USE_NOEXCEPT { -#if !_GLIBCXX_HAVE_ALIGNED_ALLOC && _GLIBCXX_HAVE__ALIGNED_MALLOC +#if _GLIBCXX_HAVE_ALIGNED_ALLOC || _GLIBCXX_HAVE_POSIX_MEMALIGN \ + || _GLIBCXX_HAVE_MEMALIGN + std::free (ptr); +#elif _GLIBCXX_HAVE__ALIGNED_MALLOC _aligned_free (ptr); #else - std::free(ptr); + if (ptr) + std::free (((void **) ptr)[-1]); // See aligned_alloc in new_opa.cc #endif } diff --git a/libstdc++-v3/libsupc++/eh_atomics.h b/libstdc++-v3/libsupc++/eh_atomics.h index 71b42a4..22a45c1 100644 --- a/libstdc++-v3/libsupc++/eh_atomics.h +++ b/libstdc++-v3/libsupc++/eh_atomics.h @@ -1,6 +1,6 @@ // Exception Handling support header for -*- C++ -*- -// Copyright (C) 2016 Free Software Foundation, Inc. +// Copyright (C) 2016-2017 Free Software Foundation, Inc. // // This file is part of GCC. // diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc index 0bc2b5f..e2a0d2f 100644 --- a/libstdc++-v3/libsupc++/new_opa.cc +++ b/libstdc++-v3/libsupc++/new_opa.cc @@ -55,9 +55,32 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size); #endif #define aligned_alloc memalign #else -// The C library doesn't provide any aligned allocation functions, declare -// aligned_alloc and get a link failure if aligned new is used. -extern "C" void *aligned_alloc(std::size_t, std::size_t); +#include <stdint.h> +// The C library doesn't provide any aligned allocation functions, define one. +// This is a modified version of code from gcc/config/i386/gmm_malloc.h +static inline void* +aligned_alloc (std::size_t al, std::size_t sz) +{ + // Alignment must be a power of two. + if (al & (al - 1)) + return nullptr; + else if (!sz) + return nullptr; + + // We need extra bytes to store the original value returned by malloc. + if (al < sizeof(void*)) + al = sizeof(void*); + void* const malloc_ptr = malloc(sz + al); + if (!malloc_ptr) + return nullptr; + // Align to the requested value, leaving room for the original malloc value. + void* const aligned_ptr = (void *) (((uintptr_t) malloc_ptr + al) & -al); + + // Store the original malloc value where it can be found by operator delete. + ((void **) aligned_ptr)[-1] = malloc_ptr; + + return aligned_ptr; +} #endif #endif diff --git a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc index ceffdcd..8ad677a 100644 --- a/libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc +++ b/libstdc++-v3/testsuite/20_util/unique_ptr/cons/default.cc @@ -1,6 +1,6 @@ // { dg-do compile { target c++11 } } -// Copyright (C) 2016 Free Software Foundation, Inc. +// Copyright (C) 2016-2017 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the |