gcc.git
7 years agoio.c (gfc_resolve_dt): Fix returns to bool type.
Jerry DeLisle [Sat, 13 May 2017 15:33:34 +0000 (15:33 +0000)]
io.c (gfc_resolve_dt): Fix returns to bool type.

2017-05-13  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* io.c (gfc_resolve_dt): Fix returns to bool type.

From-SVN: r248008

7 years agomn10300.c (mn10300_match_ccmode): Fix where we look for cc setter after the compare...
Jeff Law [Sat, 13 May 2017 14:40:53 +0000 (08:40 -0600)]
mn10300.c (mn10300_match_ccmode): Fix where we look for cc setter after the compare-elim changes.

2017-05-12  Jeff Law  <law@redhat.com>
    Jakub Jelinek  <jakub@redhat.com>

* config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
we look for cc setter after the compare-elim changes.
* config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
within the vector to match what compare-elim now expects.
(subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
(xorsi3_flags, one_cmplsi2_flags): Likewise.

* config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
after the compare-elim changes.
* config/rx/rx.md (abssi2_flags): Fix order of patterns within
the vector to match what compare-elim now expects.
(addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
(andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
(iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
(ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
(ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.

* config/visium/visium.c (single_set_and_flags): Fix where
we look for cc setter after the compare-elim changes.
* config/visium/visium.md (flags_subst_logic): Fix order of patterns
with the vector to match what compare-elim now expects.
(flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
(add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
(addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
(sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
(subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
(neg<mode>2_insn_set_overflow): Likewise.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r248007

7 years agoBRIG FE: Fix an assertion when doing an 'lda' of
Pekka Jääskeläinen [Sat, 13 May 2017 11:57:16 +0000 (11:57 +0000)]
BRIG FE: Fix an assertion when doing an 'lda' of
a private array offset.

From-SVN: r248006

7 years agoPatch for RTL expand bug affecting aarch64 vector code.
Jim Wilson [Sat, 13 May 2017 01:32:40 +0000 (01:32 +0000)]
Patch for RTL expand bug affecting aarch64 vector code.

gcc/
PR middle-end/79794
     * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
maybe_expand_insn call, set ops[0].target.  If still set after call,
set alt_rtl.  Add extra arg to recursive calls.
(extract_bit_field): Add alt_rtl argument.  Pass to
extract_bit_field.
* expmed.h (extract_bit_field): Fix prototype.
* expr.c (emit_group_load_1, copy_blkmode_from_reg)
(copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
to extract_bit_field_calls.
(expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
Pass alt_rtl to extract_bit_field calls.
* calls.c (store_unaligned_arguments_into_psuedos)
load_register_parameters): Pass extra NULL to extract_bit_field calls.
* optabs.c (maybe_legitimize_operand): Clear op->target when call
gen_reg_rtx.
* optabs.h (struct expand_operand): Add target bitfield.

From-SVN: r248004

7 years agoDaily bump.
GCC Administrator [Sat, 13 May 2017 00:16:33 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r248003

7 years agoRevert revision 247926.
François Dumont [Fri, 12 May 2017 21:19:39 +0000 (21:19 +0000)]
Revert revision 247926.

From-SVN: r247998

7 years ago* sv.po: Update.
Joseph Myers [Fri, 12 May 2017 20:29:43 +0000 (21:29 +0100)]
* sv.po: Update.

From-SVN: r247996

7 years agore PR testsuite/80643 (NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223...
Martin Sebor [Fri, 12 May 2017 19:23:00 +0000 (19:23 +0000)]
re PR testsuite/80643 (NA->FAIL: gcc.dg/pr79214.c gcc.dg/pr79222.c gcc.dg/pr79223.c gcc.dg/tree-ssa/builtins-folding-gimple-ub.c)

gcc/testsuite/ChangeLog:

PR testsuite/80643
* gfortran.dg/mvbits_7.f90: Prune diagnostic output incidental
to the purpose of the test.

From-SVN: r247993

7 years agocompare-elim.c (try_eliminate_compare): Canonicalize operation with embedded compare...
Uros Bizjak [Fri, 12 May 2017 19:04:05 +0000 (21:04 +0200)]
compare-elim.c (try_eliminate_compare): Canonicalize operation with embedded compare to [(set (reg:CCM) (compare:CCM...

* compare-elim.c (try_eliminate_compare): Canonicalize
operation with embedded compare to
[(set (reg:CCM) (compare:CCM (operation) (immediate)))
 (set (reg) (operation)].

* config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.

From-SVN: r247992

7 years agore PR target/80723 (FAIL gcc.target/i386/cadd.c scan assembler sbb)
Uros Bizjak [Fri, 12 May 2017 18:52:51 +0000 (20:52 +0200)]
re PR target/80723 (FAIL gcc.target/i386/cadd.c scan assembler sbb)

PR target/80723
* config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
cost of adding a carry flag for ADC instruction.
[case MINUS]: Ignore the cost of subtracting a carry flag
for SBB instruction.

From-SVN: r247991

7 years agoconfig.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h, and x86intrin.h
Steven Munroe [Fri, 12 May 2017 18:34:44 +0000 (18:34 +0000)]
config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h, and x86intrin.h

[gcc]

2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>

* config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
and x86intrin.h
* config/rs6000/bmiintrin.h: New file.
* config/rs6000/bmi2intrin.h: New file.
* config/rs6000/x86intrin.h: New file.

[gcc/testsuite]

2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>

* gcc.target/powerpc/bmi-andn-1.c: New file
* gcc.target/powerpc/bmi-andn-2.c: New file.
* gcc.target/powerpc/bmi-bextr-1.c: New file.
* gcc.target/powerpc/bmi-bextr-2.c: New file.
* gcc.target/powerpc/bmi-bextr-4.c: New file.
* gcc.target/powerpc/bmi-bextr-5.c: New file.
* gcc.target/powerpc/bmi-blsi-1.c: New file.
* gcc.target/powerpc/bmi-blsi-2.c: New file.
* gcc.target/powerpc/bmi-blsmsk-1.c: new file.
* gcc.target/powerpc/bmi-blsmsk-2.c: New file.
* gcc.target/powerpc/bmi-blsr-1.c: New file.
* gcc.target/powerpc/bmi-blsr-2.c: New File.
* gcc.target/powerpc/bmi-check.h: New File.
* gcc.target/powerpc/bmi-tzcnt-1.c: new file.
* gcc.target/powerpc/bmi-tzcnt-2.c: New file.
* gcc.target/powerpc/bmi2-bzhi32-1.c: New file.
* gcc.target/powerpc/bmi2-bzhi64-1.c: New file.
* gcc.target/powerpc/bmi2-bzhi64-1a.c: New file.
* gcc.target/powerpc/bmi2-check.h: New file.
* gcc.target/powerpc/bmi2-mulx32-1.c: New file.
* gcc.target/powerpc/bmi2-mulx32-2.c: New file.
* gcc.target/powerpc/bmi2-mulx64-1.c: New file.
* gcc.target/powerpc/bmi2-mulx64-2.c: New file.
* gcc.target/powerpc/bmi2-pdep32-1.c: New file.
* gcc.target/powerpc/bmi2-pdep64-1.c: New file.
* gcc.target/powerpc/bmi2-pext32-1.c: New File.
* gcc.target/powerpc/bmi2-pext64-1.c: New file.
* gcc.target/powerpc/bmi2-pext64-1a.c: New File.

From-SVN: r247988

7 years agore PR c++/60430 (static_assert and reference to const/constexpr)
Paolo Carlini [Fri, 12 May 2017 17:53:54 +0000 (17:53 +0000)]
re PR c++/60430 (static_assert and reference to const/constexpr)

2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/60430
* g++.dg/cpp0x/pr60430.C: New.

From-SVN: r247986

7 years agotree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding markers.
Jeff Law [Fri, 12 May 2017 17:36:01 +0000 (11:36 -0600)]
tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding markers.

* tree-vrp.c (vrp_dom_walker::before_dom_childern): Push unwinding
markers.

* g++.dg/tree-ssa/ssa-dom-thread-4.c: Update expected output.

From-SVN: r247985

7 years agore PR middle-end/80707 (r247844 causes error: extra outgoing edge)
Peter Bergner [Fri, 12 May 2017 17:13:07 +0000 (12:13 -0500)]
re PR middle-end/80707 (r247844 causes error: extra outgoing edge)

gcc/
PR middle-end/80707
* tree-cfg.c: Remove cfg edges of unreachable case statements.

gcc/testsuite/
PR middle-end/80707
* g++.dg/pr80707.C: New test.

From-SVN: r247984

7 years agocompiler: add calling Bfunction Backend::call_expression
Than McIntosh [Fri, 12 May 2017 16:36:50 +0000 (16:36 +0000)]
compiler: add calling Bfunction Backend::call_expression

    Pass in the calling (containing) Bfunction when invoking the Backend
    method call_expression(), so as to handle the case where generation of
    the call forces the creation of a temp var within the calling
    function.

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

From-SVN: r247981

7 years agore PR ada/80117 (Standard'Word_Size is wrong for aarch64 ILP32)
Eric Botcazou [Fri, 12 May 2017 15:55:46 +0000 (15:55 +0000)]
re PR ada/80117 (Standard'Word_Size is wrong for aarch64 ILP32)

* system-linux-arm.ads (Memory_Size): Use Long_Integer'Size
instead of Word_Size.

Revert
2017-03-28  Andreas Schwab  <schwab@suse.de>

PR ada/80117
* system-linux-aarch64-ilp32.ads: New file.
* gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS_COMMON): Rename
from LIBGNAT_TARGET_PAIRS.
(LIBGNAT_TARGET_PAIRS_32, LIBGNAT_TARGET_PAIRS_64): Define.
(LIBGNAT_TARGET_PAIRS): Use LIBGNAT_TARGET_PAIRS_COMMON, and
LIBGNAT_TARGET_PAIRS_64 or LIBGNAT_TARGET_PAIRS_32 for -mabi=lp64
or -mabi=ilp32, resp.

From-SVN: r247979

7 years agors6000.c (rs6000_gimple_fold_builtin): Add handling for early expansion of vector...
Will Schmidt [Fri, 12 May 2017 15:40:04 +0000 (15:40 +0000)]
rs6000.c (rs6000_gimple_fold_builtin): Add handling for early expansion of vector divide builtins.

[gcc]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
early expansion of vector divide builtins.
(builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
builtins identified as having unsigned arguments.

[gcc/testsuite]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-div-float.c: New.
* gcc.target/powerpc/fold-vec-div-floatdouble.c: New.
* gcc.target/powerpc/fold-vec-div-longlong.c: New.

From-SVN: r247977

7 years agors6000.c (gimple-fold.h): New #include.
Will Schmidt [Fri, 12 May 2017 15:35:17 +0000 (15:35 +0000)]
rs6000.c (gimple-fold.h): New #include.

[gcc]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

* config/rs6000/rs6000.c (gimple-fold.h): New #include.
(rs6000_gimple_fold_builtin): Add handling for early GIMPLE
expansion of vector logical operations (and, andc, or, xor,
nor, orc, nand)

[gcc/testsuite]

2017-05-10  Will Schmidt  <will_schmidt@vnet.ibm.com>

* gcc.target/powerpc/fold-vec-logical-ands-char.c: New.
* gcc.target/powerpc/fold-vec-logical-ands-int.c: New.
* gcc.target/powerpc/fold-vec-logical-ands-longlong.c: New.
* gcc.target/powerpc/fold-vec-logical-ands-short.c: New.
* gcc.target/powerpc/fold-vec-logical-ors-char.c: New.
* gcc.target/powerpc/fold-vec-logical-ors-int.c: New.
* gcc.target/powerpc/fold-vec-logical-ors-longlong.c: New.
* gcc.target/powerpc/fold-vec-logical-ors-short.c: New.
* gcc.target/powerpc/fold-vec-logical-other-char.c: New.
* gcc.target/powerpc/fold-vec-logical-other-int.c: New.
* gcc.target/powerpc/fold-vec-logical-other-longlong.c: New.
* gcc.target/powerpc/fold-vec-logical-other-short.c: New.

From-SVN: r247976

7 years agogimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
Will Schmidt [Fri, 12 May 2017 15:22:58 +0000 (15:22 +0000)]
gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.

2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

[gcc]
        * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
        * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.

From-SVN: r247975

7 years agors6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of...
Will Schmidt [Fri, 12 May 2017 15:17:27 +0000 (15:17 +0000)]
rs6000.c (rs6000_gimple_fold_builtin): Add handling for early GIMPLE expansion of vector multiplies.

[gcc]

2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>

        * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
        early GIMPLE expansion of vector multiplies.

From-SVN: r247974

7 years agoPR libstdc++/78939 make tuple_size<cv T> depend on tuple_size<T>
Jonathan Wakely [Fri, 12 May 2017 14:43:11 +0000 (15:43 +0100)]
PR libstdc++/78939 make tuple_size<cv T> depend on tuple_size<T>

PR libstdc++/78939
* include/std/utility (tuple_size<cv T>): Only define partial
specializations when tuple_size<T>::value is valid.
* testsuite/20_util/tuple/78939.cc: New.
* testsuite/20_util/tuple/cv_tuple_size_neg.cc: New.

From-SVN: r247973

7 years ago* gcc.target/i386/pr22152.c: Remove unneeded dg-additional-options.
Uros Bizjak [Fri, 12 May 2017 14:35:13 +0000 (16:35 +0200)]
* gcc.target/i386/pr22152.c: Remove unneeded dg-additional-options.

From-SVN: r247972

7 years ago[ARM] Add missing TARGET_32BIT conditional to movsi
Prakhar Bahuguna [Fri, 12 May 2017 14:16:52 +0000 (14:16 +0000)]
[ARM] Add missing TARGET_32BIT conditional to movsi

2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>

    gcc/
    * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
    TARGET_HAVE_MOVT conditional.
    (movt splitter): Likewise.

From-SVN: r247971

7 years agore PR c++/49604 (forward-declared enum's elements in class scope gets default access...
Paolo Carlini [Fri, 12 May 2017 13:20:21 +0000 (13:20 +0000)]
re PR c++/49604 (forward-declared enum's elements in class scope gets default access (class vs struct))

2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/49604
* g++.dg/cpp0x/forw_enum14.C: New.
* g++.dg/cpp0x/forw_enum15.C: Likewise.

From-SVN: r247969

7 years agoruntime: fix build for non-split-stack systems
Ian Lance Taylor [Fri, 12 May 2017 12:49:34 +0000 (12:49 +0000)]
runtime: fix build for non-split-stack systems

    Change memory allocation accounting for stacks to use stacks_sys,
    since that seems to be what it is for.

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

From-SVN: r247967

7 years agotree-ssa-sccvn.h (has_VN_INFO): Declare.
Richard Biener [Fri, 12 May 2017 12:04:31 +0000 (12:04 +0000)]
tree-ssa-sccvn.h (has_VN_INFO): Declare.

2017-05-12  Richard Biener  <rguenther@suse.de>

* tree-ssa-sccvn.h (has_VN_INFO): Declare.
* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Fold all stmts not inplace.

* g++.dg/tree-ssa/ssa-dse-2.C: Adjust.

From-SVN: r247966

7 years agore PR c++/67687 (ICE initializing constexpr member with constexpr constructor)
Paolo Carlini [Fri, 12 May 2017 11:24:56 +0000 (11:24 +0000)]
re PR c++/67687 (ICE initializing constexpr member with constexpr constructor)

2017-05-12  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/67687
* g++.dg/cpp0x/constexpr-ice17.C: New.

From-SVN: r247964

7 years agore PR tree-optimization/80713 (recent crash in update_dep_bb)
Richard Biener [Fri, 12 May 2017 10:54:29 +0000 (10:54 +0000)]
re PR tree-optimization/80713 (recent crash in update_dep_bb)

2017-05-12  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80713
* tree-ssa-pre.c (remove_dead_inserted_code): Clear
inserted_exprs bit for not removed stmts.

* gcc.dg/torture/pr80713.c: New testcase.

From-SVN: r247963

7 years agoLimit perf data buffer during profiling
Andi Kleen [Fri, 12 May 2017 10:09:50 +0000 (10:09 +0000)]
Limit perf data buffer during profiling

With high -j parallelism the autofdo tests can randomly fail.
autofdo uses Linux perf to record profiling data.
Linux perf uses a locked perf buffer. By default it has
around 516k buffer per uid (/proc/sys/kernel/perf_event_mlock_kb).

An individual perf record tries to grab the full 516k,
which makes parallel perf record fail.

This patch limits the perf buffer for individual perf record to 8k.
With the default settings this allows a parallelism of the test
cases of 16, which is hopefully good enough

(if not would need to add some kind of semaphore, or ask
the user to increase the limit as root)

I also removed an unneeded -o perf.data option

Thanks to Marcin to finally spotting the problem.

Passes bootstrap and test on x86_64-linux. Ok for trunk?

gcc/testsuite/:

2017-05-12  Andi Kleen  <ak@linux.intel.com>

PR testsuite/77684
* lib/target-supports.exp (profopt-perf-wrapper):
Add -m8 option to increase parallelism.

From-SVN: r247962

7 years agoOpenACC C front end maintenance: c_parser_oacc_single_int_clause
Thomas Schwinge [Fri, 12 May 2017 09:33:18 +0000 (11:33 +0200)]
OpenACC C front end maintenance: c_parser_oacc_single_int_clause

gcc/c/
* c-parser.c (c_parser_omp_clause_num_gangs)
(c_parser_omp_clause_num_workers)
(c_parser_omp_clause_vector_length): Merge functions into...
(c_parser_oacc_single_int_clause): ... this new function.  Adjust
all users.
gcc/testsuite/
* c-c++-common/goacc/parallel-dims-1.c: New file.
* c-c++-common/goacc/parallel-dims-2.c: Likewise.

From-SVN: r247960

7 years agoLoad new scanlang.exp
Rainer Orth [Fri, 12 May 2017 09:20:37 +0000 (09:20 +0000)]
Load new scanlang.exp

libitm:
* testsuite/lib/libitm.exp: Load scanlang.exp.

libgomp:
* testsuite/lib/libgomp.exp: Load scanlang.exp.

libatomic:
* testsuite/lib/libatomic.exp: Load scanlang.exp.

From-SVN: r247959

7 years ago[PR middle-end/69921] Use "oacc kernels parallelized" attribute for parallelized...
Thomas Schwinge [Fri, 12 May 2017 09:18:34 +0000 (11:18 +0200)]
[PR middle-end/69921] Use "oacc kernels parallelized" attribute for parallelized OpenACC kernels

gcc/
PR middle-end/69921
* tree-parloops.c (create_parallel_loop): Set "oacc kernels
parallelized" attribute for parallelized OpenACC kernels.
* omp-offload.c (execute_oacc_device_lower): Use it.
gcc/testsuite/
* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
* c-c++-common/goacc/classify-kernels.c: Likewise.
* c-c++-common/goacc/kernels-counter-vars-function-scope.c:
Likewise.
* c-c++-common/goacc/kernels-double-reduction-n.c: Likewise.
* c-c++-common/goacc/kernels-double-reduction.c: Likewise.
* c-c++-common/goacc/kernels-loop-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-3.c: Likewise.
* c-c++-common/goacc/kernels-loop-g.c: Likewise.
* c-c++-common/goacc/kernels-loop-mod-not-zero.c: Likewise.
* c-c++-common/goacc/kernels-loop-n.c: Likewise.
* c-c++-common/goacc/kernels-loop-nest.c: Likewise.
* c-c++-common/goacc/kernels-loop.c: Likewise.
* c-c++-common/goacc/kernels-one-counter-var.c: Likewise.
* c-c++-common/goacc/kernels-reduction.c: Likewise.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-2.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-data-2.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-data-enter-exit-2.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-data-enter-exit.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-data-update.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-data.f95: Likewise.
* gfortran.dg/goacc/kernels-loop-n.f95: Likewise.
* gfortran.dg/goacc/kernels-loop.f95: Likewise.

From-SVN: r247957

7 years agoUse "oacc kernels" attribute for OpenACC kernels
Thomas Schwinge [Fri, 12 May 2017 09:02:55 +0000 (11:02 +0200)]
Use "oacc kernels" attribute for OpenACC kernels

gcc/
* omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
Set "oacc kernels" attribute.
* omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
parameter.  Adjust all users.
(oacc_fn_attrib_kernels_p): Remove function.
* omp-offload.c (execute_oacc_device_lower): Look for "oacc
kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
* tree-ssa-loop.c (gate_oacc_kernels): Likewise.
* tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
assert "oacc kernels" attribute is set.
gcc/testsuite/
* c-c++-common/goacc/classify-kernels-unparallelized.c: Adjust.
* c-c++-common/goacc/classify-kernels.c: Likewise.
* c-c++-common/goacc/classify-parallel.c: Likewise.
* c-c++-common/goacc/classify-routine.c: Likewise.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
* gfortran.dg/goacc/classify-parallel.f95: Likewise.
* gfortran.dg/goacc/classify-routine.f95: Likewise.

From-SVN: r247955

7 years agoTest cases to check OpenACC offloaded function's attributes and classification
Thomas Schwinge [Fri, 12 May 2017 08:42:31 +0000 (10:42 +0200)]
Test cases to check OpenACC offloaded function's attributes and classification

gcc/testsuite/
* c-c++-common/goacc/classify-kernels-unparallelized.c: New file.
* c-c++-common/goacc/classify-kernels.c: Likewise.
* c-c++-common/goacc/classify-parallel.c: Likewise.
* c-c++-common/goacc/classify-routine.c: Likewise.
* gfortran.dg/goacc/classify-kernels-unparallelized.f95: Likewise.
* gfortran.dg/goacc/classify-kernels.f95: Likewise.
* gfortran.dg/goacc/classify-parallel.f95: Likewise.
* gfortran.dg/goacc/classify-routine.f95: Likewise.

From-SVN: r247953

7 years agoTypo fixes for "Don't assume __secure_getenv is available"
Thomas Schwinge [Fri, 12 May 2017 07:56:41 +0000 (09:56 +0200)]
Typo fixes for "Don't assume __secure_getenv is available"

libgfortran/
* runtime/environ.c (weak_secure_getenv): Fix "__secure_gettime"
vs. "__secure_getenv" typo.
(secure_getenv): Fix "HAVE__SECURE_GETENV"
vs. "HAVE___SECURE_GETENV" typo.

From-SVN: r247952

7 years agomksigtab.sh: recurse once when adding signals to SIGLIST
Ian Lance Taylor [Fri, 12 May 2017 01:09:42 +0000 (01:09 +0000)]
mksigtab.sh: recurse once when adding signals to SIGLIST

    On MIPS, SIGABRT is defined like this:
     #define SIGIOT   6
     #define SIGABRT  SIGIOT

    This breaks addsig which tries to append __SIGIOT_ to SIGLIST. Signal
    number 6 is later added to the output and go complains about a
    duplicate signal number.

    Fix by recursing once when obtaining the signal number from
    gen-sysinfo.go if the signal is defined as an alias of another signal.
    Also modify the sed expression to 's/.* = //' which is equivalent to
    the original expression but is less misleading given that it might not
    match a number.

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

From-SVN: r247948

7 years agoos: use opendir64 and closedir64 on AIX
Ian Lance Taylor [Fri, 12 May 2017 00:59:15 +0000 (00:59 +0000)]
os: use opendir64 and closedir64 on AIX

    When using readdir64 on AIX, we must also use
    opendir64 and closedir64.

    Issue golang/go#19200

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

From-SVN: r247947

7 years ago* lib/gcc-dg.exp (schedule-cleanups): Add lang dump capability.
Nathan Sidwell [Fri, 12 May 2017 00:28:44 +0000 (00:28 +0000)]
* lib/gcc-dg.exp (schedule-cleanups): Add lang dump capability.

From-SVN: r247946

7 years agoDaily bump.
GCC Administrator [Fri, 12 May 2017 00:16:29 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247945

7 years agore PR go/64238 (ICE in get_partitioning_class, at symtab.c:1775)
Ian Lance Taylor [Thu, 11 May 2017 23:52:54 +0000 (23:52 +0000)]
re PR go/64238 (ICE in get_partitioning_class, at symtab.c:1775)

PR go/64238
* go-gcc.cc (Gcc_backend::implicit_variable_reference): Set
DECL_EXTERNAL, clear TREE_STATIC.

From-SVN: r247937

7 years agors6000-c: Add support for built-in functions vector unsigned char vec_popcnt (vector...
Carl Love [Thu, 11 May 2017 22:10:10 +0000 (22:10 +0000)]
rs6000-c: Add support for built-in functions vector unsigned char vec_popcnt (vector...

gcc/ChangeLog:

2017-05-11  Carl Love  <cel@us.ibm.com>

* config/rs6000/rs6000-c: Add support for built-in functions
vector unsigned char vec_popcnt (vector signed char)
vector unsigned char vec_popcnt (vector unsigned char)
vector unsigned short vec_popcnt (vector signed short)
vector unsigned short vec_popcnt (vector unsigned short)
vector unsigned int vec_popcnt (vector signed int)
vector unsigned int vec_popcnt (vector unsigned int)
vector unsigned long long vec_popcnt (vector signed long long)
vector unsigned long long vec_popcnt (vector unsigned long long)
vector signed long long vec_slo (vector signed long long,
                                         vector signed char)
vector signed long long vec_slo (vector signed long long,
                                         vector unsigned char)
vector unsigned long long vec_slo (vector unsigned long long,
                                           vector signed char)
vector unsigned long long vec_slo (vector unsigned long long,
                                           vector unsigned char)
* config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
* config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
* doc/extend.texi: Update the built-in documentation file for the
new built-in functions.

gcc/testsuite/ChangeLog:

2017-05-11  Carl Love  <cel@us.ibm.com>

* gcc.target/powerpc/builtins-3-p8.c: Add tests for the new built-ins
to the test suite file.
* gcc.target/powerpc/builtins-3.c: Add tests for the new built-ins
to the test suite file.

From-SVN: r247933

7 years agoattribs.h (sorted_attr_string): Move machine independent functions for target clone...
Michael Meissner [Thu, 11 May 2017 21:51:07 +0000 (21:51 +0000)]
attribs.h (sorted_attr_string): Move machine independent functions for target clone support from the i386 port...

2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>

* attribs.h (sorted_attr_string): Move machine independent
functions for target clone support from the i386 port to common
code.  Rename ix86_function_versions to common_function_versions.
Rename make_name to make_unique_name.
(common_function_versions): Likewise.
(make_unique_name): Likewise.
(make_dispatcher_decl): Likewise.
(is_function_default_version): Likewise.
* attribs.c (attr_strcmp): Likewise.
(sorted_attr_string): Likewise.
(common_function_versions): Likewise.
(make_unique_name): Likewise.
(make_dispatcher_decl): Likewise.
(is_function_default_version): Likewise.
* config/i386/i386.c (attr_strcmp): Likewise.
(sorted_attr_string): Likewise.
(ix86_function_versions): Likewise.
(make_name): Likewise.
(make_dispatcher_decl): Likewise.
(is_function_default_version): Likewise.
(TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.

From-SVN: r247932

7 years agoruntime: fix isSystemGoroutine for gccgo
Ian Lance Taylor [Thu, 11 May 2017 20:55:41 +0000 (20:55 +0000)]
runtime: fix isSystemGoroutine for gccgo

    The gc toolchain decides whether a goroutine is a system goroutine by
    comparing startpc to a list of saved special PCs.  In gccgo that
    approach does not work as startpc is often a thunk that invokes the
    real function with arguments, so the thunk address never matches the
    saved special PCs.

    This patch fixes gccgo's understanding of system goroutines.  Since
    there are only a limited number of them, we simply change each one to
    mark itself as special.

    This fixes stack dumps and functions like runtime.NumGoroutine to
    behave more like gc.  It also fixes the goprint test in the gc
    testsuite.

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

From-SVN: r247931

7 years agore PR fortran/78659 ([F03] Spurious "requires DTIO" reported against namelist statement)
Jerry DeLisle [Thu, 11 May 2017 20:40:49 +0000 (20:40 +0000)]
re PR fortran/78659 ([F03] Spurious "requires DTIO" reported against namelist statement)

2017-05-11  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/78659
* io.c (dtio_procs_present): Add new function to check for DTIO
procedures relative to I/O statement READ or WRITE.
(gfc_resolve_dt): Add namelist checks using the new function.
* resolve.c (dtio_procs_present): Remove function and related
namelist checks. (resolve_fl_namelist): Add check specific to
Fortran 95 restriction on namelist objects.

* gfortran.dg/namelist_91.f90: New test.
* gfortran.dg/namelist_92.f90: New test.
* gfortran.dg/namelist_93.f90: New test.
* gfortran.dg/namelist_94.f90: New test.

From-SVN: r247930

7 years ago2017-05-11 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Thu, 11 May 2017 20:30:44 +0000 (20:30 +0000)]
2017-05-11  François Dumont  <fdumont@gcc.gnu.org>

* include/bits/stl_tree.h [_GLIBCXX_INLINE_VERSION]
(_Rb_tree_impl<>): Remove _Is_pod_comparator
template parameter.

From-SVN: r247929

7 years agore PR target/80695 (gratuitous use of stxvx to store multiple pointers)
Bill Schmidt [Thu, 11 May 2017 20:16:02 +0000 (20:16 +0000)]
re PR target/80695 (gratuitous use of stxvx to store multiple pointers)

[gcc]

2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/80695
* config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
Account for direct move costs for vec_construct of integer
vectors.

[gcc/testsuite]

2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

PR target/80695
* gcc.target/powerpc/pr80695-p8.c: New file.
* gcc.target/powerpc/pr80695-p9.c: New file.

From-SVN: r247928

7 years agoDon't assume __secure_getenv is available
Janne Blomqvist [Thu, 11 May 2017 20:04:53 +0000 (23:04 +0300)]
Don't assume __secure_getenv is available

Glibc 2.17 made __secure_getenv an officially supported function, and
renamed it secure_getenv. The libgfortran configure has checked for
both of these, per
https://sourceware.org/glibc/wiki/Tips_and_Tricks/secure_getenv.

Unfortunately, while the dynamical library (libc.so) retains the
__secure_getenv symbol for backwards compatibility, the static library
(libc.a) does not. This means that a libgfortran.a compiled against an
older glibc will not work if one tries to link against a newer
libc.a. This creates problems for providing gfortran binary
distributions that work on as many target systems as possible.

Thus, retain the support for __secure_getenv but call it only via a
weak reference.

Regtested on x86_64-pc-linux-gnu.

2017-05-11  Janne Blomqvist  <jb@gcc.gnu.org>

* libgfortran.h: HAVE_SECURE_GETENV: Don't check
HAVE___SECURE_GETENV.
* environ/runtime.c (secure_getenv): Use __secure_getenv via a
        weak reference.

From-SVN: r247927

7 years ago2017-05-11 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Thu, 11 May 2017 20:03:47 +0000 (20:03 +0000)]
2017-05-11  François Dumont  <fdumont@gcc.gnu.org>

* include/debug/safe_container.h [_GLIBCXX_USE_CXX11_ABI]
(_Safe_container<>): Remove _IsCxx11AllocatorAware template parameter.
* include/debug/string: Adapt.

From-SVN: r247926

7 years ago2017-05-11 François Dumont <fdumont@gcc.gnu.org>
François Dumont [Thu, 11 May 2017 19:49:26 +0000 (19:49 +0000)]
2017-05-11  François Dumont  <fdumont@gcc.gnu.org>

* include/debug/formatter.h [_GLIBCXX_INLINE_VERSION]
(__gnu_debug::_Error_formatter::_Parameter::_M_print_field): Remove.
(__gnu_debug::_Error_formatter::_Parameter::_M_print_description):
Remove.
(__gnu_debug::_Error_formatter::_M_format_word): Remove.
(__gnu_debug::_Error_formatter::_M_print_word): Remove.
(__gnu_debug::_Error_formatter::_M_print_string): Remove.
(__gnu_debug::_Error_formatter::_M_get_max_length): Remove.
* src/c++11/debug.cc: Adapt.
* config/abi/pre/gnu-versioned-namespace.ver: Adapt.

From-SVN: r247925

7 years agoMissing Changelog
Nathan Sidwell [Thu, 11 May 2017 19:15:59 +0000 (19:15 +0000)]
Missing Changelog

Missing Changelog
* libcp1plugin.cc (safe_pushdecl_maybe_friend): Call pushdecl.

From-SVN: r247924

7 years agocp-lang.c (get_global_decls, [...]): Move to ...
Nathan Sidwell [Thu, 11 May 2017 19:09:51 +0000 (19:09 +0000)]
cp-lang.c (get_global_decls, [...]): Move to ...

* cp-lang.c (get_global_decls, cxx_pushdecl, LANG_HOOK_GETDECLS)
LANG_HOOKS_PUSHDECL): Move to ...
* cp-objcp-common.c (cp_get_global_decls, cp_pushdec)
LANG_HOOK_DECLS, LANG_HOOKS_PUSHDECL): ... here.
* cp-objcp-common.h (cp_get_global_decls, cp_pushdecl): Declare.
((--This line, and those below, will be ignored--

M    cp/ChangeLog
M    cp/cp-lang.c
M    cp/cp-objcp-common.c
M    cp/cp-objcp-common.h

From-SVN: r247923

7 years ago* libcp1plugin.cc (plugin_build_decl): Adjust add_method call.
Nathan Sidwell [Thu, 11 May 2017 18:48:55 +0000 (18:48 +0000)]
* libcp1plugin.cc (plugin_build_decl): Adjust add_method call.

From-SVN: r247922

7 years agore PR target/80706 (peephole2 uses uninitialized stack variables on i686)
Uros Bizjak [Thu, 11 May 2017 18:12:25 +0000 (20:12 +0200)]
re PR target/80706 (peephole2 uses uninitialized stack variables on i686)

PR target/80706
* config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
(UNSPEC_STX_ATOMIC): Ditto.
(loaddi_via_sse): New insn.
(storedi_via_sse): Ditto.
(atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
Update corresponding peephole2 patterns.
(atomic_storedi_fpu): Ditto.

testsuite/ChangeLog:

PR target/80706
* gcc.target/i386/pr80706.c: New test.

From-SVN: r247921

7 years ago* config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
Julia Koval [Thu, 11 May 2017 18:01:12 +0000 (20:01 +0200)]
* config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
(_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
New intrinsics.
* config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
(__builtin_ia32_rsqrt14ss_mask): New builtins.
* config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.

testsuite/ChangeLog:

* gcc.target/i386/avx512f-vrsqrt14sd-1.c: Test new intrinsics.
* gcc.target/i386/avx512f-vrsqrt14sd-2.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14ss-1.c: Ditto.
* gcc.target/i386/avx512f-vrsqrt14ss-2.c: Ditto.

From-SVN: r247920

7 years ago* graphite-poly.c: Include dumpfile.h.
Nathan Sidwell [Thu, 11 May 2017 17:43:52 +0000 (17:43 +0000)]
* graphite-poly.c: Include dumpfile.h.

From-SVN: r247919

7 years agoname-lookup.h (pushdecl): Add default friend parm.
Nathan Sidwell [Thu, 11 May 2017 17:38:55 +0000 (17:38 +0000)]
name-lookup.h (pushdecl): Add default friend parm.

* name-lookup.h (pushdecl): Add default friend parm.
(pushdecl_maybe_friend): Delete.
(pushdecl_top_level): Add default friend parm.
(pushdecl_top_level_maybe_friend): Delete.
* name-lookup.c (pushdecl_maybe_friend): Delete.
(pushdecl): Add is_friend parm.
(pushdecl_top_level): Add is friend_parm.
(pushdecl_top_level_maybe_friend, pushdecl_top_level_1): Delete.
(pushdecl_top_level_and_finish): Do pushing and finishing
directly.
* friend.c (do_friend): Adjust.
* pt.c (tsubst_friend_class): Adjust.

From-SVN: r247918

7 years agore PR c++/70538 (ICE on a deprecated access declaration in instantiate_template_1...
Paolo Carlini [Thu, 11 May 2017 17:13:42 +0000 (17:13 +0000)]
re PR c++/70538 (ICE on a deprecated access declaration in instantiate_template_1, at cp/pt.c:17310)

2017-05-11  Paolo Carlini  <paolo.carlini@oracle.com>

PR c++/70538
* g++.dg/cpp0x/pr70538.C: New.

From-SVN: r247917

7 years agodumpfle.h (dump_function): Declare here ...
Nathan Sidwell [Thu, 11 May 2017 15:48:51 +0000 (15:48 +0000)]
dumpfle.h (dump_function): Declare here ...

* dumpfle.h (dump_function): Declare here ...
* tree-dump.h (dump_function): ... not here.
* dumpfile.c: #include tree-cfg.h.
(dump_function): Move here from ...
* tree-dump.c (dump_function): ... here.
* gimplify.c: #include splay-tree.h, not tree-dump.h.
* graphite-poly.c: Don't include tree-dump.h.
* cgraphclones.c: Include dumpfile.h not tree-dump.h.
* print-tree.c: Likewise.
* stor-layout.c: Likewise.
* tree-nested.c: Likewise.

c/
* gimple-parser.c: Don't #include tree-dump.h.

fortran/
* trans-decl.c: Include dumpfile.h not tree-dump.h,

From-SVN: r247916

7 years agoRevert pushdecl_top_level_and_finish name change.
Nathan Sidwell [Thu, 11 May 2017 15:46:48 +0000 (15:46 +0000)]
Revert pushdecl_top_level_and_finish name change.

* name-lookup.h (pushdecl_top_level_and_finish): Resurrect old
name.
* name-lookup.c (pushdecl_top_level_and_finish): Likewise.
* decl.c (cp_make_fname_decl): Adjust.
* decl2.c (get_guard, handle_tls_init):  Adjust.
* rtti.c (get_tinfo_decl, tinfo_base_init):  Adjust.

From-SVN: r247915

7 years agopr22152.c: Fix undefined testcase.
Uros Bizjak [Thu, 11 May 2017 15:41:50 +0000 (17:41 +0200)]
pr22152.c: Fix undefined testcase.

* gcc.target/i386/pr22152.c: Fix undefined testcase.  Remove
unnecessary loop.  Run on 32-bit targets only.
(dg-options): Remove -fno-tree-sink.

From-SVN: r247914

7 years agoAs I will be working on X86 intrinsic equivalents for PowerPC64LE
Steven Munroe [Thu, 11 May 2017 15:41:24 +0000 (15:41 +0000)]
As I will be working on X86 intrinsic equivalents for PowerPC64LE
adding myself to Write After Approval list.

2017-05-11  Steven Munroe  <munroesj@gcc.gnu.org>

* MAINTAINERS: Add myself to Write After Approval section.

From-SVN: r247913

7 years agoFix ViewCVS URLs in libstdc++ manual
Jonathan Wakely [Thu, 11 May 2017 15:01:10 +0000 (16:01 +0100)]
Fix ViewCVS URLs in libstdc++ manual

* doc/xml/manual/allocator.xml: Fix ViewCVS URLs.
* doc/xml/manual/mt_allocator.xml: Likewise.
* doc/html/*: Regenerate.

From-SVN: r247911

7 years agoname-lookup.c (pushdecl_outermost_localscope): Always conditionally stop timer.
Nathan Sidwell [Thu, 11 May 2017 14:51:07 +0000 (14:51 +0000)]
name-lookup.c (pushdecl_outermost_localscope): Always conditionally stop timer.

* name-lookup.c (pushdecl_outermost_localscope): Always
conditionally stop timer.

From-SVN: r247910

7 years agodecl.c (xref_tag_1): Don't frob ts_lambda scope here.
Nathan Sidwell [Thu, 11 May 2017 14:40:28 +0000 (14:40 +0000)]
decl.c (xref_tag_1): Don't frob ts_lambda scope here.

* decl.c (xref_tag_1): Don't frob ts_lambda scope here.
* name-lookup.c (pushtag_1): Deal with ts_lambda scope.

From-SVN: r247909

7 years agodumpfile.h (TDF_FLAGS): New.
Nathan Sidwell [Thu, 11 May 2017 14:23:16 +0000 (14:23 +0000)]
dumpfile.h (TDF_FLAGS): New.

* dumpfile.h (TDF_FLAGS): New.
* dumpfile.c (dump_start): Use TDF_FLAGS.
(dump_enable_all): Fix TDF_KIND check thinko.

From-SVN: r247908

7 years agocmpb-1.c: New test.
Kelvin Nilsen [Thu, 11 May 2017 14:13:31 +0000 (14:13 +0000)]
cmpb-1.c: New test.

gcc/testsuite/ChangeLog:

2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/cmpb-1.c: New test.
* gcc.target/powerpc/cmpb-2.c: New test.
* gcc.target/powerpc/cmpb-3.c: New test.
* gcc.target/powerpc/cmpb32-1.c: New test.
* gcc.target/powerpc/cmpb32-2.c: New test.

gcc/ChangeLog:

2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
array entries to represent two legal parameterizations of the
overloaded __builtin_cmpb function, as represented by the
P6_OV_BUILTIN_CMPB constant.
(altivec_resolve_overloaded_builtin): Add special case handling
for the __builtin_cmpb function, as represented by the
P6_OV_BUILTIN_CMPB constant.
* config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
(BU_P6_64BIT_2): New macro.
(BU_P6_OVERLOAD_2): New macro
(CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
(CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
(CMPB): Add overload support to represent both 32-bit and 64-bit
compare-bytes function.
* config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
support for TARGET_CMPB.
* config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
* doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
documentation of the __builtin_cmpb overloaded built-in function.

From-SVN: r247907

7 years agore PR tree-optimization/80705 (Incorrect code generated for profile counter updates...
Richard Biener [Thu, 11 May 2017 14:08:07 +0000 (14:08 +0000)]
re PR tree-optimization/80705 (Incorrect code generated for profile counter updates due to SLP+LIM)

2017-05-11  Richard Biener  <rguenther@suse.de>

PR tree-optimization/80705
* tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
bases are not vectorizable.

* gcc.dg/vect/bb-slp-pr80705.c: New testcase.

From-SVN: r247906

7 years agoPR libstdc++/80285 optimize std::make_shared for -fno-rtti
Jonathan Wakely [Thu, 11 May 2017 13:21:07 +0000 (14:21 +0100)]
PR libstdc++/80285 optimize std::make_shared for -fno-rtti

PR libstdc++/80285
* include/bits/shared_ptr_base.h (_Sp_make_shared_tag::_S_ti): Define
function to get unique fake std::type_info reference.
(_Sp_counted_ptr_inplace::_M_get_deleter) [!__cpp_rtti]: Compare to
_S_ti() fake reference.
(__shared_ptr(_Sp_make_shared_tag, const Alloc&, Args&&...)): Share
single implementation with or without RTTI enable.
[!__cpp_rtti]: Pass fake reference to _M_get_deleter.
* testsuite/20_util/shared_ptr/creation/alloc.cc: Change expected
allocation and deallocation counts.
* testsuite/20_util/shared_ptr/creation/single_allocation.cc: New.
* testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
New.

From-SVN: r247905

7 years agoscanlang.exp: New.
Nathan Sidwell [Thu, 11 May 2017 13:09:42 +0000 (13:09 +0000)]
scanlang.exp: New.

* lib/scanlang.exp: New.
* lib/gcc-dg.exp: Load scanlang.exp.
* g++.dg/inherit/covariant7.C: Use scan-lang-dump.

From-SVN: r247904

7 years agoGIMPLEFE: Handle invalid SSA names
Mikhail Maltsev [Thu, 11 May 2017 12:27:37 +0000 (12:27 +0000)]
GIMPLEFE: Handle invalid SSA names

gcc/testsuite/

PR testsuite/80580
* gcc.dg/gimplefe-error-6.c: New test.

gcc/c/

PR testsuite/80580
* gimple-parser.c (c_parser_parse_ssa_name): Validate SSA name base.

From-SVN: r247903

7 years agocp-tree.h (pushdecl, [...]): Move declarations to ...
Nathan Sidwell [Thu, 11 May 2017 11:57:01 +0000 (11:57 +0000)]
cp-tree.h (pushdecl, [...]): Move declarations to ...

* cp-tree.h (pushdecl, pushdecl_maybe_friend, pushtag)
pushtag_top_level_maybe_friend,
pushdecl_top_level_and_finish): Move declarations to ...
* name-lookup.h: ... here.  Group pushdecl variants.
(pushdecl_top_level_and_finish): Rename to ...
(pushdecl_top_level_with_init): ... here.
* decl.c (cp_make_fname_decl): Use pushdecl_top_level_with_init.
* decl2.c (get_guard, handle_tls_init): Likewise.
* rtti.c (get_tinfo_decl, tinfo_base_init): Likewise.
* lambda.c (maybe_add_lambda_conv_op): Use namespace_bindings_p.
* method.c (implicitly_declare_fn): Likewise.
* searchc (node_debug_info_needed): Likewise.
* name-lookup.c (pushdecl_top_level_and_finish): Rename to ...
(pushdecl_top_level_with_init): ... here.
(pop_everything): Use namespace_bindings_p.
(--This line, and those below, will be ignored--

M    cp/ChangeLog
M    cp/method.c
M    cp/cp-tree.h
M    cp/decl.c
M    cp/lambda.c
M    cp/rtti.c
M    cp/name-lookup.c
M    cp/decl2.c
M    cp/name-lookup.h
M    cp/search.c

From-SVN: r247902

7 years agoname-lookup.h (pop_binding): Rename to pop_local_binding.
Nathan Sidwell [Thu, 11 May 2017 11:06:26 +0000 (11:06 +0000)]
name-lookup.h (pop_binding): Rename to pop_local_binding.

* name-lookup.h (pop_binding): Rename to pop_local_binding.
(getdecls): Rename to get_local_decls.
* name-lookup.c (pop_binding): Rename to ...
(pop_local_binding): ... here.
(pop_bindings_and_leave_scope): Adjust.
(getdecls): Rename to ...
(get_local_decls): ... here.  Assert local scope.
* decl.c (poplevel): Assert not namespace.  Adjust and simplify
logic.
(store_parm_decls): Adjust get_local_decls call.
(parser.c (synthesize_implicit_template_parm): Likewise.

From-SVN: r247901

7 years agoGIMPLEFE: handle invalid __MEM
Mikhail Maltsev [Thu, 11 May 2017 10:55:52 +0000 (10:55 +0000)]
GIMPLEFE: handle invalid __MEM

gcc/c/

PR testsuite/80580
* gimple-parser.c (c_parser_gimple_postfix_expression): Handle
incorrect __MEM syntax.

gcc/testsuite/

PR testsuite/80580
* gcc.dg/gimplefe-error-5.c: New test.

From-SVN: r247900

7 years agoGIMPLEFE: Handle invalid unary "*" operand type
Mikhail Maltsev [Thu, 11 May 2017 10:48:54 +0000 (10:48 +0000)]
GIMPLEFE: Handle invalid unary "*" operand type

gcc/c/

PR testsuite/80580
* gimple-parser.c (c_parser_gimple_unary_expression): Check argument
type of unary '*'.

gcc/testsuite/

PR testsuite/80580
* gcc.dg/gimplefe-error-4.c: New test.

From-SVN: r247899

7 years agotree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger when counting registe...
Bin Cheng [Thu, 11 May 2017 09:57:06 +0000 (09:57 +0000)]
tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger when counting register pressure.

* tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
when counting register pressure.

From-SVN: r247898

7 years agotree-ssa-loop-ivopts.c (compare_cost_pair): New.
Bin Cheng [Thu, 11 May 2017 09:55:56 +0000 (09:55 +0000)]
tree-ssa-loop-ivopts.c (compare_cost_pair): New.

* tree-ssa-loop-ivopts.c (compare_cost_pair): New.
(iv_ca_more_deps): Renamed to ...
(iv_ca_compare_deps): ... this.
(iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.

From-SVN: r247897

7 years agotree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump to ...
Bin Cheng [Thu, 11 May 2017 09:54:30 +0000 (09:54 +0000)]
tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump to ...

* tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
to ...
(determine_group_iv_costs): ... here.
(find_inv_vars_cb): Record inv var if it's not recorded before.

From-SVN: r247896

7 years agotree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
Bin Cheng [Thu, 11 May 2017 09:52:52 +0000 (09:52 +0000)]
tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.

* tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
(get_shiftadd_cost): Ditto.

From-SVN: r247895

7 years agotree-ssa-address.c: Include header file.
Bin Cheng [Thu, 11 May 2017 09:51:41 +0000 (09:51 +0000)]
tree-ssa-address.c: Include header file.

* tree-ssa-address.c: Include header file.
(move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
address.
(add_to_parts): Refactor.
(addr_to_parts): New parameter.  Update use of move_hint_to_base.
(create_mem_ref): Update use of addr_to_parts.  Re-associate addr
in new order.

From-SVN: r247894

7 years agore PR tree-optimization/53090 (suboptimal ivopt)
Bin Cheng [Thu, 11 May 2017 09:50:15 +0000 (09:50 +0000)]
re PR tree-optimization/53090 (suboptimal ivopt)

PR tree-optimization/53090
* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
COMP_IV_EXPR_2.
(extract_cond_operands): Detect condition with IV on both sides
and return COMP_IV_EXPR_2.
(find_interesting_uses_cond): Add iv_use for both IVs in condition.
(rewrite_use_compare): Simplify by removing call to function
extract_cond_operands.

From-SVN: r247893

7 years agotree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
Bin Cheng [Thu, 11 May 2017 09:48:55 +0000 (09:48 +0000)]
tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.

* tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
(extract_cond_operands): Detect condition comparing against non-
invariant bound and return appropriate enum value.
(find_interesting_uses_cond): Update use of extract_cond_operands.
Handle its return value accordingly.
(determine_group_iv_cost_cond, rewrite_use_compare): Ditto.

From-SVN: r247892

7 years agotree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate nonlinear iv_use...
Bin Cheng [Thu, 11 May 2017 09:47:24 +0000 (09:47 +0000)]
tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate nonlinear iv_use computation in loop invariant sensitive way.

* tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
nonlinear iv_use computation in loop invariant sensitive way.

From-SVN: r247891

7 years agotree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
Bin Cheng [Thu, 11 May 2017 09:42:36 +0000 (09:42 +0000)]
tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.

* tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
(find_iv_candidates): Call relate_compare_use_with_all_cands.

From-SVN: r247890

7 years agotree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
Bin Cheng [Thu, 11 May 2017 09:40:48 +0000 (09:40 +0000)]
tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.

* tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
(dump_cand): Support iv_cand.inv_exprs.
(add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
for candidates.
(iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
iv_cand.inv_exprs.

From-SVN: r247889

7 years agotree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move from ...
Bin Cheng [Thu, 11 May 2017 09:38:22 +0000 (09:38 +0000)]
tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move from ...

* tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
from ...
* tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
as local function.  Include necessary header files.
* tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.

From-SVN: r247888

7 years ago* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
Bin Cheng [Thu, 11 May 2017 09:36:05 +0000 (09:36 +0000)]
* tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.

From-SVN: r247887

7 years agotree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more operators...
Bin Cheng [Thu, 11 May 2017 09:33:49 +0000 (09:33 +0000)]
tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more operators...

* tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
RSHIFT_EXPR and BIT_NOT_EXPR.

From-SVN: r247886

7 years agotree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
Bin Cheng [Thu, 11 May 2017 09:31:18 +0000 (09:31 +0000)]
tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.

* tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
(adjust_setup_cost): New parameter supporting round up adjustment.
(struct address_cost_data): Delete.
(force_expr_to_var_cost): Don't bound cost with spill_cost.
(split_address_cost, ptr_difference_cost): Delete.
(difference_cost, compare_aff_trees, record_inv_expr): Delete.
(struct ainc_cost_data): New struct.
(get_address_cost_ainc): New function.
(get_address_cost, get_computation_cost): Reimplement.
(determine_group_iv_cost_address): Record inv_expr for all uses of
a group.
(determine_group_iv_cost_cond): Call get_loop_invariant_expr.
(iv_ca_has_deps): Reimplemented to ...
(iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
than OLD_CP.
(iv_ca_extend): Call iv_ca_more_deps.

From-SVN: r247885

7 years agotree-ssa-address.c (struct mem_address): Move to header file.
Bin Cheng [Thu, 11 May 2017 09:27:55 +0000 (09:27 +0000)]
tree-ssa-address.c (struct mem_address): Move to header file.

* tree-ssa-address.c (struct mem_address): Move to header file.
(valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
* tree-ssa-address.h (struct mem_address): Move from C file.
(valid_mem_ref_p, move_fixed_address_to_symbol): Declare.

From-SVN: r247884

7 years agotree-affine.h (aff_combination_type): New interface.
Bin Cheng [Thu, 11 May 2017 09:25:30 +0000 (09:25 +0000)]
tree-affine.h (aff_combination_type): New interface.

* tree-affine.h (aff_combination_type): New interface.
(aff_combination_zero_p): Remove static.
(aff_combination_const_p): New interface.
(aff_combination_singleton_var_p): New interfaces.

From-SVN: r247883

7 years agotree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks...
Richard Biener [Thu, 11 May 2017 09:16:00 +0000 (09:16 +0000)]
tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Skip unreachable blocks and destinations.

2017-05-11  Richard Biener  <rguenther@suse.de>

* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
Skip unreachable blocks and destinations.
(eliminate): Move stmt removal and fixup ...
(fini_eliminate): ... here.  Skip inserted exprs.
(pass_pre::execute): Move fini_pre after fini_eliminate.
* tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
(tail_merge_optimize): Run cleanup_tree_cfg if requested by
PRE to get rid of dead code that has invalid SSA form and
split critical edges again.

From-SVN: r247882

7 years ago* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
Bin Cheng [Thu, 11 May 2017 09:10:01 +0000 (09:10 +0000)]
* rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.

From-SVN: r247881

7 years agore PR c++/80682 (__is_trivially_constructible(void, int) returns true.)
Ville Voutilainen [Thu, 11 May 2017 07:44:29 +0000 (10:44 +0300)]
re PR c++/80682 (__is_trivially_constructible(void, int) returns true.)

PR c++/80682

cp/

PR c++/80682
* method.c (is_trivially_xible): Reject void types.

testsuite/

PR c++/80682
* g++.dg/ext/is_trivially_constructible1.C: Add tests for void target.

From-SVN: r247880

7 years agopasses.c (execute_function_todo): Verify loops if they are said to be up-to-date.
Richard Biener [Thu, 11 May 2017 07:26:32 +0000 (07:26 +0000)]
passes.c (execute_function_todo): Verify loops if they are said to be up-to-date.

2017-05-11  Richard Biener  <rguenther@suse.de>

* passes.c (execute_function_todo): Verify loops if they are
said to be up-to-date.
* cfgexpand.c (pass_expand::execute): Discard loops for -dx.
* trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.

From-SVN: r247879

7 years agoDaily bump.
GCC Administrator [Thu, 11 May 2017 00:16:37 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r247878

7 years agore PR target/80090 (Incorrect assembler - output_addr_const may generate visibility...
John David Anglin [Wed, 10 May 2017 23:54:58 +0000 (23:54 +0000)]
re PR target/80090 (Incorrect assembler - output_addr_const may generate visibility output between op and address constant)

PR target/80090
* config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
handle calling assemble_external ourself.

From-SVN: r247872

7 years agore PR target/79027 (fold-const.c:11104:1: internal compiler error: Floating point...
John David Anglin [Wed, 10 May 2017 22:54:07 +0000 (22:54 +0000)]
re PR target/79027 (fold-const.c:11104:1: internal compiler error: Floating point exception)

PR target/79027
* config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
modes with zero size.  Enhance comment.

From-SVN: r247869

7 years agoclass.c (handle_using_decl): Always use OVL_CURRENT.
Nathan Sidwell [Wed, 10 May 2017 20:53:32 +0000 (20:53 +0000)]
class.c (handle_using_decl): Always use OVL_CURRENT.

* class.c (handle_using_decl): Always use OVL_CURRENT.
(resolve_address_of_overloaded_function): Move iterator decl into
for scope.  Don't strip anticipated decls here.

From-SVN: r247864

7 years agopt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD printing.
Nathan Sidwell [Wed, 10 May 2017 20:47:16 +0000 (20:47 +0000)]
pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD printing.

* pt.c (print_candidates_1): Separate TREE_LIST and OVERLOAD
printing.
(print_candidates): Adjust.

From-SVN: r247863

7 years agocp-tree.h (build_new_function_call): Lose koenig_p arg.
Nathan Sidwell [Wed, 10 May 2017 20:43:09 +0000 (20:43 +0000)]
cp-tree.h (build_new_function_call): Lose koenig_p arg.

* cp-tree.h (build_new_function_call): Lose koenig_p arg.  Fix
line breaking.
* call.c (build_new_function_call): Lose koenig_p arg.  Remove
koenig_p handling here.
* pt.c (push_template_decl_real): Unconditionally
retrofit_lang_decl.
(tsubst_omp_clauses): Likewise.
(do_class_deduction): Adjust buld_new_function_call calls.
* semantics.c (finish_call_expr): Likewise.

From-SVN: r247860