platform/upstream/gcc.git
7 years agoAVX-512. Fix constants for 32b variant.
Kirill Yukhin [Thu, 26 Jan 2017 16:56:12 +0000 (16:56 +0000)]
AVX-512. Fix constants for 32b variant.

gcc/testsuite/
* gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
constant.
* gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.

From-SVN: r244941

7 years agoChangeLog: Fix relative path in my entry.
Uros Bizjak [Thu, 26 Jan 2017 16:50:50 +0000 (17:50 +0100)]
ChangeLog: Fix relative path in my entry.

From-SVN: r244940

7 years agoChangeLog: Move my last entry ...
Uros Bizjak [Thu, 26 Jan 2017 16:47:15 +0000 (17:47 +0100)]
ChangeLog: Move my last entry ...

* ChangeLog: Move my last entry ...
* config/ChangeLog: ... here.

From-SVN: r244938

7 years ago* name-lookup.c (parse_using_directive): Deprecate strong using.
Jason Merrill [Thu, 26 Jan 2017 15:32:22 +0000 (10:32 -0500)]
* name-lookup.c (parse_using_directive): Deprecate strong using.

From-SVN: r244936

7 years agoPR c++/79176 - lambda ICE with -flto -Os
Jason Merrill [Thu, 26 Jan 2017 15:30:43 +0000 (10:30 -0500)]
PR c++/79176 - lambda ICE with -flto -Os

* decl2.c (vague_linkage_p): Handle decloned 'tors.
* tree.c (decl_linkage): Likewise.

From-SVN: r244935

7 years agoldp_vec_64_1.c: Xfail.
Bin Cheng [Thu, 26 Jan 2017 15:04:27 +0000 (15:04 +0000)]
ldp_vec_64_1.c: Xfail.

gcc/testsuite
* gcc.target/aarch64/ldp_vec_64_1.c: Xfail.

From-SVN: r244934

7 years agoPR libstdc++/79190 add fallback aligned_alloc implementation
Jonathan Wakely [Thu, 26 Jan 2017 14:30:45 +0000 (14:30 +0000)]
PR libstdc++/79190 add fallback aligned_alloc implementation

libstdc++-v3:

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.

gcc/testsuite:

PR libstdc++/79190
* g++.dg/cpp1z/aligned-new3.C: Replace operator new so behaviour
matches replaced operator delete.

From-SVN: r244933

7 years agoavx512fintrin.h (_ktest_mask16_u8, [...]): Move to ...
Jakub Jelinek [Thu, 26 Jan 2017 12:24:58 +0000 (13:24 +0100)]
avx512fintrin.h (_ktest_mask16_u8, [...]): Move to ...

* 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.
testsuite/
* 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.

From-SVN: r244929

7 years agore PR c/79199 (ICE with -Wduplicated-branches)
Marek Polacek [Thu, 26 Jan 2017 11:37:33 +0000 (11:37 +0000)]
re PR c/79199 (ICE with -Wduplicated-branches)

PR c/79199
* fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
for the third operand.

* c-c++-common/Wduplicated-branches-13.c: New test.

From-SVN: r244928

7 years agodeclare-simd-4.f90: Add cleanup-modules directive.
Jakub Jelinek [Thu, 26 Jan 2017 11:20:51 +0000 (12:20 +0100)]
declare-simd-4.f90: Add cleanup-modules directive.

* testsuite/libgomp.fortran/declare-simd-4.f90: Add cleanup-modules
directive.

From-SVN: r244927

7 years agore PR middle-end/79236 (Many libgomp tests fail if configured with --enable-offload...
Jakub Jelinek [Thu, 26 Jan 2017 11:05:03 +0000 (12:05 +0100)]
re PR middle-end/79236 (Many libgomp tests fail if configured with --enable-offload-targets=nvptx-none but NVidia HW or libcuda.so.1 unavailable)

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.

From-SVN: r244924

7 years agore PR middle-end/79212 (internal compiler error: in maybe_lookup_decl_in_outer_ctx...
David Sherwood [Thu, 26 Jan 2017 10:41:35 +0000 (10:41 +0000)]
re PR middle-end/79212 (internal compiler error: in maybe_lookup_decl_in_outer_ctx, at omp-low.c:4134)

2017-01-26  David Sherwood  <david.sherwood@arm.com>

    gcc/
PR middle-end/79212
* gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
all contexts.

    gcc/testsuite/
PR middle-end/79212
* gfortran.dg/gomp/sharing-4.f90: New test.

From-SVN: r244922

7 years agore PR target/70465 (Poor code for x87 asm)
Jakub Jelinek [Thu, 26 Jan 2017 08:46:36 +0000 (09:46 +0100)]
re PR target/70465 (Poor code for x87 asm)

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.

* gcc.target/i386/pr70465.c: New test.

From-SVN: r244921

7 years agoupdate-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.
Jakub Jelinek [Thu, 26 Jan 2017 08:26:48 +0000 (09:26 +0100)]
update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.

contrib/
* update-copyright.py: Add libhsail-rt to self.default_dirs
and call self.add_dir on it.  Add Intel Corporation to external
authors.
gcc/
* brig-builtins.def: Update copyright years.
* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
Update copyright years.
gcc/testsuite/
* brig.dg/dg.exp: Update copyright years.
* lib/brig-dg.exp: Update copyright years.
* lib/brig.exp: Update copyright years.
libhsail-rt/
Update copyright years.
libstdc++-v3/
* libsupc++/eh_atomics.h: Update copyright years.
* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.

From-SVN: r244920

7 years agoupdate-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.
Jakub Jelinek [Thu, 26 Jan 2017 08:24:22 +0000 (09:24 +0100)]
update-copyright.py: Add libhsail-rt to self.default_dirs and call self.add_dir on it.

contrib/
* update-copyright.py: Add libhsail-rt to self.default_dirs
and call self.add_dir on it.  Add Intel Corporation to external
authors.
gcc/
* brig-builtins.def: Update copyright years.
* config/arm/arm_acle_builtins.def: Update copyright years.
gcc/brig/
Update copyright years.
gcc/testsuite/
* brig.dg/dg.exp: Update copyright years.
* lib/brig-dg.exp: Update copyright years.
* lib/brig.exp: Update copyright years.
libhsail-rt/
Update copyright years.
libstdc++-v3/
* libsupc++/eh_atomics.h: Update copyright years.
* testsuite/20_util/unique_ptr/cons/default.cc: Update copyright years.

From-SVN: r244919

7 years agore PR target/79179 (PowerPC64: -mcpu=power9 creates stxsd with bad offset)
Michael Meissner [Thu, 26 Jan 2017 04:16:11 +0000 (04:16 +0000)]
re PR target/79179 (PowerPC64: -mcpu=power9 creates stxsd with bad offset)

[gcc]
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.

[gcc/testsuite]
2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>

PR target/79179
* gcc.target/powerpc/pr79179.c: New test.

From-SVN: r244917

7 years agovsx-elemrev-4.c: Change expected code generation to accept D-mode memory accesses.
Bill Schmidt [Thu, 26 Jan 2017 03:21:49 +0000 (03:21 +0000)]
vsx-elemrev-4.c: Change expected code generation to accept D-mode memory accesses.

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.

From-SVN: r244916

7 years agoDaily bump.
GCC Administrator [Thu, 26 Jan 2017 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r244915

7 years agodecl.c (grokdeclarator): Fix a typo in a comment.
Martin Sebor [Thu, 26 Jan 2017 00:02:25 +0000 (00:02 +0000)]
decl.c (grokdeclarator): Fix a typo in a comment.

gcc/cp/ChangeLog:
* decl.c (grokdeclarator): Fix a typo in a comment.
This line, and those below, will be ignored--

M    ChangeLog
M    decl.c

From-SVN: r244912

7 years agoChangeLog only update missed in r244910.
Martin Sebor [Wed, 25 Jan 2017 23:19:01 +0000 (16:19 -0700)]
ChangeLog only update missed in r244910.

From-SVN: r244911

7 years agoPR c++/71290 - Flexible array member is not diagnosed with -pedantic
Martin Sebor [Wed, 25 Jan 2017 23:11:53 +0000 (23:11 +0000)]
PR c++/71290 - Flexible array member is not diagnosed with -pedantic

gcc/cp/ChangeLog:
PR c++/71290
* decl.c (grokdeclarator): Warn on flexible array members.

gcc/testsuite/ChangeLog:
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.

From-SVN: r244910

7 years agore PR c++/78896 ([C++17] Segmentation fault occurs when use variable initialized...
Jakub Jelinek [Wed, 25 Jan 2017 22:36:18 +0000 (23:36 +0100)]
re PR c++/78896 ([C++17] Segmentation fault occurs when use variable initialized using structured binding with capture-by-ref lambda)

PR c++/78896
* decl.c (cp_finish_decomp): Disallow memberwise decomposition of
lambda expressions.

* g++.dg/cpp1z/decomp24.C: New test.

From-SVN: r244909

7 years agore PR c++/77914 (Wrong lambda definition accepted)
Jakub Jelinek [Wed, 25 Jan 2017 20:51:10 +0000 (21:51 +0100)]
re PR c++/77914 (Wrong lambda definition accepted)

PR c++/77914
* parser.c (cp_parser_lambda_declarator_opt): Pedwarn with
OPT_Wpedantic on lambda templates for -std=c++14 and higher.

* 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.

From-SVN: r244907

7 years agovect-24.c: Remove xfail on ARM targets.
Bin Cheng [Wed, 25 Jan 2017 17:07:30 +0000 (17:07 +0000)]
vect-24.c: Remove xfail on ARM targets.

gcc/testsuite
* gcc.dg/vect/vect-24.c: Remove xfail on ARM targets.

From-SVN: r244905

7 years agors6000-c (altivec_overloaded_builtins): Fix order of entries for ALTIVEC_BUILTIN_VEC_...
Carl Love [Wed, 25 Jan 2017 16:23:48 +0000 (16:23 +0000)]
rs6000-c (altivec_overloaded_builtins): Fix order of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.

gcc/ChangeLog:

2017-01-25  Carl Love  <cel@us.ibm.com>

        * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
        of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.

gcc/testsuite/ChangeLog:

2017-01-25  Carl Love  <cel@us.ibm.com>
        * gcc.target/powerpc/builtins-3-p8.c:  Add missing tests for the
        vec_packs built-ins

From-SVN: r244904

7 years ago[ARM][testsuite] Force -mcpu=cortex-a57 for vsel* tests.
Christophe Lyon [Wed, 25 Jan 2017 15:41:55 +0000 (15:41 +0000)]
[ARM][testsuite] Force -mcpu=cortex-a57 for vsel* tests.

2017-01-25  Christophe Lyon  <christophe.lyon@linaro.org>

* gcc.target/arm/vseleqdf.c: Require arm_arch_v8a_ok, add
-mcpu=cortex-a57.
* gcc.target/arm/vseleqsf.c: Likewise.
* gcc.target/arm/vselgedf.c: Likewise.
* gcc.target/arm/vselgesf.c: Likewise.
* gcc.target/arm/vselgtdf.c: Likewise.
* gcc.target/arm/vselgtsf.c: Likewise.
* gcc.target/arm/vselledf.c: Likewise.
* gcc.target/arm/vsellesf.c: Likewise.
* gcc.target/arm/vselltdf.c: Likewise.
* gcc.target/arm/vselltsf.c: Likewise.
* gcc.target/arm/vselnedf.c: Likewise.
* gcc.target/arm/vselnesf.c: Likewise.
* gcc.target/arm/vselvcdf.c: Likewise.
* gcc.target/arm/vselvcsf.c: Likewise.
* gcc.target/arm/vselvsdf.c: Likewise.
* gcc.target/arm/vselvssf.c: Likewise.

From-SVN: r244903

7 years agolibhsail-rt: Fix some Autotools issues
Thomas Schwinge [Wed, 25 Jan 2017 15:38:01 +0000 (16:38 +0100)]
libhsail-rt: Fix some Autotools issues

contrib/
* gcc_update (files_and_dependencies): Care for "libhsail-rt".

libhsail-rt/
* configure.ac: Don't instantiate AC_CONFIG_MACRO_DIR.
* configure: Regenerate.

libhsail-rt/
* config.h.in: Remove stale file.

From-SVN: r244902

7 years agoFix "classe" typo in C++ Dialect Options docs
Jonathan Wakely [Wed, 25 Jan 2017 15:01:10 +0000 (15:01 +0000)]
Fix "classe" typo in C++ Dialect Options docs

* doc/invoke.texi (C++ Dialect Options): Fix typo.

From-SVN: r244901

7 years agoPR libstdc++/70607 make proj(T) and conj(T) return complex<T>
Jonathan Wakely [Wed, 25 Jan 2017 15:01:05 +0000 (15:01 +0000)]
PR libstdc++/70607 make proj(T) and conj(T) return complex<T>

PR libstdc++/61791
PR libstdc++/70607
* include/std/complex (real(T), imag(T)): Add _GLIBCXX_CONSTEXPR.
(proj(T), conj(T)): Change return types per DR 1522.
* include/tr1/complex (conj): Remove overloads and use std::conj.
* testsuite/26_numerics/complex/dr781_dr1137.cc: Rename to...
* testsuite/26_numerics/complex/dr781.cc: ... this, and update.
* testsuite/26_numerics/complex/value_operations/constexpr2.cc: Test
real(T) and imag(T). Allow testing for C++11 too.

From-SVN: r244900

7 years agore PR testsuite/72850 (FAIL: gcc.dg/tree-ssa/pr69270-3.c scan-tree-dump-times uncprop...
Richard Biener [Wed, 25 Jan 2017 13:14:41 +0000 (13:14 +0000)]
re PR testsuite/72850 (FAIL: gcc.dg/tree-ssa/pr69270-3.c scan-tree-dump-times uncprop1 ", 1" 4)

2017-01-25  Richard Biener  <rguenther@suse.de>

PR testsuite/72850
* gcc.dg/tree-ssa/pr69270-3.c: Change back expected outcome
to what we had before adding the threading passes.

From-SVN: r244898

7 years agore PR target/69264 (ICE building spidermonkey -mcpu=970 -maltivec -O3: rs6000_builtin...
Richard Biener [Wed, 25 Jan 2017 12:30:41 +0000 (12:30 +0000)]
re PR target/69264 (ICE building spidermonkey -mcpu=970 -maltivec -O3: rs6000_builtin_vectorization_cost, at config/rs6000/rs6000.c:4350)

2017-01-25  Richard Biener  <rguenther@suse.de>

PR tree-optimization/69264
* target.def (vector_alignment_reachable): Improve documentation.
* doc/tm.texi: Regenerate.
* targhooks.c (default_builtin_vector_alignment_reachable): Simplify
and add a comment.
* tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
earlier changes with respect to TYPE_USER_ALIGN.
(vector_alignment_reachable_p): Likewise.  Improve dumping.

* g++.dg/torture/pr69264.C: New testcase.

From-SVN: r244897

7 years agoAdd svn:executable property.
Jakub Jelinek [Wed, 25 Jan 2017 11:57:53 +0000 (12:57 +0100)]
Add svn:executable property.

From-SVN: r244896

7 years agore PR other/79046 (g++ -print-file-name=plugin uses full version number in path)
Jakub Jelinek [Wed, 25 Jan 2017 11:54:36 +0000 (12:54 +0100)]
re PR other/79046 (g++ -print-file-name=plugin uses full version number in path)

PR other/79046
* configure.ac: Add GCC_BASE_VER.
* Makefile.am (gcc_version): Use @get_gcc_base_ver@ instead of cat to
get version from BASE-VER file.
(ACLOCAL_AMFLAGS): Set to -I .. -I ../config .
* aclocal.m4: Regenerated.
* configure: Regenerated.
* Makefile.in: Regenerated.

From-SVN: r244895

7 years ago[ARM] PR target/79145 Fix xordi3 expander for immediate operands in iWMMXt
Kyrylo Tkachov [Wed, 25 Jan 2017 11:10:30 +0000 (11:10 +0000)]
[ARM] PR target/79145 Fix xordi3 expander for immediate operands in iWMMXt

PR target/79145
* config/arm/arm.md (xordi3): Force constant operand into a register
for TARGET_IWMMXT.

* gcc.target/arm/pr79145.c: New test.

From-SVN: r244894

7 years ago[doc] Correct optimisation levels documentation for -fstore-merging
Kyrylo Tkachov [Wed, 25 Jan 2017 10:13:53 +0000 (10:13 +0000)]
[doc] Correct optimisation levels documentation for -fstore-merging

* doc/invoke.texi (-fstore-merging): Correct default optimization
levels at which it is enabled.
(-O): Move -fstore-merging from list to...
(-O2): ... Here.

From-SVN: r244893

7 years agore PR debug/78363 (ICE in in force_type_die, at dwarf2out.c:24864)
Richard Biener [Wed, 25 Jan 2017 09:48:10 +0000 (09:48 +0000)]
re PR debug/78363 (ICE in in force_type_die, at dwarf2out.c:24864)

2017-01-25  Richard Biener  <rguenther@suse.de>

PR debug/78363
* omp-expand.c: Include debug.h.
(expand_omp_taskreg): Make sure to generate early debug before
outlining anything from a function.
(expand_omp_target): Likewise.
(grid_expand_target_grid_body): Likewise.

* g++.dg/gomp/pr78363-1.C: New testcase.
* g++.dg/gomp/pr78363-2.C: Likewise.
* g++.dg/gomp/pr78363-3.C: Likewise.

From-SVN: r244892

7 years ago[testsuite] Require shared effective target for some lto.exp tests
Kyrylo Tkachov [Wed, 25 Jan 2017 09:24:49 +0000 (09:24 +0000)]
[testsuite] Require shared effective target for some lto.exp tests

* gcc.dg/lto/pr54709_0.c: Require 'shared' effective target.
* gcc.dg/lto/pr61526_0.c: Likewise.
* gcc.dg/lto/pr64415_0.c: Likewise.

From-SVN: r244891

7 years agore PR lto/79061 ([LTO][ASAN] LTO plus ASAN fails with "AddressSanitizer: initializati...
Maxim Ostapenko [Wed, 25 Jan 2017 07:45:40 +0000 (07:45 +0000)]
re PR lto/79061 ([LTO][ASAN] LTO plus ASAN fails with "AddressSanitizer: initialization-order-fiasco")

PR lto/79061

gcc/

* asan.c (get_translation_unit_decl): New function.
(asan_add_global): Extract modules file name from globals
TRANSLATION_UNIT_DECL name.

gcc/fortran/

* f95-lang.c (gfc_create_decls): Include stringpool.h.
Pass main_input_filename to build_translation_unit_decl.

gcc/ada/

* gcc-interface/utils.c (get_global_context): Pass main_input_filename
to build_translation_unit_decl.

gcc/c/

* c-decl.c (pop_scope): Pass main_input_filename to
build_translation_unit_decl.

gcc/cp/

* decl.c (cxx_init_decl_processing): Pass main_input_filename
to build_translation_unit_decl.

From-SVN: r244890

7 years agocompiler: improvements for type alias handling
Ian Lance Taylor [Wed, 25 Jan 2017 05:12:26 +0000 (05:12 +0000)]
compiler: improvements for type alias handling

    Give an error for an attempt to define a method on an imported type.

    Give an error for each attempt to define a method on a builtin type.

    Adjust error messages to be closer to gc error messages.

    With these changes gccgo passes current tests on dev.typealias branch.

    This changes the errors printed for test/fixedbugs/issue5089.go, but
    the change is an improvement:

        Before:
            fixedbugs/issue5089.go:13:1: error: redefinition of â€˜bufio.Buffered’: receiver name changed
             func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
             ^
            fixedbugs/issue5089.go:11:13: note: previous definition of â€˜bufio.Buffered’ was here
             import "bufio" // GCCGO_ERROR "previous"
                         ^

        Now:
            fixedbugs/issue5089.go:13:7: error: may not define methods on non-local type
             func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
                   ^

    Reviewed-on: https://go-review.googlesource.com/35642

From-SVN: r244889

7 years agoDaily bump.
GCC Administrator [Wed, 25 Jan 2017 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r244888

7 years agore PR c++/79205 (ICE in create_tmp_var, at gimple-expr.c:473)
Jakub Jelinek [Tue, 24 Jan 2017 22:33:41 +0000 (23:33 +0100)]
re PR c++/79205 (ICE in create_tmp_var, at gimple-expr.c:473)

PR c++/79205
* cp-gimplify.c (cp_genericize_r): Add result of
convert_from_reference on invisiref parm to p_set.

* g++.dg/cpp1z/decomp22.C: New test.
* g++.dg/cpp1z/decomp23.C: New test.

From-SVN: r244885

7 years agoop-common.h (_FP_MUL, [...]): Add /* FALLTHRU */ comments.
Jakub Jelinek [Tue, 24 Jan 2017 22:32:30 +0000 (23:32 +0100)]
op-common.h (_FP_MUL, [...]): Add /* FALLTHRU */ comments.

* soft-fp/op-common.h (_FP_MUL, _FP_FMA, _FP_DIV): Add
/* FALLTHRU */ comments.

From-SVN: r244884

7 years agoPR c++/78469 - defaulted ctor and inaccessible dtor
Nathan Sidwell [Tue, 24 Jan 2017 19:29:44 +0000 (19:29 +0000)]
PR c++/78469 - defaulted ctor and inaccessible dtor

PR c++/78469 - defaulted ctor and inaccessible dtor
* cp-tree.h (tsubst_flags): Add tf_no_cleanup.
* init.c (build_new_1): Pass tf_no_cleanup to build_value_init.
* tree.c (build_target_expr): Check tf_no_cleanup.

PR c++/78469
* g++.dg/cpp0x/pr78469.C: New.

From-SVN: r244882

7 years agoPR c++/79118 - anon-members and constexpr
Nathan Sidwell [Tue, 24 Jan 2017 19:25:32 +0000 (19:25 +0000)]
PR c++/79118 - anon-members and constexpr

PR c++/79118 - anon-members and constexpr
* constexpr.c (cx_check_missing_mem_inits): Caller passes type not
ctor decl.  Recursively check anonymous members.
(register_constexpr_fundef): Adjust cx_check_missing_mem_inits
call.
(explain_invalid_constexpr_fn): Likewise.

PR c++/79118
* g++.dg/cpp0x/pr79118.C: New.

From-SVN: r244881

7 years agore PR target/77439 (wrong code for sibcall with longcall, APCS frame and VFP)
Eric Botcazou [Tue, 24 Jan 2017 17:15:02 +0000 (17:15 +0000)]
re PR target/77439 (wrong code for sibcall with longcall, APCS frame and VFP)

PR target/77439
* config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
for long calls with APCS frame and VFP.

From-SVN: r244879

7 years agoAdd "__RTL" to cc1
David Malcolm [Tue, 24 Jan 2017 17:07:36 +0000 (17:07 +0000)]
Add "__RTL" to cc1

gcc/c-family/ChangeLog:
* c-common.c (c_common_reswords): Add "__RTL".
* c-common.h (enum rid): Add RID_RTL.

gcc/c/ChangeLog:
* c-parser.c: Include "read-rtl-function.h" and
"run-rtl-passes.h".
(c_parser_declaration_or_fndef): Rename "gimple-pass-list" in
grammar to gimple-or-rtl-pass-list.  Add rtl-function-definition
production.  Update for renaming of field "gimple_pass" to
"gimple_or_rtl_pass".  If __RTL was seen, call
c_parser_parse_rtl_body.  Convert a timevar_push/pop pair
to an auto_timevar, to cope with early exit.
(c_parser_declspecs): Update RID_GIMPLE handling for renaming of
field "gimple_pass" to "gimple_or_rtl_pass", and for renaming of
c_parser_gimple_pass_list to c_parser_gimple_or_rtl_pass_list.
Handle RID_RTL.
(c_parser_parse_rtl_body): New function.
* c-tree.h (enum c_declspec_word): Add cdw_rtl.
(struct c_declspecs): Rename field "gimple_pass" to
"gimple_or_rtl_pass".  Add field "rtl_p".
* gimple-parser.c (c_parser_gimple_pass_list): Rename to...
(c_parser_gimple_or_rtl_pass_list): ...this, updating accordingly.
* gimple-parser.h (c_parser_gimple_pass_list): Rename to...
(c_parser_gimple_or_rtl_pass_list): ...this.

gcc/ChangeLog:
* cfg.c (original_copy_tables_initialized_p): New function.
* cfg.h (original_copy_tables_initialized_p): New decl.
* cfgrtl.c (relink_block_chain): Guard the call to
free_original_copy_tables with a call to
original_copy_tables_initialized_p.
* cgraph.h (symtab_node::native_rtl_p): New decl.
* cgraphunit.c (symtab_node::native_rtl_p): New function.
(symtab_node::needed_p): Don't assert for early assembly output
for __RTL functions.
(cgraph_node::finalize_function): Set "force_output" for __RTL
functions.
(cgraph_node::analyze): Bail out early for __RTL functions.
(analyze_functions): Update assertion to support __RTL functions.
(cgraph_node::expand): Bail out early for __RTL functions.
* final.c (rest_of_clean_state): Don't call delete_tree_ssa for
__RTL functions.
* function.h (struct function): Update comment for field
"pass_startwith".
* gimple-expr.c: Include "tree-pass.h".
(gimple_has_body_p): Return false for __RTL functions.
* Makefile.in (OBJS): Add run-rtl-passes.o.
* pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
accessor.
(gcc::pass_manager::get_clean_slate): New accessor.
* passes.c: Include "insn-addr.h".
(should_skip_pass_p): Add logging.  Update logic for running
"expand" to be compatible with both __GIMPLE and __RTL.  Guard
property-provider override so it is only done for gimple passes.
Don't skip dfinit.
(skip_pass): New function.
(execute_one_pass): Call skip_pass when skipping passes.
* read-md.c (md_reader::read_char): Support filtering
the input to a subset of line numbers.
(md_reader::md_reader): Initialize fields
m_first_line and m_last_line.
(md_reader::read_file_fragment): New function.
* read-md.h (md_reader::read_file_fragment): New decl.
(md_reader::m_first_line): New field.
(md_reader::m_last_line): New field.
* read-rtl-function.c (function_reader::create_function): Only
create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
curr_properties.  Set DECL_INITIAL to a dummy block.
(read_rtl_function_body_from_file_range): New function.
* read-rtl-function.h (read_rtl_function_body_from_file_range):
New decl.
* run-rtl-passes.c: New file.
* run-rtl-passes.h: New file.

gcc/testsuite/ChangeLog:
* gcc.dg/rtl/aarch64/asr_div1.c: New test case.
* gcc.dg/rtl/aarch64/pr71779.c: New test case.
* gcc.dg/rtl/rtl.exp: New file.
* gcc.dg/rtl/test.c: New file.
* gcc.dg/rtl/truncated-rtl-file.c: New test case.
* gcc.dg/rtl/unknown-rtx-code.c: New test case.
* gcc.dg/rtl/x86_64/dfinit.c: New test case.
* gcc.dg/rtl/x86_64/different-structs.c: New test case.
* gcc.dg/rtl/x86_64/final.c: New test case.
* gcc.dg/rtl/x86_64/into-cfglayout.c: New test case.
* gcc.dg/rtl/x86_64/ira.c: New test case.
* gcc.dg/rtl/x86_64/pro_and_epilogue.c: New test case.
* gcc.dg/rtl/x86_64/test-multiple-fns.c: New test case.
* gcc.dg/rtl/x86_64/test-return-const.c.after-expand.c: New test case.
* gcc.dg/rtl/x86_64/test-return-const.c.before-fwprop.c: New test case.
* gcc.dg/rtl/x86_64/test-rtl.c: New test case.
* gcc.dg/rtl/x86_64/test_1.h: New file.
* gcc.dg/rtl/x86_64/times-two.c.after-expand.c: New test case.
* gcc.dg/rtl/x86_64/times-two.c.before-df.c: New test case.
* gcc.dg/rtl/x86_64/times-two.h: New file.
* gcc.dg/rtl/x86_64/vregs.c: New test case.

From-SVN: r244878

7 years agomicroblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase buffer size.
Jeff Law [Tue, 24 Jan 2017 15:49:32 +0000 (08:49 -0700)]
microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase buffer size.

* config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
buffer size.

From-SVN: r244877

7 years agoFix typo.
David Edelsohn [Tue, 24 Jan 2017 14:32:36 +0000 (09:32 -0500)]
Fix typo.

From-SVN: r244874

7 years agore PR tree-optimization/79159 (spurious array-bounds warning)
Bin Cheng [Tue, 24 Jan 2017 13:09:27 +0000 (13:09 +0000)]
re PR tree-optimization/79159 (spurious array-bounds warning)

PR tree-optimization/79159
* tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
(record_nonwrapping_iv): Imporve boundary using above function if no
value range information.

gcc/testsuite
PR tree-optimization/79159
* g++.dg/tree-ssa/pr79159.C: New test.

From-SVN: r244868

7 years agoBrig front-end
Pekka Jääskeläinen [Tue, 24 Jan 2017 12:45:56 +0000 (12:45 +0000)]
Brig front-end

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.
* configure.ac (TOPLEVEL_CONFIGURE_ARGUMENTS): Added
tgarget-libhsail-rt.  Make brig unsupported on untested architectures.
* configure: Regenerated.

gcc/
* brig-builtins.def: New file.
* builtins.def (DEF_HSAIL_BUILTIN): New macro.
(DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
(DEF_HSAIL_SAT_BUILTIN): Likewise.
(DEF_HSAIL_INTR_BUILTIN): Likewise.
(DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
* builtin-types.def (BT_INT8): New.
(BT_INT16): Likewise.
(BT_UINT8): Likewise.
(BT_UINT16): Likewise.
(BT_FN_ULONG): Likewise.
(BT_FN_UINT_INT): Likewise.
(BT_FN_UINT_ULONG): Likewise.
(BT_FN_UINT_LONG): Likewise.
(BT_FN_UINT_PTR): Likewise.
(BT_FN_ULONG_PTR): Likewise.
(BT_FN_INT8_FLOAT): Likewise.
(BT_FN_INT16_FLOAT): Likewise.
(BT_FN_UINT32_FLOAT): Likewise.
(BT_FN_UINT16_FLOAT): Likewise.
(BT_FN_UINT8_FLOAT): Likewise.
(BT_FN_UINT64_FLOAT): Likewise.
(BT_FN_UINT16_UINT32): Likewise.
(BT_FN_UINT32_UINT16): Likewise.
(BT_FN_UINT16_UINT16_UINT16): Likewise.
(BT_FN_INT_PTR_INT): Likewise.
(BT_FN_UINT_PTR_UINT): Likewise.
(BT_FN_LONG_PTR_LONG): Likewise.
(BT_FN_ULONG_PTR_ULONG): Likewise.
(BT_FN_VOID_UINT64_UINT64): Likewise.
(BT_FN_UINT8_UINT8_UINT8): Likewise.
(BT_FN_INT8_INT8_INT8): Likewise.
(BT_FN_INT16_INT16_INT16): Likewise.
(BT_FN_INT_INT_INT): Likewise.
(BT_FN_UINT_FLOAT_UINT): Likewise.
(BT_FN_FLOAT_UINT_UINT): Likewise.
(BT_FN_ULONG_UINT_UINT): Likewise.
(BT_FN_ULONG_UINT_PTR): Likewise.
(BT_FN_ULONG_ULONG_ULONG): Likewise.
(BT_FN_UINT_UINT_UINT): Likewise.
(BT_FN_VOID_UINT_PTR): Likewise.
(BT_FN_UINT_UINT_PTR: Likewise.
(BT_FN_UINT32_UINT64_PTR): Likewise.
(BT_FN_INT_INT_UINT_UINT): Likewise.
(BT_FN_UINT_UINT_UINT_UINT): Likewise.
(BT_FN_UINT_UINT_UINT_PTR): Likewise.
(BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
(BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
(BT_FN_LONG_LONG_UINT_UINT): Likewise.
(BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
(BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
(BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
(BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
(BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
(BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
* doc/frontends.texi: List BRIG FE.
* doc/install.texi (Testing): Add BRIG tesring requirements.
* doc/invoke.texi (Overall Options): Mention BRIG.
* doc/standards.texi (Standards): Doucment BRIG HSA version.

gcc/brig/

* Make-lang.in: New file.
* brig-builtins.h: Likewise.
* brig-c.h: Likewise.
* brig-lang.c: Likewise.
* brigspec.c: Likewise.
* config-lang.in: Likewise.
* lang-specs.h: Likewise.
* lang.opt: Likewise.
* brigfrontend/brig-arg-block-handler.cc: Likewise.
* brigfrontend/brig-atomic-inst-handler.cc: Likewise.
* brigfrontend/brig-basic-inst-handler.cc: Likewise.
* brigfrontend/brig-branch-inst-handler.cc: Likewise.
* brigfrontend/brig-cmp-inst-handler.cc: Likewise.
* brigfrontend/brig-code-entry-handler.cc: Likewise.
* brigfrontend/brig-code-entry-handler.h: Likewise.
* brigfrontend/brig-comment-handler.cc: Likewise.
* brigfrontend/brig-control-handler.cc: Likewise.
* brigfrontend/brig-copy-move-inst-handler.cc: Likewise.
* brigfrontend/brig-cvt-inst-handler.cc: Likewise.
* brigfrontend/brig-fbarrier-handler.cc: Likewise.
* brigfrontend/brig-function-handler.cc: Likewise.
* brigfrontend/brig-function.cc: Likewise.
* brigfrontend/brig-function.h: Likewise.
* brigfrontend/brig-inst-mod-handler.cc: Likewise.
* brigfrontend/brig-label-handler.cc: Likewise.
* brigfrontend/brig-lane-inst-handler.cc: Likewise.
* brigfrontend/brig-machine.c: Likewise.
* brigfrontend/brig-machine.h: Likewise.
* brigfrontend/brig-mem-inst-handler.cc: Likewise.
* brigfrontend/brig-module-handler.cc: Likewise.
* brigfrontend/brig-queue-inst-handler.cc: Likewise.
* brigfrontend/brig-seg-inst-handler.cc: Likewise.
* brigfrontend/brig-signal-inst-handler.cc: Likewise.
* brigfrontend/brig-to-generic.cc: Likewise.
* brigfrontend/brig-to-generic.h: Likewise.
* brigfrontend/brig-util.cc: Likewise.
* brigfrontend/brig-util.h: Likewise.
* brigfrontend/brig-variable-handler.cc: Likewise.
* brigfrontend/phsa.h: Likewise.

gcc/testsuite/

* lib/brig-dg.exp: New file.
* lib/brig.exp: Likewise.
* brig.dg/README: Likewise.
* brig.dg/dg.exp: Likewise.
* brig.dg/test/gimple/alloca.hsail: Likewise.
* brig.dg/test/gimple/atomics.hsail: Likewise.
* brig.dg/test/gimple/branches.hsail: Likewise.
* brig.dg/test/gimple/fbarrier.hsail: Likewise.
* brig.dg/test/gimple/function_calls.hsail: Likewise.
* brig.dg/test/gimple/kernarg.hsail: Likewise.
* brig.dg/test/gimple/mem.hsail: Likewise.
* brig.dg/test/gimple/mulhi.hsail: Likewise.
* brig.dg/test/gimple/packed.hsail: Likewise.
* brig.dg/test/gimple/smoke_test.hsail: Likewise.
* brig.dg/test/gimple/variables.hsail: Likewise.
* brig.dg/test/gimple/vector.hsail: Likewise.

include/

* hsa.h: Moved here from libgomp/plugin/hsa.h.

libgomp/

* plugin/hsa.h: Moved to top level include.
* plugin/plugin-hsa.c: Chanfgd include of hsa.h accordingly.

libhsail-rt/

* Makefile.am: New file.
* target-config.h.in: Likewise.
* configure.ac: Likewise.
* configure: Likewise.
* config.h.in: Likewise.
* aclocal.m4: Likewise.
* README: Likewise.
* Makefile.in: Likewise.
* include/internal/fibers.h: Likewise.
* include/internal/phsa-queue-interface.h: Likewise.
* include/internal/phsa-rt.h: Likewise.
* include/internal/workitems.h: Likewise.
* rt/arithmetic.c: Likewise.
* rt/atomics.c: Likewise.
* rt/bitstring.c: Likewise.
* rt/fbarrier.c: Likewise.
* rt/fibers.c: Likewise.
* rt/fp16.c: Likewise.
* rt/misc.c: Likewise.
* rt/multimedia.c: Likewise.
* rt/queue.c: Likewise.
* rt/sat_arithmetic.c: Likewise.
* rt/segment.c: Likewise.
* rt/workitems.c: Likewise.

Co-Authored-By: Martin Jambor <mjambor@suse.cz>
From-SVN: r244867

7 years agore PR translation/79208 (Typo in gcc/ipa-devirt.c:1631)
Richard Biener [Tue, 24 Jan 2017 12:41:07 +0000 (12:41 +0000)]
re PR translation/79208 (Typo in gcc/ipa-devirt.c:1631)

2017-01-24  Richard Biener  <rguenther@suse.de>

PR translation/79208
* ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.

From-SVN: r244866

7 years agoPR libstdc++/79206 check string_view sizes in operator==
Jonathan Wakely [Tue, 24 Jan 2017 12:00:47 +0000 (12:00 +0000)]
PR libstdc++/79206 check string_view sizes in operator==

PR libstdc++/79206
* include/experimental/string_view (operator==): Check sizes first.
* include/std/string_view (operator==): Likewise.

From-SVN: r244865

7 years ago[PR 79198] Call ipa-prop func summary destructor
Martin Jambor [Tue, 24 Jan 2017 10:04:21 +0000 (11:04 +0100)]
[PR 79198] Call ipa-prop func summary destructor

2017-01-24  Martin Jambor  <mjambor@suse.cz>

PR bootstrap/79198
* ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
* ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
and known_contexts.

From-SVN: r244860

7 years agore PR middle-end/79123 (incorrect -Walloca-larger-than: alloca may be too large due...
Aldy Hernandez [Tue, 24 Jan 2017 09:50:33 +0000 (09:50 +0000)]
re PR middle-end/79123 (incorrect -Walloca-larger-than: alloca may be too large due to conversion from long int to long unsigned int)

PR middle-end/79123
* gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
casts from signed to unsigned really don't have a range.

From-SVN: r244859

7 years agoFix build failure with MPFR 2.4.x
Markus Trippelsdorf [Tue, 24 Jan 2017 09:32:16 +0000 (09:32 +0000)]
Fix build failure with MPFR 2.4.x

* gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
GMP_RNDx for compatiblity.

From-SVN: r244858

7 years agoFix false positive for -Walloc-size-larger-than (PR bootstrap/79132).
Martin Liska [Tue, 24 Jan 2017 08:48:36 +0000 (09:48 +0100)]
Fix false positive for -Walloc-size-larger-than (PR bootstrap/79132).

2017-01-24  Martin Liska  <mliska@suse.cz>

PR bootstrap/79132
* tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
that would prevent us to call alloca with -1 as argument.

From-SVN: r244857

7 years agoasan_test.C: Enable on all *-*-linux* targets that support asan...
Jakub Jelinek [Tue, 24 Jan 2017 08:27:39 +0000 (09:27 +0100)]
asan_test.C: Enable on all *-*-linux* targets that support asan...

* g++.dg/asan/asan_test.C: Enable on all *-*-linux* targets that
support asan, only on i?86/x86_64 require sse2_runtime.

From-SVN: r244856

7 years agodwarf2out.c (output_compilation_unit_header, [...]): Avoid -Wformat-security warning.
Jakub Jelinek [Tue, 24 Jan 2017 08:24:57 +0000 (09:24 +0100)]
dwarf2out.c (output_compilation_unit_header, [...]): Avoid -Wformat-security warning.

* dwarf2out.c (output_compilation_unit_header, output_file_names):
Avoid -Wformat-security warning.

From-SVN: r244855

7 years ago* configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.
Jakub Jelinek [Tue, 24 Jan 2017 08:19:37 +0000 (09:19 +0100)]
* configure.tgt: Enable tsan and lsan on powerpc64{,le}-*-linux*.

From-SVN: r244854

7 years agoaarch64.c (thunderx2t99_addrcost_table): Improve cost table.
Andrew Pinski [Tue, 24 Jan 2017 02:17:33 +0000 (02:17 +0000)]
aarch64.c (thunderx2t99_addrcost_table): Improve cost table.

2017-01-23  Andrew Pinski  <apinski@cavium.com>

        * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
        cost table.

From-SVN: r244851

7 years agore PR rtl-optimization/66669 (FAIL: gcc.dg/loop-8.c)
Kelvin Nilsen [Tue, 24 Jan 2017 01:26:13 +0000 (01:26 +0000)]
re PR rtl-optimization/66669 (FAIL: gcc.dg/loop-8.c)

gcc/testsuite/ChangeLog:

2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

PR target/66669
* gcc.dg/loop-8.c: Modify dg-skip-if directive to exclude this
test on powerpc targets.

From-SVN: r244850

7 years agoAmend recent entry.
Martin Sebor [Tue, 24 Jan 2017 01:22:59 +0000 (18:22 -0700)]
Amend recent entry.

From-SVN: r244849

7 years agobuiltin-sprintf.c: Add test cases.
Martin Sebor [Tue, 24 Jan 2017 01:12:41 +0000 (01:12 +0000)]
builtin-sprintf.c: Add test cases.

gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/builtin-sprintf.c: Add test cases.

From-SVN: r244848

7 years agoPR middle-end/78703 - -fprintf-return-value floating point handling incorrect...
Martin Sebor [Tue, 24 Jan 2017 01:10:10 +0000 (01:10 +0000)]
PR middle-end/78703 - -fprintf-return-value floating point handling incorrect...

PR middle-end/78703 - -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
* gimple-ssa-sprintf.c (warn_level): New global.
(format_integer): Use it here and throughout the rest of the file.
Use the same switch to compute sign as base.
(maybe_warn): New function.
(format_directive): Factor out warnings into maybe_warn.
Add debugging output.  Use warn_level.
(add_bytes): Use warn_level.
(pass_sprintf_length::compute_format_length): Add debugging output.
(try_substitute_return_value): Same.
(pass_sprintf_length::handle_gimple_call): Set and use warn_level.

From-SVN: r244847

7 years agoPR middle-end/78703 - -fprintf-return-value floating point handling incorrect...
Martin Sebor [Tue, 24 Jan 2017 01:06:34 +0000 (01:06 +0000)]
PR middle-end/78703 - -fprintf-return-value floating point handling incorrect...

PR middle-end/78703 - -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
* gimple-ssa-sprintf.c (struct format_result): Remove constant member.
(struct fmtresult, format_integer, format_floating): Adjust.
(get_string_length, format_string,format_directive): Same.
(pass_sprintf_length::compute_format_length): Same.
(try_substitute_return_value): Simplify slightly.

From-SVN: r244846

7 years agoPR middle-end/78703 - -fprintf-return-value floating point handling incorrect...
Martin Sebor [Tue, 24 Jan 2017 00:55:19 +0000 (00:55 +0000)]
PR middle-end/78703 - -fprintf-return-value floating point handling incorrect...

PR middle-end/78703 - -fprintf-return-value floating point handling incorrect in locales with a mulltibyte decimal point
* gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
(fmtresult::operator+=): Outlined.
(struct fmtresult): Add ctors.
(struct conversion_spec): Rename...
(struct directive): ...to this.  Add and remove data members.
(directive::set_width, directive::set_precision): New functions.
(format_percent): Use fmtresult ctor.
(get_width_and_precision): Remove.
(format_integer): Make naming changes.  Avoid computing width and
precision.
(format_floating): Same.  Adjust indentation.
(format_character, format_none): New functions.
(format_string): Moved character handling to format_character.
(format_directive): Remove arguments, change return type.
(parse_directive): New function.
(pass_sprintf_length::compute_format_length): Move directive
parsing to parse_directive.

From-SVN: r244845

7 years agore PR sanitizer/79168 (libtsan fails to link when cross compiling GCC tip for Aarch64...
Jakub Jelinek [Tue, 24 Jan 2017 00:18:36 +0000 (01:18 +0100)]
re PR sanitizer/79168 (libtsan fails to link when cross compiling GCC tip for Aarch64 target)

PR sanitizer/79168
* merge.sh (change_comment_headers): Don't remove 2nd and 3rd line
if the 3rd line doesn't contain 'The LLVM Compiler Infrastructure'
text.
* sanitizer_common/sanitizer_linux_mips64.S: Regenerated.
* sanitizer_common/sanitizer_linux_x86_64.S: Likewise.
* tsan/tsan_ppc_regs.h: Likewise.
* tsan/tsan_rtl_aarch64.S: Likewise.
* tsan/tsan_rtl_mips64.S: Likewise.
* tsan/tsan_rtl_ppc64.S: Likewise.

From-SVN: r244844

7 years agoDaily bump.
GCC Administrator [Tue, 24 Jan 2017 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r244843

7 years agoRestore <functional> header to test
Jonathan Wakely [Mon, 23 Jan 2017 23:59:08 +0000 (23:59 +0000)]
Restore <functional> header to test

* testsuite/experimental/array/make_array.cc: Restore <functional>
inclusion.

From-SVN: r244840

7 years agotree.h (assign_assembler_name_if_neeeded): Rename to ...
Jakub Jelinek [Mon, 23 Jan 2017 22:58:12 +0000 (23:58 +0100)]
tree.h (assign_assembler_name_if_neeeded): Rename to ...

* tree.h (assign_assembler_name_if_neeeded): Rename to ...
(assign_assembler_name_if_needed): ... this.
* tree.c (assign_assembler_name_if_neeeded): Rename to ...
(assign_assembler_name_if_needed): ... this.
(free_lang_data_in_cgraph): Adjust callers.
* cgraphunit.c (cgraph_node::analyze): Likewise.
* omp-expand.c (expand_omp_taskreg, expand_omp_target):
Likewise.

From-SVN: r244839

7 years agore PR tree-optimization/79088 (wrong code at -O2 on x86_64-linux-gnu)
Richard Biener [Mon, 23 Jan 2017 22:29:17 +0000 (22:29 +0000)]
re PR tree-optimization/79088 (wrong code at -O2 on x86_64-linux-gnu)

2017-01-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79088
PR tree-optimization/79188
* tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
resetting loop bounds after last path deletion.  Reset loop
bounds of the target loop, make code match the comments.
* tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
Make sure loops need no fixups.

* gcc.dg/torture/pr79088.c: New testcase.
* gcc.dg/torture/pr79188.c: Likewise.

From-SVN: r244837

7 years ago* da.po: Update.
Joseph Myers [Mon, 23 Jan 2017 22:28:03 +0000 (22:28 +0000)]
* da.po: Update.

From-SVN: r244836

7 years agolibgo: update to go1.8rc2
Ian Lance Taylor [Mon, 23 Jan 2017 22:18:42 +0000 (22:18 +0000)]
libgo: update to go1.8rc2

    Fix a bug in the generation of the hash value in reflect.FuncOf.

    The merge script missed a bunch of testdata files over the years.
    Copy them over.

    Reviewed-on: https://go-review.googlesource.com/35570

From-SVN: r244835

7 years agoscalar-insert-exp-3.c: New test.
Kelvin Nilsen [Mon, 23 Jan 2017 21:56:58 +0000 (21:56 +0000)]
scalar-insert-exp-3.c: New test.

gcc/testsuite/ChangeLog:

2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/bfp/scalar-insert-exp-3.c: New test.
* gcc.target/powerpc/bfp/scalar-insert-exp-4.c: New test.
* gcc.target/powerpc/bfp/scalar-insert-exp-5.c: New test.
* gcc.target/powerpc/bfp/scalar-test-data-class-0.c: Adjust return
type of test function to reflect change in built-in function's
return type.
* gcc.target/powerpc/bfp/scalar-test-data-class-1.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-data-class-2.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-data-class-3.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-data-class-4.c: Adjust return
type and second argument type to reflect change in built-in
function's type signature.
* gcc.target/powerpc/bfp/scalar-test-data-class-5.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-data-class-6.c: Adjust return
type of test function to reflect change in built-in function's
return type.
* gcc.target/powerpc/bfp/scalar-test-data-class-7.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-neg-0.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-neg-1.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-neg-2.c: Likewise.
* gcc.target/powerpc/bfp/scalar-test-neg-3.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-exp-0.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-exp-1.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-exp-2.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-exp-3.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-sig-0.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-sig-1.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-sig-2.c: Likewise.
* gcc.target/powerpc/bfp/vec-extract-sig-3.c: Likewise.
* gcc.target/powerpc/bfp/vec-insert-exp-4.c: New test.
* gcc.target/powerpc/bfp/vec-insert-exp-5.c: New test.
* gcc.target/powerpc/bfp/vec-insert-exp-6.c: New test.
* gcc.target/powerpc/bfp/vec-insert-exp-7.c: New test.
* gcc.target/powerpc/bfp/vec-test-data-class-0.c: Adjust return
type of test function to reflect change in built-in function's
return type.
* gcc.target/powerpc/bfp/vec-test-data-class-1.c: Likewise.
* gcc.target/powerpc/bfp/vec-test-data-class-2.c: Likewise.
* gcc.target/powerpc/bfp/vec-test-data-class-3.c: Likewise.
* gcc.target/powerpc/bfp/vec-test-data-class-4.c: Likewise.
* gcc.target/powerpc/bfp/vec-test-data-class-5.c: Likewise.
* gcc.target/powerpc/bfp/vec-test-data-class-6.c: Adjust types of
test function's result and second argument to reflect change in
built-in function's type signature.
* gcc.target/powerpc/bfp/vec-test-data-class-7.c: Likewise.

gcc/ChangeLog:

2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
exponent support with double type for first argument.
* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
type returned by __builtin_vec_extract_sig,
__builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
functions from "vector int" to "vector unsigned int" or from
"vector long long int" to "vector unsigned long long int".
Changed type returned by __builtin_vec_extract_exp,
__builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
functions from "vector int" to "vector unsigned int" or from
"vector long long int" to "vector unsigned long long int".
Changed return type of __builtin_vec_test_data_class,
__builtin_vec_test_data_class_sp, and
__builtin_vec_test_data_class_dp from "vector int" to
"vector bool int" or from "vector long long int" to "vector bool
long long int" and changed second argument type from "unsigned
int" to "int".  Added new overloaded function forms "vector float
__builtin_vec_insert_exp (vector float, vector unsigned int)" and
"vector float __builtin_vec_insert_exp_sp (vector float, vector
unsigned int)" and "vector double __builtin_vec_insert_exp (vector
double, vector unsigned long long int)" and "vector double
__builtin_vec_insert_exp_dp (vector double, vector unsigned long
long int)".  Changed return type of
__builtin_scalar_test_data_class and
__builtin_scalar_test_data_class_sp and
__builtin_scalar_test_data_class_dp from "unsigned int" to "bool
int" and changed second argument from "unsigned int" to "int".
Changed type returned by __builtin_scalar_test_neg,
__builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
from "int" to "bool int".  Added new overloaded function form
"double __builtin_scalar_insert_exp (double, unsigned long long int)".
* config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
exponent double-precision with floating point first argument.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
documentation of scalar_test_data_class, scalar_test_neg,
scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
vector_extract_exp, vec_extract_sig, vec_insert_exp, and
vec_test_data_class built-in functions to reflect refinements in
their type signatures.

From-SVN: r244834

7 years agoPR c++/71710 - template using directive of field
Nathan Sidwell [Mon, 23 Jan 2017 20:24:32 +0000 (20:24 +0000)]
PR c++/71710 - template using directive of field

PR c++/71710 - template using directive of field
* pt.c (tsubst_copy_and_build [COMPONENT_REF]): Move FIELD_DECL
check earlier.

PR C++/71710
* g++.dg/template/pr71710.C: New.

From-SVN: r244833

7 years agoPR c++/71406 - ICE with scope-ref'd template id exprs
Nathan Sidwell [Mon, 23 Jan 2017 20:19:07 +0000 (20:19 +0000)]
PR c++/71406 - ICE with scope-ref'd template id exprs

PR c++/71406 - ICE with scope-ref'd template id exprs
PR c++/77508
* typeck.c (finish_class_member_access_expr): Break up SCOPE_REF
before breaking up TEMPLATE_ID_EXPR.

PR c++/71406
PR c++/77508
* g++.dg/template/pr71406.C: New.

From-SVN: r244832

7 years agoarith.c (arith_power): If simplifying integer power expression to zero...
Thomas Koenig [Mon, 23 Jan 2017 19:43:28 +0000 (19:43 +0000)]
arith.c (arith_power): If simplifying integer power expression to zero...

2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>

* arith.c (arith_power):  If simplifying integer power expression
to zero, warn if -Winteger-division is given.

2017-01-23  Thomas Koenig  <tkoenig@netcologne.de>

* gfortran.dg/integer_exponentiation_7.f90:  New test.

From-SVN: r244830

7 years agoaarch64.c (aarch64_elf_asm_constructor): Increase size of buf.
Andreas Tobler [Mon, 23 Jan 2017 19:35:50 +0000 (20:35 +0100)]
aarch64.c (aarch64_elf_asm_constructor): Increase size of buf.

2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
    size of buf.
    (aarch64_elf_asm_destructor): Likewise.

From-SVN: r244828

7 years agore PR go/79037 (gccgo: Binaries crash with parforsetup: pos is not aligned on m68k)
Ian Lance Taylor [Mon, 23 Jan 2017 18:15:22 +0000 (18:15 +0000)]
re PR go/79037 (gccgo: Binaries crash with parforsetup: pos is not aligned on m68k)

PR go/79037
    compiler, runtime: align gc data for m68k

    The current GC requires that the gc data be aligned to at least a 4
    byte boundary, because it uses the lower two bits of the address for
    flags (see LOOP and PRECISE in runtime/mgc0.c).  As the gc data is
    stored as a [...]uintptr, that is normally always true.  However, on
    m68k, that only guarantees 2 byte alignment.  Fix it by forcing the
    alignment.

    The parfor code used by the current GC requires that the parfor data
    be aligned to at least an 8 byte boundary.  The code in parfor.c
    verifies this.  This is normally true, as the data uses uint64_t
    values, but, again, this must be enforced explicitly on m68k.

    Fixes GCC PR 79037.

    Reviewed-on: https://go-review.googlesource.com/35478

From-SVN: r244824

7 years agolibgo: bump library version to 11
Ian Lance Taylor [Mon, 23 Jan 2017 18:10:13 +0000 (18:10 +0000)]
libgo: bump library version to 11

    As usual I forgot to bump the library version when I updated the
    library to 1.8rc1.

    Reviewed-on: https://go-review.googlesource.com/35568

From-SVN: r244823

7 years ago69301.cc: Require atomic builtins.
Thomas Preud'homme [Mon, 23 Jan 2017 17:18:04 +0000 (17:18 +0000)]
69301.cc: Require atomic builtins.

2017-01-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    libstdc++-v3/
    * testsuite/29_atomics/atomic/69301.cc: Require atomic builtins.

From-SVN: r244819

7 years ago* fr.po: Update.
Joseph Myers [Mon, 23 Jan 2017 16:35:51 +0000 (16:35 +0000)]
* fr.po: Update.

From-SVN: r244818

7 years agore PR rtl-optimization/71724 (ICE: Segmentation fault, deep recursion between combine...
Bernd Schmidt [Mon, 23 Jan 2017 16:30:55 +0000 (16:30 +0000)]
re PR rtl-optimization/71724 (ICE: Segmentation fault, deep recursion between combine_simplify_rtx and subst)

PR rtl-optimization/71724
* combine.c (if_then_else_cond): Look for situations where it is
beneficial to undo the work of one of the recursive calls.

From-SVN: r244817

7 years agore PR rtl-optimization/78634 (30% performance drop after r242832.)
Bernd Schmidt [Mon, 23 Jan 2017 16:17:33 +0000 (16:17 +0000)]
re PR rtl-optimization/78634 (30% performance drop after r242832.)

PR rtl-optimization/78634
* config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
(TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
* ifcvt.c (noce_try_cmove): Add missing cost check.

testsuite/
PR rtl-optimization/78634
* gcc.target/i386/funcspec-11.c: Also pass -mtune=i686.

From-SVN: r244816

7 years agore PR tree-optimization/70754 (ICE during predictive commoning)
Bin Cheng [Mon, 23 Jan 2017 15:59:19 +0000 (15:59 +0000)]
re PR tree-optimization/70754 (ICE during predictive commoning)

PR tree-optimization/70754
* tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
(reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
combined stmt before it if not NULL.
(combine_chains): Process refs reversely and compute dominance point
for root ref.

gcc/testsuite
PR tree-optimization/70754
* gfortran.dg/pr70754.f90: New test.

From-SVN: r244815

7 years agoPR libstdc++/79195 fix make_array type deduction
Jonathan Wakely [Mon, 23 Jan 2017 15:56:05 +0000 (15:56 +0000)]
PR libstdc++/79195 fix make_array type deduction

PR libstdc++/79195
* include/experimental/array (__make_array_elem): New class template
and partial specialization.
(__is_reference_wrapper): Move into __make_array_elem specialization.
(make_array): Use __make_array_elem to determine element type and move
static assertion into specialization. Qualify std::forward call.
(to_array): Add exception specifiation.
* testsuite/experimental/array/make_array.cc: Test argument types
without a common type.
* testsuite/experimental/array/neg.cc: Adjust expected error message.

From-SVN: r244813

7 years agoFix strstr folding (PR tree-optimization/79196).
Martin Liska [Mon, 23 Jan 2017 14:57:43 +0000 (15:57 +0100)]
Fix strstr folding (PR tree-optimization/79196).

2017-01-23  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79196
* tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
(fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
instead of memcmp.
(strlen_optimize_stmt): Call the renamed function.
2017-01-23  Martin Liska  <mliska@suse.cz>

PR tree-optimization/79196
* gcc.dg/asan/pr79196.c: New test.
* gcc.dg/strlenopt-30.c: Update scanned pattern.

From-SVN: r244812

7 years agofix pr78384
Michael Matz [Mon, 23 Jan 2017 13:57:31 +0000 (13:57 +0000)]
fix pr78384

PR tree-optimization/78384
* tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.

testsuite/
PR tree-optimization/78384
* gcc.dg/pr78384.c: New test.

From-SVN: r244811

7 years agosem_util.adb (New_Copy_Tree): Code cleanup: removal of the internal map (ie.
Javier Miranda [Mon, 23 Jan 2017 13:34:31 +0000 (13:34 +0000)]
sem_util.adb (New_Copy_Tree): Code cleanup: removal of the internal map (ie.

2017-01-23  Javier Miranda  <miranda@adacore.com>

* sem_util.adb (New_Copy_Tree): Code cleanup:
removal of the internal map (ie. variable Actual_Map, its
associated local variables, and all the code handling it).
* sem_ch9.adb (Analyze_Task_Type_Declaration): in GNATprove mode
force loading of the System package when processing a task type.
(Analyze_Protected_Type_Declaration): in GNATprove mode force
loading of the System package when processing a protected type.
* sem_ch10.adb (Analyze_Compilation_Unit): in GNATprove mode
force loading of the System package when processing compilation
unit with a main-like subprogram.
* frontend.adb (Frontend): remove forced loading of the System
package.

From-SVN: r244810

7 years agosem_prag.adb (Default_Initial_Condition): If the desired type declaration is a derive...
Ed Schonberg [Mon, 23 Jan 2017 13:31:43 +0000 (13:31 +0000)]
sem_prag.adb (Default_Initial_Condition): If the desired type declaration is a derived type declaration with discriminants...

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

* sem_prag.adb (Default_Initial_Condition): If the desired type
declaration is a derived type declaration with discriminants,
it is rewritten as a private type declaration.
* sem_ch13.adb (Replace_Type_References_Generic,
Visible_Component): A discriminated private type with descriminnts
has components that must be rewritten as selected components
if they appear as identifiers in an aspect expression such as
a Default_Initial_Condition.
* sem_util.adb (Defining_Entity): support N_Iterator_Specification
nodes.

From-SVN: r244809

7 years agoghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
Hristian Kirtchev [Mon, 23 Jan 2017 13:28:58 +0000 (13:28 +0000)]
ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

* ghost.ads, ghost.adb (Is_Ignored_Ghost_Unit): New routine.
* gnat1drv.adb Generate an empty object file for an ignored
Ghost compilation unit.
* inline.adb, sem_util.adb, sem_ch4.adb: Minor reformatting.

From-SVN: r244808

7 years ago[multiple changes]
Arnaud Charlet [Mon, 23 Jan 2017 13:27:02 +0000 (14:27 +0100)]
[multiple changes]

2017-01-23  Yannick Moy  <moy@adacore.com>

* sem_ch4.adb (Analyze_Indexed_Component_Form):
Adapt to inlined prefix with string literal subtype.
* inline.adb (Expand_Inlined_Call): Keep unchecked
conversion inside inlined call when formal type is constrained.

2017-01-23  Javier Miranda  <miranda@adacore.com>

* sem_util.adb (New_Copy_Tree): Code cleanup:
removal of global variables. All the global variables, global
functions and tables of this subprogram are now declared locally.

From-SVN: r244807

7 years ago[multiple changes]
Arnaud Charlet [Mon, 23 Jan 2017 13:24:47 +0000 (14:24 +0100)]
[multiple changes]

2017-01-23  Gary Dismukes  <dismukes@adacore.com>

* exp_strm.ads: Minor reformatting and typo fixes.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

* sem_aggr.adb, par_sco.adb, exp_util.adb, sem.adb, sem_ch4.adb,
exp_aggr.adb: Minor reformatting.
* g-diopit.adb: minor grammar/punctuation fix in comment.
* g-byorma.ads: minor fix of unbalanced parens in comment.

2017-01-23  Hristian Kirtchev  <kirtchev@adacore.com>

* par.adb: Update the documentation of component Labl.
* par-ch6.adb (P_Return_Statement): Set the expected label of
an extended return statement to Error.

2017-01-23  Tristan Gingold  <gingold@adacore.com>

* s-boustr.ads, s-boustr.adb (Is_Full): New function.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

* expander.adb: Handle N_Delta_Aggregate.

2017-01-23  Javier Miranda  <miranda@adacore.com>

* exp_ch6.adb (Expand_Call): Improve the code that
checks if some formal of the called subprogram is a class-wide
interface, to handle subtypes of class-wide interfaces.

2017-01-23  Javier Miranda  <miranda@adacore.com>

* checks.adb (Apply_Parameter_Aliasing_Checks):
Remove side effects of the actuals before generating the overlap
check.

From-SVN: r244806

7 years ago[multiple changes]
Arnaud Charlet [Mon, 23 Jan 2017 13:20:22 +0000 (14:20 +0100)]
[multiple changes]

2017-01-23  Justin Squirek  <squirek@adacore.com>

* exp_strm.ads, exp_strm.ads
(Build_Record_Or_Elementary_Input_Function): Add an extra parameter so
as to avoid getting the underlying type by default.
* exp_attr.adb (Expand_N_Attribute_Reference): Remove use of
underlying type in the Iiput and output attribute cases when
building their respective functions.

2017-01-23  Gary Dismukes  <dismukes@adacore.com>

* scng.adb: Minor reformatting of error message.

2017-01-23  Ed Schonberg  <schonberg@adacore.com>

* sem_ch6.adb (Analyze_Expression_Function): Do not attempt
to freeze the return type of an expression funxtion that is a
completion, if the type is a limited view and the non-limited
view is available.

From-SVN: r244805

7 years agore PR tree-optimization/79186 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu...
Richard Biener [Mon, 23 Jan 2017 13:08:44 +0000 (13:08 +0000)]
re PR tree-optimization/79186 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu:  Segmentation fault (in VRP))

2017-01-23  Richard Biener  <rguenther@suse.de>

PR tree-optimization/79186
* tree-vrp.c (register_new_assert_for): Make sure we've seen
both incoming edges before moving an assert.

* gcc.dg/torture/pr79186.c: New testcase.
* gcc.dg/torture/pr79187.c: Likewise.

From-SVN: r244804

7 years agoFix compute_complex_assign_jump_func
Martin Jambor [Mon, 23 Jan 2017 13:05:00 +0000 (14:05 +0100)]
Fix compute_complex_assign_jump_func

2017-01-23  Martin Jambor  <mjambor@suse.cz>

* ipa-prop.c (load_from_param_1): Removed.
(load_from_unmodified_param): Bits from load_from_param_1 put back
here.
(load_from_param): Removed.
(compute_complex_assign_jump_func): Removed stmt2 and just replaced it
with stmt.  Reverted back to use of load_from_unmodified_param.

testsuite/
* gcc.dg/ipa/vrp8.c: New test.

From-SVN: r244803

7 years ago[PR 79108] Put ipa_node_params to GC memory
Martin Jambor [Mon, 23 Jan 2017 13:01:31 +0000 (14:01 +0100)]
[PR 79108] Put ipa_node_params to GC memory

2017-01-23  Martin Jambor  <mjambor@suse.cz>

PR ipa/79108
* ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
(ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
field a pointer to garbage collected vector, mark lattices and
ipcp_orig_node with GTY((skip)).
(ipa_get_param_count): Adjust to descriptors being a pointer.
(ipa_get_param): Likewise.
(ipa_get_type): Likewise.
(ipa_get_param_move_cost): Likewise.
(ipa_set_param_used): Likewise.
(ipa_get_controlled_uses): Likewise.
(ipa_set_controlled_uses): Likewise.
(ipa_is_param_used): Likewise.
(ipa_node_params_t): Move into garbage collector.  New methods insert
and remove.
(ipa_node_params_sum): Annotate wth GTY(()).
(ipa_check_create_node_params): Adjust to ipa_node_params_sum being
garbage collected.
(ipa_load_from_parm_agg): Adjust declaration.
* ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
* ipa-profile.c (ipa_profile): Likewise.
* ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
(ipa_populate_param_decls): Make descriptors parameter garbage
collected.
(ipa_dump_param): Adjust to descriptors being a pointer.
(ipa_alloc_node_params): Likewise.
(ipa_initialize_node_params): Likewise.
(load_from_param_1): Make descriptors parameter garbage collected.
(load_from_unmodified_param): Likewise.
(load_from_param): Likewise.
(ipa_load_from_parm_agg): Likewise.
(ipa_node_params::~ipa_node_params): Removed.
(ipa_free_all_node_params): Remove call to delete operator.
(ipa_node_params_t::insert): New.
(ipa_node_params_t::remove): Likewise.
(ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
copy known_csts and known_contexts vectors.
(ipa_read_node_info): Adjust to descriptors being a pointer.
(ipcp_modif_dom_walker): Make m_descriptors field garbage
collected.
(ipcp_transform_function): Make descriptors variable garbage
collected.

testsuite/
* gfortran.dg/lto/pr79108_0.f90: New test.

From-SVN: r244802

7 years agoAdd AVX512 k-mask intrinsics
Andrew Senkevich [Mon, 23 Jan 2017 12:52:39 +0000 (12:52 +0000)]
Add AVX512 k-mask intrinsics

gcc/
* config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
* config/i386/avx512dqintrin.h: Ditto.
* config/i386/avx512fintrin.h: Ditto.
* gcc/config/i386/i386.c: Handle new builtins.
* config/i386/i386-builtin.def: Add new builtins.
* config/i386/sse.md (ktest<mode>, kortest<mode>): New.
(UNSPEC_KORTEST, UNSPEC_KTEST): New.

gcc/testsuite/
* gcc.target/i386/avx512bw-ktestd-1.c: New test.
* gcc.target/i386/avx512bw-ktestq-1.c: Ditto.
* gcc.target/i386/avx512dq-ktestb-1.c: Ditto.
* gcc.target/i386/avx512f-ktestw-1.c: Ditto.
* gcc.target/i386/avx512bw-kortestd-1.c: Ditto.
* gcc.target/i386/avx512bw-kortestq-1.c: Ditto.
* gcc.target/i386/avx512dq-kortestb-1.c: Ditto.
* gcc.target/i386/avx512f-kortestw-1.c: Ditto.
* gcc.target/i386/avx512bw-ktestd-2.c: Ditt
* gcc.target/i386/avx512bw-ktestq-2.c: Ditto.
* gcc.target/i386/avx512dq-ktestb-2.c: Ditto.
* gcc.target/i386/avx512f-ktestw-2.c: Ditto.
* gcc.target/i386/avx512bw-kortestd-2.c: Ditto.
* gcc.target/i386/avx512bw-kortestq-2.c: Ditto.
* gcc.target/i386/avx512dq-kortestb-2.c: Ditto.
* gcc.target/i386/avx512f-kortestw-2.c: Ditto.

From-SVN: r244801

7 years agore PR testsuite/78421 (vect-strided-a-u8-i2-gap.c fails on armeb)
Richard Biener [Mon, 23 Jan 2017 12:24:35 +0000 (12:24 +0000)]
re PR testsuite/78421 (vect-strided-a-u8-i2-gap.c fails on armeb)

PR testsuite/78421
* lib/target-supports.exp (check_effective_target_vect_hw_misalign):
If the target is ARM return the result of the
check_effective_target_arm_vect_no_misalign proc.
* gcc.dg/vect/vect-strided-a-u8-i2-gap.c: If the target does not
support unaligned vectors then only expect one of the loops to be
unrolled.

Co-Authored-By: Nick Clifton <nickc@redhat.com>
From-SVN: r244796

7 years agoMinor editing.
Arnaud Charlet [Mon, 23 Jan 2017 12:08:22 +0000 (13:08 +0100)]
Minor editing.

From-SVN: r244795