gcc.git
8 years agoFix PR70278, a problem with the previous split_reg change
Bernd Schmidt [Fri, 18 Mar 2016 19:09:08 +0000 (19:09 +0000)]
Fix PR70278, a problem with the previous split_reg change

PR rtl-optimization/70278
* lra-constraints.c (split_reg): Handle the case where biggest_mode is
VOIDmode.

testsuite/
* gcc.dg/torture/pr70278.c: New test.
* gcc.target/arm/pr70278.c: New test.

From-SVN: r234342

8 years agoPR c/70281: C FE: fix uninitialized range for __builtin_types_compatible_p
David Malcolm [Fri, 18 Mar 2016 17:45:42 +0000 (17:45 +0000)]
PR c/70281: C FE: fix uninitialized range for __builtin_types_compatible_p

gcc/c/ChangeLog:
PR c/70281
* c-parser.c (c_parser_postfix_expression): Set the source range
for uses of "__builtin_types_compatible_p".

gcc/testsuite/ChangeLog:
PR c/70281
* gcc.dg/plugin/diagnostic-test-expressions-1.c
(test_builtin_types_compatible_p): New test function.
* gcc.dg/pr70281.c: New test case.

From-SVN: r234340

8 years ago* libsupc++/guard.cc: Revert my last commit.
Uros Bizjak [Fri, 18 Mar 2016 15:44:44 +0000 (16:44 +0100)]
* libsupc++/guard.cc: Revert my last commit.

From-SVN: r234336

8 years agoPR c++/70147 - handle primary virtual bases
Jason Merrill [Fri, 18 Mar 2016 15:31:35 +0000 (11:31 -0400)]
PR c++/70147 - handle primary virtual bases

* class.c (vptr_via_virtual_p): New.
(most_primary_binfo): Factor out of build_rtti_vtbl_entries.
* cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Don't clear
a vptr from any virtual base in a not-in-charge 'structor.

From-SVN: r234335

8 years agoAvoid clobbering primary virtual base when not in charge.
Jason Merrill [Fri, 18 Mar 2016 15:31:29 +0000 (11:31 -0400)]
Avoid clobbering primary virtual base when not in charge.

* decl.c (build_clobber_this): Factor out of
start_preparsed_function and begin_destructor_body.  Handle
virtual bases better.

From-SVN: r234334

8 years agoclass.c (build_if_in_charge): Split out from build_base_path.
Jason Merrill [Fri, 18 Mar 2016 15:31:24 +0000 (11:31 -0400)]
class.c (build_if_in_charge): Split out from build_base_path.

* class.c (build_if_in_charge): Split out from build_base_path.

* init.c (expand_virtual_init, expand_default_init): Use it.
* call.c (build_special_member_call): Use it.

From-SVN: r234333

8 years ago* calls.c (load_register_parameters): Fix zero size sibcall logic.
Jason Merrill [Fri, 18 Mar 2016 15:31:18 +0000 (11:31 -0400)]
* calls.c (load_register_parameters): Fix zero size sibcall logic.

From-SVN: r234332

8 years agoRevert:
Uros Bizjak [Fri, 18 Mar 2016 15:28:54 +0000 (16:28 +0100)]
Revert:

2015-07-02  Uros Bizjak  <ubizjak@gmail.com>

* libsupc++/guard.cc (__test_and_acquire): Use __p after __atomic_load
to avoid unused variable warning.
(__set_and_release): Use __p after __atomic_store to avoid unused
variable warning.

From-SVN: r234331

8 years agore PR target/70113 ([AArch64] -mpc-relative-literal-loads conflicts with fix-cortex...
Christophe Lyon [Fri, 18 Mar 2016 13:58:32 +0000 (13:58 +0000)]
re PR target/70113 ([AArch64] -mpc-relative-literal-loads conflicts with fix-cortex-a53-843419)

2016-03-18  Christophe Lyon  <christophe.lyon@linaro.org>

PR target/70113
* gcc.target/aarch64/pr63304_1.c: Add -mno-fix-cortex-a53-843419.

From-SVN: r234330

8 years agosse.md: Use vpbroadcastq for broadcasting DF values to 128b regs.
Kirill Yukhin [Fri, 18 Mar 2016 11:36:30 +0000 (11:36 +0000)]
sse.md: Use vpbroadcastq for broadcasting DF values to 128b regs.

gcc/
        * config/i386/sse.md: Use vpbroadcastq for broadcasting DF
        values to 128b regs.

From-SVN: r234325

8 years agore PR tree-optimization/70252 (ICE in vect_get_vec_def_for_stmt_copy with -O3 -march...
Ilya Enkovich [Fri, 18 Mar 2016 09:36:32 +0000 (09:36 +0000)]
re PR tree-optimization/70252 (ICE in vect_get_vec_def_for_stmt_copy with -O3 -march=skylake-avx512.)

gcc/

PR tree-optimization/70252
* tree-vect-stmts.c (supportable_widening_operation): Check resulting
boolean vector has a proper number of elements.
(supportable_narrowing_operation): Likewise.

gcc/testsuite/

PR tree-optimization/70252
* gcc.dg/pr70252.c: New test.

From-SVN: r234323

8 years agoAdd testcases for pr70161
Tom de Vries [Fri, 18 Mar 2016 09:17:33 +0000 (09:17 +0000)]
Add testcases for pr70161

2016-03-18  Tom de Vries  <tom@codesourcery.com>

* gcc.dg/pr70161-2.c: New test.
* gcc.dg/pr70161.c: New test.

From-SVN: r234322

8 years agoSet dump_file to NULL in cgraph_node::get_body
Tom de Vries [Fri, 18 Mar 2016 09:17:23 +0000 (09:17 +0000)]
Set dump_file to NULL in cgraph_node::get_body

2016-03-18  Tom de Vries  <tom@codesourcery.com>

PR ipa/70269
* cgraph.c (cgraph_node::get_body): Set dump_file to NULL after save.

* gcc.dg/pr70269.c: New test.

From-SVN: r234321

8 years agoreload1.c (emit_input_reload_insns): Use simplify_replace_rtx instead of replace_rtx...
Jakub Jelinek [Fri, 18 Mar 2016 08:25:57 +0000 (09:25 +0100)]
reload1.c (emit_input_reload_insns): Use simplify_replace_rtx instead of replace_rtx for DEBUG_INSNs.

* reload1.c (emit_input_reload_insns): Use simplify_replace_rtx
instead of replace_rtx for DEBUG_INSNs.

From-SVN: r234320

8 years agore PR c++/70267 (ICE on invalid code at -O1 and above on x86_64-linux-gnu in propagat...
Jakub Jelinek [Fri, 18 Mar 2016 07:59:36 +0000 (08:59 +0100)]
re PR c++/70267 (ICE on invalid code at -O1 and above on x86_64-linux-gnu in propagate_necessity, at tree-ssa-dce.c:924)

PR c++/70267
* init.c (build_new_1): Complain and return error_mark_node
if alloc_fn is not _Jv_AllocObject function returning pointer.

* g++.dg/ext/java-3.C: New test.

From-SVN: r234319

8 years agoFix latencies in znver1.md
Venkataramanan Kumar [Fri, 18 Mar 2016 07:49:00 +0000 (07:49 +0000)]
Fix latencies in znver1.md

2016-03-18  Venkataramanan Kumar  <venkataramanan.kumar@amd.com>

        * config/i386/znver1.md : Fix latencies of FP/SSE/AVX
        load type reservations.

From-SVN: r234318

8 years agoFix PR c++/70205 (ICE on valid call to qualified static member function)
Patrick Palka [Fri, 18 Mar 2016 01:26:50 +0000 (01:26 +0000)]
Fix PR c++/70205 (ICE on valid call to qualified static member function)

gcc/cp/ChangeLog:

PR c++/70205
* search.c (adjust_result_of_qualified_name_lookup): Don't
update the BASELINK_BINFO of DECL if the second call
to lookup_base fails.

gcc/testsuite/ChangeLog:

PR c++/70205
* g++.dg/lookup/pr70205.C: New test.

From-SVN: r234317

8 years agoFix PR c++/70218 (illegal access to private field succeeds)
Patrick Palka [Fri, 18 Mar 2016 01:23:26 +0000 (01:23 +0000)]
Fix PR c++/70218 (illegal access to private field succeeds)

gcc/cp/ChangeLog:

PR c++/70218
* parser.c (cp_parser_lambda_expression): Move call to
pop_deferring_access_checks ahead of the call to
cp_parser_end_tentative_firewall.

gcc/testsuite/ChangeLog:

PR c++/70218
* g++.dg/cpp0x/lambda/lambda-70218.C: New test.

From-SVN: r234316

8 years agoDaily bump.
GCC Administrator [Fri, 18 Mar 2016 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234315

8 years agore PR middle-end/70280 (-fcompare-debug failure (length) with --param=integer-share...
Jakub Jelinek [Thu, 17 Mar 2016 23:00:04 +0000 (00:00 +0100)]
re PR middle-end/70280 (-fcompare-debug failure (length) with --param=integer-share-limit=4016 -mavx512bw)

PR c/70280
* c-typeck.c (composite_type): Don't count void_list_node
into len, if the list is terminated by void_list_node, start
with void_list_node instead of NULL for newargs.  Stop
at void_list_node.

From-SVN: r234312

8 years agoSync top-level configure.ac with binutils-gdb.
Cary Coutant [Thu, 17 Mar 2016 22:54:19 +0000 (15:54 -0700)]
Sync top-level configure.ac with binutils-gdb.

2016-03-17  Cary Coutant  <ccoutant@gmail.com>

* configure.ac: Add mips and s390 to the gold target check.
* configure: Regenerate.

From-SVN: r234309

8 years agore PR target/70188 (gcc 4.9+ miscompiles code on hppa)
John David Anglin [Thu, 17 Mar 2016 22:49:15 +0000 (22:49 +0000)]
re PR target/70188 (gcc 4.9+ miscompiles code on hppa)

PR target/70188
* config/pa/constraints.md: Revert 2015-02-13 change.  Use
define_constraint for "Q" and "T" constraints.

From-SVN: r234308

8 years agoTweak the pipeline model for Exynos M1
Evandro Menezes [Thu, 17 Mar 2016 21:20:50 +0000 (21:20 +0000)]
Tweak the pipeline model for Exynos M1

* gcc/config/aarch64/aarch64.c
(exynosm1_tunings): Enable the weak prefetching model.

From-SVN: r234307

8 years agore PR c/69407 (-Wunused-value on __atomic_fetch_OP and __atomic_OP_fetch)
Marek Polacek [Thu, 17 Mar 2016 18:43:08 +0000 (18:43 +0000)]
re PR c/69407 (-Wunused-value on __atomic_fetch_OP and __atomic_OP_fetch)

PR c/69407
* c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
operations.

* gcc.dg/atomic-op-6.c: New test.

From-SVN: r234304

8 years agoPR c/70264: fix crash in compatible_locations_p with BUILTINS_LOCATION
David Malcolm [Thu, 17 Mar 2016 18:27:47 +0000 (18:27 +0000)]
PR c/70264: fix crash in compatible_locations_p with BUILTINS_LOCATION

In r234088 my fix for PR c++/70105 didn't allow for the possibility that
when comparing a pair of macro expansion histories that one of the
macros in the history might not be located within a line-map, and
PR c/70264 reports a crash due to encountering BUILTINS_LOCATION within
the traversal.

Fixed thusly.

Successfully bootstrapped on x86_64-pc-linux-gnu; adds 4 PASS results
to gcc.sum and 12 to g++.sum.

gcc/ChangeLog:
PR c/70264
* diagnostic-show-locus.c (compatible_locations_p): Handle the case
where one or both locations aren't within a line_map.

gcc/testsuite/ChangeLog:
PR c/70264
* c-c++-common/pr70264.c: New test case.

From-SVN: r234303

8 years agore PR tree-optimization/70144 (g++ ICE at -O1 and above on valid code on x86_64-linux...
Jakub Jelinek [Thu, 17 Mar 2016 15:58:22 +0000 (16:58 +0100)]
re PR tree-optimization/70144 (g++ ICE at -O1 and above on valid code on x86_64-linux-gnu in "copy_reference_ops_from_ref")

PR c++/70144
* cp-tree.h (magic_varargs_p): Return int instead of bool.
* call.c (magic_varargs_p): Return int instead of bool, return 2 for
Cilk+ reductions, otherwise 1 for magic varargs and 0 for normal
varargs.
(build_over_call): If magic_varargs_p == 2, call reject_gcc_builtin,
if magic_varargs_p == 1, call decay_conversion
instead of mark_type_use.  Don't store error_mark_node arguments to
argarray, instead return error_mark_node.

* c-c++-common/pr70144-1.c: New test.
* c-c++-common/pr70144-2.c: New test.

From-SVN: r234297

8 years agore PR c++/70272 (-flifetime-dse miscompilation starting with r217967)
Jakub Jelinek [Thu, 17 Mar 2016 15:56:19 +0000 (16:56 +0100)]
re PR c++/70272 (-flifetime-dse miscompilation starting with r217967)

PR c++/70272
* decl.c (begin_destructor_body): Don't insert clobber if
is_empty_class (current_class_type).

* g++.dg/opt/flifetime-dse5.C (main): Remove extra semicolon.
* g++.dg/opt/flifetime-dse6.C: New test.
* g++.dg/tree-ssa/ehcleanup-1.C: Adjust unreachable count.

From-SVN: r234296

8 years agoProperly set flag_pie and flag_pic
H.J. Lu [Thu, 17 Mar 2016 15:11:35 +0000 (15:11 +0000)]
Properly set flag_pie and flag_pic

We can't set flag_pie to the default when flag_pic == 0, which may be
set by -fno-pic or -fno-PIC, since the default value of flag_pie is
non-zero when GCC is configured with --enable-default-pie.  We need
to initialize flag_pic to -1 so that we can tell if -fpic, -fPIC,
-fno-pic or -fno-PIC is used.

Since Darwin defaults to PIC (__PIC__ == 2) and the PIC setting can't
be changed, skip tests of default __PIC__ and __PIE__ setting for
*-*-darwin* targets.

gcc/

PR driver/70192
* opts.c (finish_options): Don't set flag_pie to the default if
-fpic, -fPIC, -fno-pic or -fno-PIC is used.  Set flag_pic to 0
if it is -1.

gcc/testsuite/

PR driver/70192
* gcc.dg/pic-1.c: New test.
* gcc.dg/pic-2.c: Likewise.
* gcc.dg/pic-3.c: Likewise.
* gcc.dg/pic-4.c: Likewise.
* gcc.dg/pie-1.c: Likewise.
* gcc.dg/pie-2.c: Likewise.
* gcc.dg/pie-3.c: Likewise.
* gcc.dg/pie-4.c: Likewise.
* gcc.dg/pie-5.c: Likewise.
* gcc.dg/pie-6.c: Likewise.

From-SVN: r234295

8 years agoRename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE
Thomas Schwinge [Thu, 17 Mar 2016 15:07:54 +0000 (16:07 +0100)]
Rename GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE

Also rename the Fortran OMP_MAP_FORCE_DEALLOC to OMP_MAP_DELETE.

include/
* gomp-constants.h (enum gomp_map_kind): Rename
GOMP_MAP_FORCE_DEALLOC to GOMP_MAP_DELETE.  Adjust all users.

gcc/fortran/
* gfortran.h (enum gfc_omp_map_op): Rename OMP_MAP_FORCE_DEALLOC
to OMP_MAP_DELETE.  Adjust all users.

From-SVN: r234294

8 years agoAdd goacc/kernels-alias-{3,4}.f95
Tom de Vries [Thu, 17 Mar 2016 14:56:43 +0000 (14:56 +0000)]
Add goacc/kernels-alias-{3,4}.f95

2016-03-17  Tom de Vries  <tom@codesourcery.com>

* gfortran.dg/goacc/kernels-alias-3.f95: New test.
* gfortran.dg/goacc/kernels-alias-4.f95: New test.

From-SVN: r234292

8 years agoi386.md (*movv4qicc_insn+1..36): Pass true as ALL_REGS argument to replace_rtx.
Joern Rennecke [Thu, 17 Mar 2016 14:10:39 +0000 (14:10 +0000)]
i386.md (*movv4qicc_insn+1..36): Pass true as ALL_REGS argument to replace_rtx.

        * config/i386/i386.md (*movv4qicc_insn+1..36): Pass
        true as ALL_REGS argument to replace_rtx.

From-SVN: r234290

8 years agore PR debug/70271 (internal compiler error: in dwarf2out_finish, at dwarf2out.c:27346)
Richard Biener [Thu, 17 Mar 2016 13:43:01 +0000 (13:43 +0000)]
re PR debug/70271 (internal compiler error: in dwarf2out_finish, at dwarf2out.c:27346)

2016-03-17  Richard Biener  <rguenther@suse.de>

PR debug/70271
* dwarf2out.c (dwarf2out_early_finish): Process deferred_asm_name
last.

* g++.dg/debug/pr70271.C: New testcase.

From-SVN: r234289

8 years agore PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with...
Jakub Jelinek [Thu, 17 Mar 2016 11:53:53 +0000 (12:53 +0100)]
re PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with r227382)

PR target/70245
* rtl.h (replace_rtx): Add ALL_REGS argument.
* rtlanal.c (replace_rtx): Likewise.  If true, use REGNO
equality and assert mode is the same, instead of just rtx pointer
equality.
* config/i386/i386.md (mov + arithmetics with load peephole): Pass
true as ALL_REGS argument to replace_rtx.

From-SVN: r234285

8 years agoSet flag_pic to flag_pie for PIE in LTO
H.J. Lu [Thu, 17 Mar 2016 11:07:10 +0000 (11:07 +0000)]
Set flag_pic to flag_pie for PIE in LTO

Since PIE implies PIC, we should set flag_pic to flag_pie for PIE in
LTO.

PR lto/70258
* lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
PIE.

From-SVN: r234284

8 years agomatch.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Apply for boolean vector with...
Ilya Enkovich [Thu, 17 Mar 2016 10:58:26 +0000 (10:58 +0000)]
match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Apply for boolean vector with vector mode only.

gcc/

* match.pd (A + (B vcmp C ? 1 : 0) -> A - (B vcmp C)): Apply
for boolean vector with vector mode only.
(A - (B vcmp C ? 1 : 0) -> A + (B vcmp C)): Likewise.

gcc/testsuite/

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

From-SVN: r234283

8 years agoSummary: libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32
Andreas Schwab [Thu, 17 Mar 2016 10:47:58 +0000 (10:47 +0000)]
Summary: libffi: define FFI_SIZEOF_JAVA_RAW for aarch64 ILP32

* src/aarch64/ffitarget.h (FFI_SIZEOF_JAVA_RAW) [__ILP32__]:
Define.

From-SVN: r234282

8 years agore PR c++/70194 (missing -Waddress on constexpr pointer)
Marek Polacek [Thu, 17 Mar 2016 10:29:36 +0000 (10:29 +0000)]
re PR c++/70194 (missing -Waddress on constexpr pointer)

PR c++/70194
* typeck.c (warn_for_null_address): New function.
(cp_build_binary_op): Call it.

* g++.dg/warn/constexpr-70194.C: New test.

From-SVN: r234281

8 years agore PR target/70162 ([RX] const_int printing causes wrong code on 32 bit host)
Nick Clifton [Thu, 17 Mar 2016 10:16:38 +0000 (10:16 +0000)]
re PR target/70162 ([RX] const_int printing causes wrong code on 32 bit host)

PR target/70162
* config/rx/rx.c (rx_print_integer): Print negative constants in
decimal.

From-SVN: r234280

8 years agore PR rtl-optimization/70261 (r234265 causes fails on rs6000)
Jakub Jelinek [Thu, 17 Mar 2016 08:01:26 +0000 (09:01 +0100)]
re PR rtl-optimization/70261 (r234265 causes fails on rs6000)

PR target/70261
* rtlanal.c (replace_rtx): Revert 2016-03-16 change.

From-SVN: r234279

8 years ago* fr.po: Update.
Joseph Myers [Thu, 17 Mar 2016 00:21:09 +0000 (00:21 +0000)]
* fr.po: Update.

From-SVN: r234278

8 years ago* fr.po: Update.
Joseph Myers [Thu, 17 Mar 2016 00:20:21 +0000 (00:20 +0000)]
* fr.po: Update.

From-SVN: r234277

8 years agoDaily bump.
GCC Administrator [Thu, 17 Mar 2016 00:16:12 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234276

8 years agore PR middle-end/70240 (ICE: in gimplify_modify_expr, at gimplify.c:4854 with -ftree...
Richard Henderson [Wed, 16 Mar 2016 23:53:18 +0000 (16:53 -0700)]
re PR middle-end/70240 (ICE: in gimplify_modify_expr, at gimplify.c:4854 with -ftree-vectorize)

PR middle-end/70240

  * gcc.c-torture/compile/pr70240.c: New.

From-SVN: r234273

8 years agoRevert r231575
Richard Henderson [Wed, 16 Mar 2016 23:53:10 +0000 (16:53 -0700)]
Revert r231575

  PR middle-end/70240
  PR middle-end/68215
  2015-12-11  Eric Botcazou  <ebotcazou@adacore.com>
  * tree-vect-generic.c (tree_vec_extract): Remove GSI parameter.
  Do not gimplify the result.
  (do_unop): Adjust call to tree_vec_extract.
  (do_binop): Likewise.
  (do_compare): Likewise.
  (do_plus_minus): Likewise.
  (do_negate): Likewise.
  (expand_vector_condition): Likewise.
  (do_cond): Likewise.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r234272

8 years agoGimplify vec_cond_expr with condition inside
Richard Henderson [Wed, 16 Mar 2016 23:53:01 +0000 (16:53 -0700)]
Gimplify vec_cond_expr with condition inside

  PR middle-end/70240
  PR middle-end/68215
  PR tree-opt/68714
  * gimplify.c (gimplify_expr) [VEC_COND_EXPR]: Gimplify the
  first operand as is_gimple_condexpr.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r234271

8 years agore PR target/70048 ([AArch64] Inefficient local array addressing)
Richard Henderson [Wed, 16 Mar 2016 21:23:05 +0000 (14:23 -0700)]
re PR target/70048 ([AArch64] Inefficient local array addressing)

PR target/70048

  * config/aarch64/aarch64.c (virt_or_elim_regno_p): New.
  (aarch64_classify_address): Use it.
  (aarch64_legitimize_address): Force all subexpressions of PLUS
  into registers.  Simplify as (sfp+const)+reg or (reg+reg)+const.

From-SVN: r234269

8 years agore PR c++/70259 (-flifetime-dse=2 bug with empty bases)
Jason Merrill [Wed, 16 Mar 2016 19:37:22 +0000 (15:37 -0400)]
re PR c++/70259 (-flifetime-dse=2 bug with empty bases)

PR c++/70259
* decl.c (start_preparsed_function): Don't clobber an empty base.

From-SVN: r234267

8 years ago20151204.c: Skip for avr.
Senthil Kumar Selvaraj [Wed, 16 Mar 2016 18:09:51 +0000 (18:09 +0000)]
20151204.c: Skip for avr.

2016-03-16  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

    * gcc.c-torture/compile/20151204.c: Skip for avr.

From-SVN: r234266

8 years agore PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with...
Jakub Jelinek [Wed, 16 Mar 2016 17:52:20 +0000 (18:52 +0100)]
re PR middle-end/70245 (Miscompilation of ICU on i386 with atom tuning starting with r227382)

PR target/70245
* rtlanal.c (replace_rtx): For REG, if from is a REG,
return to even if only REGNO is equal, and assert
mode is the same.

* g++.dg/opt/pr70245.C: New test.
* g++.dg/opt/pr70245.h: New file.
* g++.dg/opt/pr70245-aux.cc: New file.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r234265

8 years agog++.dg/cpp1y/constexpr-instantiate.C: Correct DejaGnu directives.
Martin Sebor [Wed, 16 Mar 2016 17:42:41 +0000 (17:42 +0000)]
g++.dg/cpp1y/constexpr-instantiate.C: Correct DejaGnu directives.

From-SVN: r234264

8 years agoFix bug ID in last commit
Jeff Law [Wed, 16 Mar 2016 17:03:45 +0000 (11:03 -0600)]
Fix bug ID in last commit

From-SVN: r234263

8 years agore PR rtl-optimization/70224 (ICE: RTL flag check: CROSSING_JUMP_P used with unexpect...
Jeff Law [Wed, 16 Mar 2016 16:58:12 +0000 (10:58 -0600)]
re PR rtl-optimization/70224 (ICE: RTL flag check: CROSSING_JUMP_P used with unexpected rtx code 'insn' in relax_delay_slots, at reorg.c:3310)

PR rtl-optimization/70024
* reorg.c (relax_delay_slots): Pass right argument to CROSSING_JUMP_P.

From-SVN: r234262

8 years agore PR middle-end/70199 (Crash at -O2 when using labels.)
Richard Henderson [Wed, 16 Mar 2016 16:50:18 +0000 (09:50 -0700)]
re PR middle-end/70199 (Crash at -O2 when using labels.)

PR middle-end/70199

 * function.h (struct function): Add has_forced_label_in_static.
 * gimplify.c (force_labels_r): Set it.
 * lto-streamer-in.c (input_struct_function_base): Read it.
 * lto-streamer-out.c (output_struct_function_base): Write it.
 * tree-inline.c (has_label_address_in_static_1): Remove.
 (copy_forbidden): Remove fndecl parameter; test
 has_forced_label_in_static.
 (inline_forbidden_p): Update call to copy_forbidden.
 (tree_versionable_function_p): Likewise.
 * ipa-chkp.c (chkp_instrumentable_p): Likewise.
 (chkp_versioning): Likewise.
 * tree-inline.h (copy_forbidden): Update decl.

testsuite/
 * gcc.c-torture/compile/pr70199.c: New.

From-SVN: r234261

8 years agoRun dos2unix on gcc.dg/uninit-19.c
H.J. Lu [Wed, 16 Mar 2016 16:14:34 +0000 (16:14 +0000)]
Run dos2unix on gcc.dg/uninit-19.c

* gcc.dg/uninit-19.c: Run dos2unix.

From-SVN: r234260

8 years agore PR c/70093 (Instancing function with VM return type cases internal compiler error...
Marek Polacek [Wed, 16 Mar 2016 15:51:47 +0000 (15:51 +0000)]
re PR c/70093 (Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.)

PR c/70093
* c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for
nested functions returning VM types.

* cgraphunit.c (cgraph_node::expand_thunk): Also build call to the
function being thunked if the result type doesn't have fixed size.
* gimplify.c (gimplify_modify_expr): Also set LHS if the result type
doesn't have fixed size.

* gcc.dg/nested-func-10.c: New test.
* gcc.dg/nested-func-9.c: New test.

From-SVN: r234259

8 years agore PR tree-optimization/68714 (less folding of vector comparison)
Jakub Jelinek [Wed, 16 Mar 2016 13:34:36 +0000 (14:34 +0100)]
re PR tree-optimization/68714 (less folding of vector comparison)

PR tree-optimization/68714
* gcc.dg/tree-ssa/pr68714.c: Add -w -Wno-psabi to dg-options.

From-SVN: r234258

8 years agoNowadays, we use plain -fopenacc to enable OpenACC kernels processing
Thomas Schwinge [Wed, 16 Mar 2016 13:10:20 +0000 (14:10 +0100)]
Nowadays, we use plain -fopenacc to enable OpenACC kernels processing

libgomp/
* testsuite/libgomp.oacc-fortran/kernels-loop-2.f95: Adjust to
-ftree-parallelize-loops/-fopenacc changes.
* testsuite/libgomp.oacc-fortran/kernels-loop-data-2.f95:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit-2.f95:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop-data-enter-exit.f95:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop-data-update.f95:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop-data.f95: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop.f95: Likewise.

From-SVN: r234257

8 years agoSave call-clobbered registers in _mcount on 32-bit Solaris/x86 (PR target/38239)
Rainer Orth [Wed, 16 Mar 2016 11:57:02 +0000 (11:57 +0000)]
Save call-clobbered registers in _mcount on 32-bit Solaris/x86 (PR target/38239)

PR target/38239
* config/sol2/gmon.c [__i386__] (_mcount): Save and restore
call-clobbered registers.
(internal_mcount): Remove __i386__ handling.

From-SVN: r234256

8 years agoSummary: boehm-gc: add support for aarch64 ILP32
Andreas Schwab [Wed, 16 Mar 2016 11:44:36 +0000 (11:44 +0000)]
Summary: boehm-gc: add support for aarch64 ILP32

* include/private/gcconfig.h [AARCH64] (ALIGNMENT, CPP_WORDSZ):
Define for __ILP32__.

From-SVN: r234255

8 years agotree-vect-loop.c (vect_analyze_loop_2): Fix wrong dump info by reporting malformed...
Bin Cheng [Wed, 16 Mar 2016 10:57:34 +0000 (10:57 +0000)]
tree-vect-loop.c (vect_analyze_loop_2): Fix wrong dump info by reporting malformed loop nest.

* tree-vect-loop.c (vect_analyze_loop_2): Fix wrong dump info by
reporting malformed loop nest.

From-SVN: r234254

8 years agoSafely use nodes[0] in possible_polymorphic_call_targets
Tom de Vries [Wed, 16 Mar 2016 10:21:27 +0000 (10:21 +0000)]
Safely use nodes[0] in possible_polymorphic_call_targets

2016-03-16  Tom de Vries  <tom@codesourcery.com>

PR lto/70187
* ipa-devirt.c (possible_polymorphic_call_targets): Move
nodes.length () == 1 test to before first nodes[0] access.

From-SVN: r234253

8 years agoMakefile.in: Add support for x86 GNU/Hurd.
Svante Signell [Wed, 16 Mar 2016 10:04:01 +0000 (10:04 +0000)]
Makefile.in: Add support for x86 GNU/Hurd.

* gcc-interface/Makefile.in: Add support for x86 GNU/Hurd.
* s-osinte-gnu.ads: New file.

From-SVN: r234252

8 years agoAdd missing single_pred_p test in scop_detection::merge_sese
Tom de Vries [Wed, 16 Mar 2016 09:19:23 +0000 (09:19 +0000)]
Add missing single_pred_p test in scop_detection::merge_sese

2016-03-16  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/68715
* graphite-scop-detection.c (scop_detection::merge_sese): Add missing
single_pred_p test.

* gcc.dg/graphite/pr68715-2.c: New test.
* gcc.dg/graphite/pr68715.c: New test.
* gfortran.dg/graphite/pr68715.f90: New test.

From-SVN: r234251

8 years agoFix same_close_phi_node
Tom de Vries [Wed, 16 Mar 2016 09:19:12 +0000 (09:19 +0000)]
Fix same_close_phi_node

2016-03-16  Tom de Vries  <tom@codesourcery.com>

PR tree-optimization/68809
* graphite-scop-detection.c (same_close_phi_node): Test if result types
are the same.

* gcc.dg/graphite/pr68809-2.c: New test.
* gcc.dg/graphite/pr68809.c: New test.

From-SVN: r234250

8 years agore PR sanitizer/70147 (testcase from hana testsuite gets miscompiled with -fsanitize...
Jakub Jelinek [Wed, 16 Mar 2016 07:02:30 +0000 (08:02 +0100)]
re PR sanitizer/70147 (testcase from hana testsuite gets miscompiled with -fsanitize=undefined)

PR c++/70147
* cp-ubsan.c (cp_ubsan_dfs_initialize_vtbl_ptrs): Conditionalize
BINFO_VIRTUAL_P vtable clearing on current_in_charge_parm.

* g++.dg/ubsan/pr70147-2.C (C::C): Initialize A base with invalid
method call to i () as argument.  Adjust expected output.

From-SVN: r234249

8 years agore PR sanitizer/70147 (testcase from hana testsuite gets miscompiled with -fsanitize...
Jakub Jelinek [Wed, 16 Mar 2016 07:01:36 +0000 (08:01 +0100)]
re PR sanitizer/70147 (testcase from hana testsuite gets miscompiled with -fsanitize=undefined)

PR c++/70147
* cp-ubsan.c (cp_ubsan_maybe_initialize_vtbl_ptrs): Temporarily
set in_base_initializer.

* g++.dg/ubsan/pr70147-1.C: New test.
* g++.dg/ubsan/pr70147-2.C: New test.

From-SVN: r234248

8 years agoCleanup and expand on the 'leaf' function attribute documentation.
Carlos O'Donell [Wed, 16 Mar 2016 05:00:58 +0000 (05:00 +0000)]
Cleanup and expand on the 'leaf' function attribute documentation.

Describe the problems that a user might face with indirect functions
and ELF symbol interposition.

gcc/ChangeLog:

2016-03-16  Carlos O'Donell  <carlos@redhat.com>
    Sandra Loosemore  <sandra@codesourcery.com>

* doc/extend.texi (Common Function Attributes): Describe ifunc impact
on leaf attribute. Mention ELF interposition problems.

Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
From-SVN: r234247

8 years agoPR c++/58281 - Problem with explicitly instantiated constexpr template
Martin Sebor [Wed, 16 Mar 2016 03:00:02 +0000 (03:00 +0000)]
PR c++/58281 - Problem with explicitly instantiated constexpr template

PR c++/58281 - Problem with explicitly instantiated constexpr template
functions

gcc/testsuite/ChangeLog:
2016-03-15  Martin Sebor  <msebor@redhat.com>

PR c++/58281
* g++.dg/cpp1y/constexpr-instantiate.C: Add new test.

From-SVN: r234246

8 years agoDaily bump.
GCC Administrator [Wed, 16 Mar 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234245

8 years agopr68532.c: Add -fno-common option on hppa*-*-hpux*.
John David Anglin [Wed, 16 Mar 2016 00:11:28 +0000 (00:11 +0000)]
pr68532.c: Add -fno-common option on hppa*-*-hpux*.

* gcc.c-torture/execute/pr68532.c: Add -fno-common option on
hppa*-*-hpux*.

From-SVN: r234242

8 years agoifcvt-4.c: Add hppa*64*-*-* to skip list.
John David Anglin [Tue, 15 Mar 2016 23:49:40 +0000 (23:49 +0000)]
ifcvt-4.c: Add hppa*64*-*-* to skip list.

* gcc.dg/ifcvt-4.c: Add hppa*64*-*-* to skip list.

From-SVN: r234241

8 years agore PR libfortran/69799 (FAIL: gfortran.dg/coarray_allocate_3.f08 at -O1 and above)
John David Anglin [Tue, 15 Mar 2016 23:34:49 +0000 (23:34 +0000)]
re PR libfortran/69799 (FAIL: gfortran.dg/coarray_allocate_3.f08 at -O1 and above)

PR libfortran/69799
* gfortran.dg/coarray_allocate_5.f08: Add "-latomic" option if
libatomic_available.

From-SVN: r234240

8 years agoFix compiling large files
Richard Henderson [Tue, 15 Mar 2016 23:08:45 +0000 (16:08 -0700)]
Fix compiling large files

  * line-map.c (new_linemap): Make alloc_size a size_t.

From-SVN: r234239

8 years agoFix thinko in indirect_jump_optimize
Alan Modra [Tue, 15 Mar 2016 22:04:42 +0000 (08:34 +1030)]
Fix thinko in indirect_jump_optimize

PR rtl-optimization/69195
PR rtl-optimization/47992
* ira.c (indirect_jump_optimize): Ignore artificial defs.
Add comments.

From-SVN: r234235

8 years agore PR c++/70209 (ICE in strip_typedefs, at cp/tree.c:1377)
Marek Polacek [Tue, 15 Mar 2016 21:10:11 +0000 (21:10 +0000)]
re PR c++/70209 (ICE in strip_typedefs, at cp/tree.c:1377)

PR c++/70209
* tree.c (strip_typedefs): Call strip_typedefs again on the
DECL_ORIGINAL_TYPE result.

* g++.dg/ext/attribute-may-alias-4.C: New test.

From-SVN: r234234

8 years agore PR c++/70095 ([C++14] Link error on partially specialized variable template)
Jason Merrill [Tue, 15 Mar 2016 19:37:37 +0000 (15:37 -0400)]
re PR c++/70095 ([C++14] Link error on partially specialized variable template)

PR c++/70095
* pt.c (instantiate_decl): Fix call to variable_template_p.

From-SVN: r234231

8 years agoFix more P0184R0 references.
Jason Merrill [Tue, 15 Mar 2016 19:37:32 +0000 (15:37 -0400)]
Fix more P0184R0 references.

From-SVN: r234230

8 years agore PR c++/70141 (template parameter not deducible in partial specialization of templa...
Jason Merrill [Tue, 15 Mar 2016 19:21:44 +0000 (15:21 -0400)]
re PR c++/70141 (template parameter not deducible in partial specialization of template inside template)

PR c++/70141
* pt.c (for_each_template_parm_r): Always walk into TYPENAME_TYPE.

From-SVN: r234228

8 years agopr63384.C: Add -w to dg-options.
Alexander Monakov [Tue, 15 Mar 2016 18:11:14 +0000 (21:11 +0300)]
pr63384.C: Add -w to dg-options.

* g++.dg/pr63384.C: Add -w to dg-options.  Remove '-toggle'
in -fvar-tracking-assignments-toggle flag.

From-SVN: r234227

8 years agore PR middle-end/69513 (LTO bootstrap fails with bootstrap-profiled during linking...
Eric Botcazou [Tue, 15 Mar 2016 17:55:39 +0000 (17:55 +0000)]
re PR middle-end/69513 (LTO bootstrap fails with bootstrap-profiled during linking gnat1 in stagefeedback)

PR bootstrap/69513
* dwarf2out.c (flush_limbo_die_list): Really flush the limbo list.

From-SVN: r234226

8 years agoifcvt-4.c: Add -misel for powerpc*.
Pat Haugen [Tue, 15 Mar 2016 17:45:13 +0000 (17:45 +0000)]
ifcvt-4.c: Add -misel for powerpc*.

* gcc.dg/ifcvt-4.c: Add -misel for powerpc*.

From-SVN: r234224

8 years agoavr.md (rotl<mode>3): Set mode for operand 2.
Senthil Kumar Selvaraj [Tue, 15 Mar 2016 16:21:49 +0000 (16:21 +0000)]
avr.md (rotl<mode>3): Set mode for operand 2.

* config/avr/avr.md (rotl<mode>3): Set mode for operand 2.

From-SVN: r234223

8 years agore PR rtl-optimization/70222 (Test miscompiled with -O1)
Jakub Jelinek [Tue, 15 Mar 2016 16:11:48 +0000 (17:11 +0100)]
re PR rtl-optimization/70222 (Test miscompiled with -O1)

PR rtl-optimization/70222
* combine.c (simplify_shift_const_1): For A >> B >> C LSHIFTRT
optimization if mode is different from result_mode, queue up masking
of the result in outer_op.  Formatting fix.

* gcc.c-torture/execute/pr70222-1.c: New test.
* gcc.c-torture/execute/pr70222-2.c: New test.

From-SVN: r234222

8 years agore PR middle-end/70239 (ICE in ggc_set_mark)
Jakub Jelinek [Tue, 15 Mar 2016 16:10:59 +0000 (17:10 +0100)]
re PR middle-end/70239 (ICE in ggc_set_mark)

PR middle-end/70239
* tree-ssa-sccvn.c (VN_INFO_GET): Use safe_grow_cleared instead
of safe_grow.

From-SVN: r234221

8 years agoFix pr68714 test for targets not supporting V4SImode.
Richard Henderson [Tue, 15 Mar 2016 15:43:00 +0000 (08:43 -0700)]
Fix pr68714 test for targets not supporting V4SImode.

  * gcc.dg/tree-ssa/pr68714.c: Test during reassoc pass.

From-SVN: r234220

8 years agore PR rtl-optimization/69032 (ICE: in cfg_preds_1, at sel-sched-ir.c:4809 with -fsche...
Andrey Belevantsev [Tue, 15 Mar 2016 15:42:07 +0000 (18:42 +0300)]
re PR rtl-optimization/69032 (ICE: in cfg_preds_1, at sel-sched-ir.c:4809 with -fsched-pressure -fsel-sched-pipelining -fselective-scheduling)

gcc/

PR rtl-optimization/69032
* sel-sched-ir.c (get_seqno_by_preds): Include both insn and head when
looping backwards over basic block insns.

testsuite/

PR rtl-optimization/69032
* gcc.dg/pr69032.c: New test.

From-SVN: r234219

8 years agore PR target/66660 ([ia64] Speculative load not checked before use, leading to a...
Andrey Belevantsev [Tue, 15 Mar 2016 15:36:44 +0000 (18:36 +0300)]
re PR target/66660 ([ia64] Speculative load not checked before use, leading to a NaT Consumption Vector interruption)

        PR target/66660
        * sel-sched-ir.c (merge_expr): Avoid changing the speculative pattern
        to non-speculative when propagating trap bits.

From-SVN: r234218

8 years agore PR rtl-optimization/63384 (scheduler loops on endless fence list with -fselective...
Andrey Belevantsev [Tue, 15 Mar 2016 15:25:41 +0000 (18:25 +0300)]
re PR rtl-optimization/63384 (scheduler loops on endless fence list with -fselective-scheduling2 on x86)

gcc/

PR rtl-optimization/63384
* sel-sched.c (invoke_aftermath_hooks): Do not decrease issue_more
on DEBUG_INSN_P insns.

testsuite/

PR rtl-optimization/63384
* g++.dg/pr63384.C: New test.

From-SVN: r234217

8 years agore PR target/64411 (ICE: in verify_target_availability, at sel-sched.c:1577 with...
Andrey Belevantsev [Tue, 15 Mar 2016 15:13:29 +0000 (18:13 +0300)]
re PR target/64411 (ICE: in verify_target_availability, at sel-sched.c:1577 with -Os -mcmodel=medium -fPIC -fschedule-insns -fselective-scheduling)

gcc/

        PR target/64411
        * sched-deps.c (get_implicit_reg_pending_clobbers): New function,
        factored out from ...
        (sched_analyze_insn): ... here.
        * sched-int.h (get_implicit_reg_pending_clobbers): Declare it.
        * sel-sched-ir.c (setup_id_implicit_regs): New function, use
        get_implicit_reg_pending_clobbers in it.
        (setup_id_reg_sets): Use setup_id_implicit_regs.
        (deps_init_id): Ditto.

testsuite/

PR target/64411
* gcc.target/i386/pr64411.C: New test.

From-SVN: r234216

8 years agoAdd goacc/kernels-alias{,-2}.f95
Tom de Vries [Tue, 15 Mar 2016 13:01:51 +0000 (13:01 +0000)]
Add goacc/kernels-alias{,-2}.f95

2016-03-15  Tom de Vries  <tom@codesourcery.com>

* gfortran.dg/goacc/kernels-alias-2.f95: New test.
* gfortran.dg/goacc/kernels-alias.f95: New test.

From-SVN: r234214

8 years agoexpr.c (cpp_classify_number): Hex floats are new in C++1z.
Jason Merrill [Tue, 15 Mar 2016 12:08:31 +0000 (08:08 -0400)]
expr.c (cpp_classify_number): Hex floats are new in C++1z.

* libcpp/expr.c (cpp_classify_number): Hex floats are new in C++1z.

* libcpp/init.c (lang_defaults): Likewise.
* gcc/c-family/c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.

From-SVN: r234213

8 years agofeat-cxx1z.C: Fix __cpp_fold_expressions value.
Jason Merrill [Tue, 15 Mar 2016 12:08:25 +0000 (08:08 -0400)]
feat-cxx1z.C: Fix __cpp_fold_expressions value.

* g++.dg/cpp1z/feat-cxx1z.C: Fix __cpp_fold_expressions value.
* g++.dg/cpp1z/fold7.C: Likewise.

From-SVN: r234212

8 years agoFix fdump-ipa-all-graph
Tom de Vries [Tue, 15 Mar 2016 11:51:32 +0000 (11:51 +0000)]
Fix fdump-ipa-all-graph

2016-03-15  Tom de Vries  <tom@codesourcery.com>

PR ipa/70161
* cgraph.c (cgraph_node::get_body): Save, reset and restore
dump_file_name.
* passes.c (execute_one_ipa_transform_pass): Add missing argument to
execute_function_dump.
(execute_one_pass): Don't dump function if it will be dumped after ipa
transform.

From-SVN: r234211

8 years agoPR c++/53792 - [C++11] improving compiler-time constexpr evaluation
Martin Sebor [Tue, 15 Mar 2016 03:05:17 +0000 (03:05 +0000)]
PR c++/53792 - [C++11] improving compiler-time constexpr evaluation

gcc/testsuite/ChangeLog:
2016-03-14  Martin Sebor  <msebor@redhat.com>

PR c++/53792
* g++.dg/cpp0x/constexpr-inline.C: New test.
* g++.dg/cpp0x/constexpr-inline-1.C: Same.

From-SVN: r234208

8 years ago* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
Jason Merrill [Tue, 15 Mar 2016 02:57:52 +0000 (22:57 -0400)]
* c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.

From-SVN: r234207

8 years agogenrecog: Fix crash on invalid input
Segher Boessenkool [Tue, 15 Mar 2016 00:42:43 +0000 (01:42 +0100)]
genrecog: Fix crash on invalid input

If your machine description refers to a non-existent predicate genrecog
crashes.  This fixes it.

* genrecog.c (match_pattern_2): If pred is NULL don't call
safe_predicate_mode on it.

From-SVN: r234206

8 years agoDaily bump.
GCC Administrator [Tue, 15 Mar 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234205

8 years ago* gcc.dg/torture/pr70083.c: Prune non-standard ABI.
David Edelsohn [Mon, 14 Mar 2016 23:30:52 +0000 (23:30 +0000)]
* gcc.dg/torture/pr70083.c: Prune non-standard ABI.

From-SVN: r234202

8 years agore PR middle-end/70219 (ICE: in delete_move_and_clobber, at lra-constraints.c:5864...
Jakub Jelinek [Mon, 14 Mar 2016 22:19:32 +0000 (23:19 +0100)]
re PR middle-end/70219 (ICE: in delete_move_and_clobber, at lra-constraints.c:5864 with -O2)

PR middle-end/70219
* lra-constraints.c (delete_move_and_clobber): Change assertion
to also allow dregno == 0.

* gcc.dg/pr70219.c: New test.

From-SVN: r234201

8 years agore PR tree-optimization/68714 (less folding of vector comparison)
Richard Henderson [Mon, 14 Mar 2016 20:48:15 +0000 (13:48 -0700)]
re PR tree-optimization/68714 (less folding of vector comparison)

PR tree-opt/68714

  * tree-ssa-reassoc.c (ovce_extract_ops, optimize_vec_cond_expr): New.
  (can_reassociate_p): Allow ANY_INTEGRAL_TYPE_P.
  (reassociate_bb): Use optimize_vec_cond_expr; avoid
  optimize_range_tests, attempt_builtin_copysign and attempt_builtin_powi
  on vectors.

From-SVN: r234196