aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-30Remove use of std::abs in experimental::{gcd,lcm}Jonathan Wakely5-4/+57
PR libstdc++/77801 * include/experimental/numeric: Include <numeric>. (__abs): Define. (gcd, lcm): Use __abs instead of std::abs. * testsuite/experimental/numeric/77801.cc: New test. * testsuite/experimental/numeric/gcd.cc: Test unsigned inputs. * testsuite/experimental/numeric/lcm.cc: Likewise. From-SVN: r240656
2016-09-30[Testsuite] Use correct effective-target settings for ARM fp16-aapcs tests.Matthew Wahab3-4/+11
2016-09-30 Matthew Wawhab <matthew.wahab@arm.com> * gcc.target/arm/fp16-aapcs-3.c: Replace arm_fp16_ok with arm_fp16_alternative_ok as the required effective target. * gcc.target/arm/fp16-aapcs-4.c: Likewise. Also add -mfp16-format=alternative to the dg-options directive and remove the dg-add-options directive. From-SVN: r240655
2016-09-30* config/aarch64/aarch64-simd.md: Adjust fall through comments.Marek Polacek2-2/+6
From-SVN: r240653
2016-09-30Fix ICE for maps with zero components.Fritz Reese4-4/+46
2016-09-30 Fritz Reese <fritzoreese@gmail.com> Fix ICE for maps with zero components. PR fortran/77764 * gcc/fortran/interface.c (gfc_compare_union_types): Null-guard map components. PR fortran/77764 * gcc/testsuite/gfortran.dg/dec_union_8.f90: New testcase. From-SVN: r240652
2016-09-30Fix ICE caused by union types comparing equal to structures.Fritz Reese4-0/+50
2016-09-30 Fritz Reese <fritzoreese@gmail.com> Fix ICE caused by union types comparing equal to structures. PR fortran/77782 * gcc/fortran/interface.c (gfc_compare_derived_types): Use gfc_compare_union_types to compare union types. PR fortran/77782 * gcc/testsuite/gfortran.dg/dec_structure_16.f90: New testcase. From-SVN: r240651
2016-09-30trans-array.c (gfc_array_allocate): Use the token from coarray's .token member.Andre Vehreschild7-14/+84
gcc/fortran/ChangeLog: 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org> * trans-array.c (gfc_array_allocate): Use the token from coarray's .token member. * trans-intrinsic.c (conv_expr_ref_to_caf_ref): Only generate caf-reference chains from the first coarray references on. * trans-types.c (gfc_get_derived_type): Switch on mandatory .token member generation for allocatable arrays in coarrays in derived types. gcc/testsuite/ChangeLog: 2016-09-30 Andre Vehreschild <vehre@gcc.gnu.org> * gfortran.dg/coarray_allocate_10.f08: New test. * gfortran.dg/coindexed_1.f90: Above fixes allow execution. From-SVN: r240650
2016-09-30[RTL ifcvt] Transform (X == CST) ? -CST : Y into (X == CST) ? -X : Y when ↵Kyrylo Tkachov4-0/+111
conditional negation is available * ifcvt.c (noce_try_avoid_const_materialization): New function. (noce_process_if_block): Use it. * gcc.target/aarch64/ifcvt_avoid_const_materialization_1.c: New test. From-SVN: r240649
2016-09-30Enhance documentation of asan-use-after-return param.Martin Liska2-0/+9
* doc/invoke.texi: Document asan-use-after-return that it's disabled by default in runtime. From-SVN: r240648
2016-09-30tree-vrp.c (intersect_ranges): If we failed to handle the intersection ↵Richard Biener2-1/+15
choose a constant singleton range if... 2016-09-30 Richard Biener <rguenther@suse.de> * tree-vrp.c (intersect_ranges): If we failed to handle the intersection choose a constant singleton range if available. From-SVN: r240647
2016-09-30re PR tree-optimization/77399 (Poor code generation for vector casts and loads)Richard Biener4-4/+78
2016-09-30 Richard Biener <rguenther@suse.de> PR tree-optimization/77399 * tree-ssa-forwprop.c (simplify_vector_constructor): Handle float <-> int conversions. * gcc.dg/tree-ssa/forwprop-35.c: New testcase. From-SVN: r240646
2016-09-29pr27336.c: Make dependency on -fdelete-null-pointer-checks explicit.Sandra Loosemore7-4/+16
2016-09-29 Sandra Loosemore <sandra@codesourcery.com> gcc/testsuite/ * c-c++-common/pr27336.c: Make dependency on -fdelete-null-pointer-checks explicit. * g++.dg/cpp0x/constexpr-array-ptr10.C: Likewise. * g++.dg/cpp0x/constexpr-nullptr-1.C: Likewise. * g++.dg/lto/pr69589_0.C: Add nios2-*-elf to unsupported targets. * gcc.dg/pic-1.c: Require fpic target support. * gcc.dg/pic-2.c: Likewise. From-SVN: r240644
2016-09-30Daily bump.GCC Administrator1-1/+1
From-SVN: r240643
2016-09-30[RS6000] Revert rs6000_opt_vars changeAlan Modra2-3/+4
Doubly wrong. Broke AIX bootstrap, and not updated for the change in name. * config/rs6000/rs6000.c (rs6000_opt_vars): Revert last change. From-SVN: r240639
2016-09-29Implement P0001R1 - C++17 removal of register storage class specifier c-family/Jakub Jelinek21-17/+190
Implement P0001R1 - C++17 removal of register storage class specifier c-family/ * c.opt (Wregister): New warning. * c-opts.c (c_common_post_options): Enable -Wregister by default for C++17. cp/ * decl.c (cp_finish_decl): Diagnose register storage class on vars except when used in GNU global or local register variable extension. (grokdeclarator): Diagnose register storage class on parameters. * except.c (expand_start_catch_block): Set DECL_REGISTER only after cp_finish_decl call. testsuite/ * c-c++-common/Wvarargs-2.c (foo1): Except new warning for C++17. * c-c++-common/vector-subscript-2.c (vf): Expect new error for C++17. * c-c++-common/vector-subscript-5.c (foo): Don't use register keyword if not __SSE2__. * c-c++-common/Wvarargs.c (foo1, foo3): Expect new warnings for C++17. * g++.dg/compat/struct-layout-1_generate.c (iterative_hash): Remove register keywords. * g++.dg/eh/pr29166.C: Add -Wno-register option. * g++.dg/warn/register-parm-1.C (erroneous_warning, no_erroneous_warning): Expect new warnings for C++17. * g++.dg/warn/register-var-2.C (f): Likewise. * g++.dg/parse/register1.C (f): Expect new error for C++17. * g++.dg/parse/linkage2.C (foo): Likewise. * g++.dg/torture/pr36826.C (CoinMin, CoinMax): Avoid register keyword on parameters for C++17. * g++.dg/cpp1z/register1.C: New test. * g++.dg/cpp1z/register2.C: New test. * g++.dg/cpp1z/register3.C: New test. From-SVN: r240638
2016-09-29driver-i386.c (host_detect_local_cpu): Check maximum ext_level before ↵Uros Bizjak2-9/+23
calling CPUID with 0x80000008. * config/i386/driver-i386.c (host_detect_local_cpu): Check maximum ext_level before calling CPUID with 0x80000008. Simplify xgetbv checks. From-SVN: r240637
2016-09-29Machine-readable RTL dumps: print_rtx_functionDavid Malcolm4-0/+140
gcc/ChangeLog: * Makefile.in (OBJS): Add print-rtl-function.o. * print-rtl-function.c: New file. * print-rtl.h (print_rtx_function): New decl. From-SVN: r240634
2016-09-29adx-check.h (main): Simplify feature bit tests.Uros Bizjak11-21/+32
* gcc.target/i386/adx-check.h (main): Simplify feature bit tests. * gcc.target/i386/avx2-check.h (main): Ditto. * gcc.target/i386/avx512bw-check.h (main): Ditto. * gcc.target/i386/avx512cd-check.h (main): Ditto. * gcc.target/i386/avx512dq-check.h (main): Ditto. * gcc.target/i386/avx512er-check.h (main): Ditto. * gcc.target/i386/avx512f-check.h (main): Ditto. * gcc.target/i386/avx512ifma-check.h (main): Ditto. * gcc.target/i386/avx512vbmi-check.h (main): Ditto. * gcc.target/i386/avx512vl-check.h (main): Ditto. From-SVN: r240631
2016-09-29re PR target/77756 (__get_cpuid() returns wrong values for level 7 (extended ↵Uros Bizjak4-27/+34
features)) PR target/77756 * config/i386/cpuid.h (__get_cpuid_count): New. (__get_cpuid): Rename __level to __leaf. testsuite/ChangeLog: PR target/77756 * gcc.target/i386/pr77756.c: New test. From-SVN: r240629
2016-09-29* genattrtab.c (write_attr_case): Also emit FALLTHRU marker.Marek Polacek2-0/+6
From-SVN: r240626
2016-09-29builtins.c (expand_builtin_memcmp): don't swap args unless result is only ↵Bernd Schmidt2-5/+12
being compared with zero. 2016-09-29 Bernd Schmidt <bschmidt@redhat.com> * builtins.c (expand_builtin_memcmp): don't swap args unless result is only being compared with zero. From-SVN: r240625
2016-09-29rtti.c (involves_incomplete_p): Add fall through comment.Marek Polacek4-1/+12
* rtti.c (involves_incomplete_p): Add fall through comment. * dwarf2out.c (loc_descriptor): Add fall through comment. (add_const_value_attribute): Likewise. From-SVN: r240624
2016-09-29Make optional::reset noexcept, make optional::value work in constant ↵Ville Voutilainen4-2/+81
expressions. Make optional::reset noexcept, make optional::value work in constant expressions. * include/std/optional (_M_get): Make constexpr. (reset): Make noexcept. * testsuite/20_util/optional/assignment/7.cc: New. * testsuite/20_util/optional/observers/6.cc: New. From-SVN: r240623
2016-09-29[ARM] Fix new constraints and attributes of SI/HI data movement patternsMatthew Wahab3-7/+17
* config/arm/arm.md (*arm_movsi_insn): Replace "t2" arch attribute with "v6t2". Move "arch" attribute above "pool_range". * config/arm/vfp.md (*arm_movhi_vfp): Replace "t2" arch attribute with "v6t2". (*thumb2_movhi_vfp): Likewise. (*arm_movhi_fp16): Likewise. (*thumb2_movhi_fp16): Likewise. (*arm_movsi_vfp): Remove "arch" attribute. (*thumb2_movsi_vfp): Likewise. From-SVN: r240622
2016-09-29* g++.dg/cpp0x/fallthrough2.C: Use the c++14_down target.Marek Polacek2-1/+5
From-SVN: r240621
2016-09-29Define C++17 std::hypot without _GLIBCXX_USE_C99_MATH_TR1Jonathan Wakely2-40/+52
* include/c_global/cmath (hypot, __hypot3): Move C++17 overloads outside _GLIBCXX_USE_C99_MATH_TR1 condition. From-SVN: r240620
2016-09-29fallthrough2.C: Only expect the warning in C++11 and C++14.Marek Polacek2-1/+6
* g++.dg/cpp0x/fallthrough2.C: Only expect the warning in C++11 and C++14. From-SVN: r240619
2016-09-29objc: update documetation and add test-case ofMartin Liska4-2/+20
* doc/extend.texi: Remove limitation of Objective C for __attribute__((constructor)) and __attribute__((destructor)). * objc/execute/construct1.m: New test. From-SVN: r240618
2016-09-29re PR bootstrap/77768 (LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: ↵Richard Biener4-2/+28
internal compiler error: Segmentation fault) 2016-09-29 Richard Biener <rguenther@suse.de> PR tree-optimization/77768 * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children): Handle stores to readonly memory when removing redundant stores. * gcc.dg/torture/pr77768.c: New testcase. From-SVN: r240617
2016-09-29re PR middle-end/77407 (Optimize integer i / abs (i) into the sign of i)Richard Biener4-2/+44
2016-09-29 Richard Biener <rguenther@suse.de> PR middle-end/77407 * match.pd: Add X / abs (X) -> X < 0 ? -1 : 1 and X / -X -> -1 simplifications. * gcc.dg/pr77407.c: New testcase. From-SVN: r240616
2016-09-29re PR middle-end/55152 (MAX_EXPR(a,-a) is really ABS_EXPR(a))Richard Biener6-2/+35
2016-09-29 Richard Biener <rguenther@suse.de> PR middle-end/55152 * match.pd: Add max(a,-a) -> abs(a) pattern. * tree-ssa-phiopt.c (minmax_replacement): Disable for HONOR_SIGNED_ZEROS types. * gcc.dg/pr55152.c: New testcase. * gcc.dg/tree-ssa/phi-opt-5.c: Adjust. From-SVN: r240615
2016-09-29[Patch] Remove all uses of TARGET_FLT_EVAL_METHOD_NON_DEFAULT and poison itJames Greenhalgh11-13/+33
I'm going to hookize TARGET_FLT_EVAL_METHOD, so the current definition of TARGET_FLT_EVAL_METHOD_NON_DEFAULT will stop working. The relaxation enabled by TARGET_FLT_METHOD_NON_DEFAULT isn't portable, and keeping it in place is tricky, so this patch removes it, and poisons TARGET_FLT_EVAL_METHOD_NON_DEFAULT in system.h to prevent future use. gcc/ * defaults.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Remove. * system.h (TARGET_FLT_EVAL_METHOD_NON_DEFAULT): Poison. gcc/c-family/ * c-opts.c (c_common_post_options): Remove special case for TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard in C++. gcc/java/ * lang.c (java_post_options): Remove special case for TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard. gcc/fortran/ * options.c (gfc_post_options): Remove special case for TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard. gcc/ada/ * gcc-interface/misc.c (gnat_post_options): Remove special case for TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard. From-SVN: r240614
2016-09-29Fix 64-bit gcc.dg/profile-update-warning.c on 32-bit-default x86Rainer Orth2-2/+7
* gcc.dg/profile-update-warning.c: Restrict to ia32. (dg-options): Remove -m32. From-SVN: r240613
2016-09-29tree-vrp.c (set_defs_to_varying): New helper avoiding writing to ↵Richard Biener2-20/+29
vr_const_varying. 2016-09-29 Richard Biener <rguenther@suse.de> * tree-vrp.c (set_defs_to_varying): New helper avoiding writing to vr_const_varying. (vrp_initialize): Call it. (vrp_visit_stmt): Likewise. (evrp_dom_walker::before_dom_children): Likewise. From-SVN: r240612
2016-09-29tree-vect-stmts.c (vectorizable_load): Avoid emitting vector constructors ↵Richard Biener2-5/+41
with vector elements. 2016-09-29 Richard Biener <rguenther@suse.de> * tree-vect-stmts.c (vectorizable_load): Avoid emitting vector constructors with vector elements. From-SVN: r240611
2016-09-29re PR bootstrap/77768 (LTO/PGO -O3 bootstrap broken: tree-vrp.c:11053:0: ↵Richard Biener2-17/+22
internal compiler error: Segmentation fault) 2016-09-29 Richard Biener <rguenther@suse.de> PR tree-optimization/77768 * tree-ssa-sccvn.c (visit_reference_op_store): Properly deal with stores to a place we know has a constant value. From-SVN: r240610
2016-09-29runtime: copy runtime.go and runtime1.go from Go 1.7Ian Lance Taylor16-396/+927
Also copy over cputicks.go, env_posix.go, vdso_none.go, stubs2.go, and a part of os_linux.go. Remove the corresponding functions from the C code in libgo/go/runtime. Add some transitional support functions to stubs.go. This converts several minor functions from C to Go. Reviewed-on: https://go-review.googlesource.com/29962 From-SVN: r240609
2016-09-29Daily bump.GCC Administrator1-1/+1
From-SVN: r240607
2016-09-29Disable .gnu.attributes tags in compatibility-ldbl.oAlan Modra15-13/+55
compatibility-ldbl.o is compiled with -mlong-double-64. When long double .gnu.attributes tags are checked by the linker, it complains about the mismatch between this file and others in libstdc++. * configure.ac (LONG_DOUBLE_COMPAT_FLAGS): New ACSUBST. * src/Makefile.am (compatibility-ldbl.o, compatibility-ldbl.lo): Use LONG_DOUBLE_COMPAT_FLAGS. * Makefile.in: Regenerate. * configure: Regenerate. * doc/Makefile.in: Regenerate. * include/Makefile.in: Regenerate. * libsupc++/Makefile.in: Regenerate. * po/Makefile.in: Regenerate. * python/Makefile.in: Regenerate. * src/Makefile.in: Regenerate. * src/c++11/Makefile.in: Regenerate. * src/c++98/Makefile.in: Regenerate. * src/filesystem/Makefile.in: Regenerate. * testsuite/Makefile.in: Regenerate. From-SVN: r240602
2016-09-29[RS6000] .gnu.attributes Tag_GNU_Power_ABI_FPAlan Modra7-20/+203
Extend this attribute to cover long double ABIs, for 64-bit too. This patch also corrects an error that crept in to code setting rs6000_passes_float. See the added comment. Passing IEEE128 values in vsx regs ought to set both Tag_GNU_Power_ABI_FP and Tag_GNU_Power_ABI_Vector. Also adds a new option, default on, that disables output of .gnu_attribute assembly directives. * config/rs6000/sysv4.opt (mgnu-attribute): New option. * doc/invoke.texi: Document it. * config/rs6000/rs6000.c (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): Define. (rs6000_passes_float): Comment. (rs6000_passes_long_double): New static var. (call_ABI_of_interest): Return false unless rs6000_gnu_attr is set. (init_cumulative_args): Set up to emit fp .gnu_attribute for ELF 64-bit ABIs as well as 32-bit ELF. Correct rs6000_passes_float to include fp values returned in vectors. Set rs6000_passes_long_double. (rs6000_function_arg_advance_1): Likewise for function args. (rs6000_elf_file_end): Emit fp .gnu_attribute for ELF 64-bit ABIs, and SPE. Emit long double tag value too. (rs6000_opt_vars): Add gnu-attr. * configure.ac (HAVE_LD_PPC_GNU_ATTR_LONG_DOUBLE): New ppc32 test. * configure: Regenerate. * config.in: Regenerate. From-SVN: r240601
2016-09-28gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead of 0 < x.Jakub Jelinek2-8/+17
* gimple-ssa-sprintf.c (pass_sprintf_length::gate): Use x > 0 instead of 0 < x. (format_floating, format_string, format_directive, get_destination_size, pass_sprintf_length::handle_gimple_call): Likewise. From-SVN: r240600
2016-09-28re PR target/77756 (__get_cpuid() returns wrong values for level 7 (extended ↵Uros Bizjak4-67/+81
features)) PR target/77756 * config/i386/cpuid.h (__get_cpuid): Handle CPUID level >= 7. testsuite/ChangeLog: PR target/77756 * gcc.target/i386/pr77756.c: New test. From-SVN: r240597
2016-09-28PR middle-end/77721 - -Wformat-length not uses arg range for converted varsMartin Sebor2-0/+97
gcc/testsuite/ChangeLog: PR middle-end/77721 * gcc.dg/tree-ssa/builtin-sprintf-warn-6.c: New test. From-SVN: r240595
2016-09-28gimple-ssa-sprintf.c: Fix comment formatting.Jakub Jelinek2-25/+26
* gimple-ssa-sprintf.c: Fix comment formatting. (format_integer): Use is_gimple_assign. (pass_sprintf_length::handle_gimple_call): Use gimple_call_builtin_p and gimple_call_fndecl. Reorder case BUILT_IN_SPRINTF_CHK. Fix up BUILT_IN_SNPRINTF_CHK comment. Replace "to to" with "to" in comment. (pass_sprintf_length::execute): Use is_gimple_call. From-SVN: r240594
2016-09-28re PR fortran/77707 (formatted direct access: nextrec off by one)Jerry DeLisle2-0/+15
2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/77707 * gfortran.dg/inquire_17.f90: New test. From-SVN: r240593
2016-09-28re PR fortran/77707 (formatted direct access: nextrec off by one)Jerry DeLisle2-3/+10
2016-09-28 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/77707 io/transfer.c (next_record): Flush before calculating next_record. Correctly calculate. From-SVN: r240592
2016-09-28re PR c++/77467 (Segmentation fault with switch statement in constexpr function)Jakub Jelinek4-29/+243
PR c++/77467 * constexpr.c (enum constexpr_switch_state): New. (struct constexpr_ctx): Add css_state field. (label_matches): Add CTX and STMT arguments, remove I and DEFAULT_LABEL. For CASE_LABEL_EXPR assert ctx->css_state != NULL, handle default labels according to css_state. (cxx_eval_statement_list): Remove statement skipping, label_matches and default_label handling code. (cxx_eval_loop_expr): Exit after first iteration even if switches (jump_target). (cxx_eval_switch_expr): Set up css_state field in ctx, if default label has been seen in the body, but no cases matched, evaluate the body second time. (cxx_eval_constant_expression): Handle stmt skipping and label_matches here. Handle PREDICT_EXPR. For MODIFY_EXPR or INIT_EXPR, assert statement is not skipped. For COND_EXPR during skipping, don't evaluate condition, just the then block and if still skipping at the end also the else block. (cxx_eval_outermost_constant_expr): Adjust constexpr_ctx initializer. (is_sub_constant_expr): Likewise. * g++.dg/cpp1y/constexpr-77467.C: New test. From-SVN: r240591
2016-09-28cpuinfo.c (__get_cpuid_output): Remove.Uros Bizjak2-17/+8
* config/i386/cpuinfo.c (__get_cpuid_output): Remove. (__cpu_indicator_init): Call __get_cpuid, not __get_cpuid_output. From-SVN: r240590
2016-09-28* include/std/chrono (system_clock): Fix typo in comment.Jonathan Wakely2-1/+3
From-SVN: r240589
2016-09-28libgo: fix for runtime/check failure with "-O0 -g"Ian Lance Taylor3-1/+3
Tweak the makefile rules for the runtime/check test to insure that the runtime package is compiled with "-fgo-compiling-runtime". This resolves a test failure (unsat on runtime.getcallerpc) when in a build directory where the compiler flags have been configured to disable optimization. Reviewed-on: https://go-review.googlesource.com/30010 From-SVN: r240588
2016-09-28Check for overflow in filesystem::last_write_timeJonathan Wakely5-14/+159
* include/experimental/bits/fs_fwd.h (file_time_type): Simplify definition. * src/filesystem/ops.cc (file_time): Take error_code parameter and check for overflow. (do_copy_file, last_write_time): Pass error_code in file_time calls. * testsuite/experimental/filesystem/operations/last_write_time.cc: New. * testsuite/util/testsuite_fs.h (scoped_file): Define RAII helper. From-SVN: r240587