1. 14 Dec, 2016 22 commits
    • re PR c++/72775 (internal compiler error: in finish_expr_stmt, at cp/semantics.c:677) · 964b79eb
      	PR c++/72775
      	* init.c (perform_member_init): Diagnose member initializer for
      	flexible array member. 
      
      	* g++.dg/ext/flexary12.C: Adjust dg-error.
      	* g++.dg/ext/flexary20.C: New.
      	* g++.dg/ext/flexary21.C: New.
      
      From-SVN: r243669
      Marek Polacek committed
    • re PR target/59874 (Missing builtin (__builtin_clzs) when compiling with g++) · cc99421e
      	PR target/59874
      	* config/i386/i386-builtin.def: Add __builtin_clzs and __builtin_ctzs.
      	(ix86_fold_builtin): Handle IX86_BUILTIN_CTZS and IX86_BUILTIN_CLZS.
      	* config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
      	(*clzhi2): Ditto.
      
      testsuite/ChangeLog
      
      	PR target/59874
      	* gcc.target/i386/pr59874-1.c: New test.
      	* gcc.target/i386/pr59874-2.c: Ditto.
      
      From-SVN: r243668
      Uros Bizjak committed
    • pr78515.c: Add -Wno-psabi for AIX. · d3cab14a
              * gcc.dg/torture/pr78515.c: Add -Wno-psabi for AIX.
              * gcc.dg/tree-ssa/forwprop-35.c: Add -Wno-psabi for AIX.
              * gcc.dg/pr69634.c: Add -Wno-psabi for AIX.
      
      From-SVN: r243666
      David Edelsohn committed
    • re PR debug/77844 (Compilation of simple C++ example exhaust memory) · 53cfcb2e
      	PR debug/77844
      	* valtrack.c: Include rtl-iter.h.
      	(struct rtx_subst_pair): Add insn field.
      	(propagate_for_debug_subst): If pair->to contains at least 2
      	regs, create a DEBUG_INSN with a debug temp before pair->insn
      	and replace from with the debug temp instead of pair->to.
      	(propagate_for_debug): Initialize p.insn.
      	* combine.c (insn_uid_check): New inline function.
      	(INSN_COST, LOG_LINKS): Use it instead of INSN_UID.
      	(find_single_use, combine_instructions,
      	cant_combine_insn_p, try_combine): Use NONDEBUG_INSN_P instead of
      	INSN_P.
      
      	* g++.dg/opt/pr77844.C: New test.
      
      From-SVN: r243662
      Jakub Jelinek committed
    • PR c/78673 - sprintf missing attribute nonnull on destination argument · 474da67e
      PR c/78673 - sprintf missing attribute nonnull on destination argument
      PR c/17308 - nonnull attribute not as useful as it could be
      
      gcc/ChangeLog:
      
      	PR c/17308
      	* builtin-attrs.def (ATTR_NONNULL_1_1, ATTR_NONNULL_1_2): Defined.
      	(ATTR_NONNULL_1_3, ATTR_NONNULL_1_4, ATTR_NONNULL_1_5): Same.
      	(ATTR_NOTHROW_NONNULL_1_1, ATTR_NOTHROW_NONNULL_1_2): Same.
      	(ATTR_NOTHROW_NONNULL_1_3, ATTR_NOTHROW_NONNULL_1_4): Same.
      	(ATTR_NOTHROW_NONNULL_1_5): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_1_2): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_2_0): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_2_3): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_3_0): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_3_4): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_4_0): Same.
      	(ATTR_NONNULL_1_FORMAT_PRINTF_4_5): Same.
      	* builtins.c (validate_arg): Add argument.  Treat null pointers
      	passed to nonnull arguments as invalid.
      	(validate_arglist): Same.
      	* builtins.def (fprintf, fprintf_unlocked): Add nonnull attribute.
      	(printf, printf_unlocked, sprintf. vfprintf, vsprintf): Same.
      	(__sprintf_chk, __vsprintf_chk, __fprintf_chk, __vfprintf_chk): Same.
      	* calls.c (get_nonnull_ags, maybe_warn_null_arg): New functions.
      	(initialize_argument_information): Diagnose null pointers passed to
      	arguments declared nonnull.
      	* calls.h (get_nonnull_args): Declared.
      
      gcc/c-family/ChangeLog:
      
      	PR c/17308
      	* c-common.c (check_nonnull_arg): Disable when optimization
      	is enabled.
      
      gcc/testsuite/ChangeLog:
      
      	PR c/17308
      	* gcc.dg/builtins-nonnull.c: New test.
      	* gcc.dg/nonnull-4.c: New test.
      
      From-SVN: r243661
      Martin Sebor committed
    • re PR c++/78701 (ICE: unexpected expression N of kind template_parm_index) · b4ba0852
      	PR c++/78701
      	* pt.c (type_unification_real): Check tsubst arg doesn't have
      	remaining template parms before converting it.
      
      	PR c++/78701
      	* g++.dg/cpp0x/pr78701.C: New.
      
      From-SVN: r243657
      Nathan Sidwell committed
    • re PR c++/69481 (ICE with C++11 alias using with templates) · fa0c02c3
      	PR c++/69481
      	* cp-tree.h (TYPE_TEMPLATE_INFO_MAYBE_ALIAS): Always use
      	TYPE_ALIAS_TEMPLATE_INFO for aliases.
      
      From-SVN: r243656
      Nathan Sidwell committed
    • rs6000.c (rs6000_split_vec_extract_var): On ISA 3.0/power9, add support to use… · 16370e79
      rs6000.c (rs6000_split_vec_extract_var): On ISA 3.0/power9, add support to use the VEXTU{B,H,W}{L,R}X extract instructions.
      
      [gcc]
      2016-12-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000.c (rs6000_split_vec_extract_var): On ISA
      	3.0/power9, add support to use the VEXTU{B,H,W}{L,R}X extract
      	instructions.
      	* config/rs6000/vsx.md (VSr2): Add IEEE 128-bit floating point
      	type constraint registers.
      	(VSr3): Likewise.
      	(FL_CONV): New mode iterator for binary floating types that have a
      	direct conversion from 64-bit integer to floating point.
      	(vsx_extract_<mode>_p9): Add support for the ISA 3.0/power9
      	VEXTU{B,H,W}{L,R}X extract instructions.
      	(vsx_extract_<mode>_p9 splitter): Add splitter to load up the
      	extract byte position into the GPR if we are using the
      	VEXTU{B,H,W}{L,R}X extract instructions.
      	(vsx_extract_<mode>_di_p9): Support extracts to GPRs.
      	(vsx_extract_<mode>_store_p9): Support extracting to GPRs so that
      	we can use reg+offset address instructions.
      	(vsx_extract_<mode>_var): Support extracts to GPRs.
      	(vsx_extract_<VSX_EXTRACT_I:mode>_<SDI:mode>_var): New combiner
      	insn to combine vector extracts with zero_extend.
      	(vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Optimize
      	extracting a small integer vector element and converting it to a
      	floating point type.
      	(vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
      	(UNSPEC_XXEXTRACTUW): New unspec.
      	(UNSPEC_XXINSERTW): Likewise.
      	(vextract4b): Add support for the vec_vextract4b built-in
      	function.
      	(vextract4b_internal): Likewise.
      	(vinsert4b): Add support for the vec_insert4b built-in function.
      	Include both a version that inserts element 1 from a V4SI object
      	and one that inserts a DI object.
      	(vinsert4b_internal): Likewise.
      	(vinsert4b_di): Likewise.
      	(vinsert4b_di_internal): Likewise.
      	* config/rs6000/predicates.md (const_0_to_11_operand): New
      	predicate, match 0..11.
      	* config/rs6000/rs6000-builtin.def (BU_P9V_VSX_3): Set built-in
      	type to ternary, not binary.
      	(BU_P9V_64BIT_VSX_3): Likewise.
      	(P9V_BUILTIN_VEXTRACT4B): Add support for vec_vinsert4b and
      	vec_extract4b non-overloaded built-in functions.
      	(P9V_BUILTIN_VINSERT4B): Likewise.
      	(P9V_BUILTIN_VINSERT4B_DI): Likewise.
      	(P9V_BUILTIN_VEC_VEXTULX): Move to section that adds 2 operand ISA
      	3.0 built-in functions.
      	(P9V_BUILTIN_VEC_VEXTURX): Likewise.
      	(P9V_BUILTIN_VEC_VEXTRACT4B): Add support for overloaded
      	vec_insert4b and vec_extract4 built-in functions.
      	(P9V_BUILTIN_VEC_VINSERT4B): Likewise.
      	* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
      	overloaded support for vec_vinsert4b and vec_extract4b.
      	* config/rs6000/rs6000.c (altivec_expand_builtin): Add checks for
      	the vec_insert4b and vec_extract4b byte number being a constant in
      	the range 0..11.
      	* config/rs6000/altivec.h (vec_vinsert4b): Support vec_vinsert4b
      	and vec_extract4b built-in functions.
      	* doc/extend.doc (PowerPC VSX built-in functions): Document
      	vec_insert4b and vec_extract4b.
      
      [gcc/testsuite]
      2016-12-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
      
      	* gcc/testsuite/gcc.target/powerpc/vec-extract.h: If DO_TRACE is
      	defined, add tracing of the various extracts to stderr.  Add
      	support for tests that convert the result to another type.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v2df.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v4sf.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v4si-df.c: Add new
      	tests that do an extract and then convert the values double.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v4siu-df.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v16qiu-df.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v16qi-df.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v8hiu-df.c: Likewise.
      	* gcc/testsuite/gcc.target/powerpc/vec-extract-v8hi-df.c: Likewise.
      	* gcc.target/powerpc/p9-extract-1.c: Update test to check for
      	VEXTU{B,H,W}{L,R}X instructions being generated by default instead
      	of VEXTRACTU{B,H} and XXEXTRACTUW.
      	* gcc.target/powerpc/p9-extract-3.c: New test for combination of
      	vec_extract and convert to floating point.
      	* gcc.target/powerpc/p9-vinsert4b-1.c: New test for vec_vinsert4b
      	and vec_extract4b.
      	* gcc.target/powerpc/p9-vinsert4b-2.c: Likewise.
      
      From-SVN: r243653
      Michael Meissner committed
    • Make printers use singular noun for a single element · d33c00e1
      	* python/libstdcxx/v6/printers.py (num_elements): New function.
      	(StdMapPrinter.to_string, StdSetPrinter.to_string)
      	(StdDequePrinter.to_string, Tr1UnorderedSetPrinter.to_string)
      	(Tr1UnorderedMapPrinter.to_string): Use num_elements.
      	* testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected results
      	to use singular noun when there is only one element.
      	* testsuite/libstdc++-prettyprinters/debug.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
      	* testsuite/libstdc++-prettyprinters/tr1.cc: Likewise.
      
      From-SVN: r243652
      Jonathan Wakely committed
    • Make printers detect invalid debug mode iterators · 3c760f4a
      	PR libstdc++/59170
      	* python/libstdcxx/v6/printers.py (StdDebugIteratorPrinter): Use
      	_M_sequence and _M_version to detect invalid iterators.
      	* testsuite/libstdc++-prettyprinters/debug.cc: Test debug mode vector
      	and test invalid iterators.
      	* testsuite/libstdc++-prettyprinters/debug_cxx11.cc: New test.
      
      From-SVN: r243650
      Jonathan Wakely committed
    • MIPS: Remove redundant dg-skip-if from mips16-attributes.c. · 54601417
      gcc/testsuite
      
      	* gcc.target/mips/mips16-attributes.c: Remove dg-skip-if for
      	-mmicromips.
      
      From-SVN: r243649
      Toma Tabacu committed
    • re PR fortran/78780 ([Coarray] ICE in conv_caf_send, at fortran/trans-intrinsic.c:1936) · 8c92e452
      gcc/testsuite/ChangeLog:
      
      2016-12-14  Andre Vehreschild  <vehre@gcc.gnu.org>
      
      	PR fortran/78780
      	* gfortran.dg/coarray/alloc_comp_5.f90: New test.
      	* gfortran.dg/coarray_42.f90: New test.
      
      
      gcc/fortran/ChangeLog:
      
      2016-12-14  Andre Vehreschild  <vehre@gcc.gnu.org>
      
      	PR fortran/78780
      	* trans-expr.c (gfc_trans_assignment_1): Improve check whether detour
      	caf-runtime routines is needed.
      
      From-SVN: r243648
      Andre Vehreschild committed
    • re PR fortran/78672 (Gfortran test suite failures with a sanitized compiler) · eb401400
      gcc/fortran/ChangeLog:
      
      2016-12-14  Andre Vehreschild  <vehre@gcc.gnu.org>
      
      	PR fortran/78672
      	* array.c (gfc_find_array_ref): Add flag to return NULL when no ref is
      	found instead of erroring out.
      	* data.c (gfc_assign_data_value): Only constant expressions are valid
      	for initializers.
      	* gfortran.h: Reflect change of gfc_find_array_ref's signature.
      	* interface.c (compare_actual_formal): Access the non-elemental
      	array-ref.  Prevent taking a REF_COMPONENT for a REF_ARRAY.  Correct
      	indentation.
      	* module.c (load_omp_udrs): Clear typespec before reading into it.
      	* trans-decl.c (gfc_build_qualified_array): Prevent accessing the array
      	when it is a coarray.
      	* trans-expr.c (gfc_conv_cst_int_power): Use wi::abs()-function instead
      	of crutch preventing sanitizer's bickering here.
      	* trans-stmt.c (gfc_trans_deallocate): Only get data-component when it
      	is a descriptor-array here.
      
      From-SVN: r243647
      Andre Vehreschild committed
    • re PR target/78796 (TLS fails to link on aarch64 with -mcmodel=large) · e397febf
      	PR target/78796
      	* gcc.dg/tls/pr78796.c: New test.
      
      From-SVN: r243645
      Jakub Jelinek committed
    • re PR tree-optimization/78731 (Possible bug with switch when optimization is turned on.) · 007e18eb
      2016-12-14  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/78731
      	* gcc.dg/torture/pr78731.c: New testcase.
      
      From-SVN: r243644
      Richard Biener committed
    • Print 2 digits after decimal delimiter for BB frequencies · e19ef86d
      	* gimple-pretty-print.c (dump_probability): New function.
      	(dump_edge_probability): Use the function.
      	(dump_gimple_label): Likewise.
      	(dump_gimple_bb_header): Likewise.
      	* gcc.dg/tree-ssa/20040703-1.c: Update scanned pattern.
      	* gcc.dg/tree-ssa/dump-2.c: Likewise.
      
      From-SVN: r243643
      Martin Liska committed
    • Enhance analyze_brprob script · ca3b6071
      	* analyze_brprob.py: Add new column to output and new sorting
      	option. Fix coding style to not exceed 80 characters.
      	* analyze_brprob_spec.py: Add new sorting
      	option. Fix coding style to not exceed 80 characters.
      
      From-SVN: r243640
      Martin Liska committed
    • MIPS: Force assembly output for msa-builtins-err.c. · 998f4f30
      gcc/testsuite
      
      	* gcc.target/mips/msa-builtins-err.c (dg-options): Add 
      	-ffat-lto-objects option.
      
      From-SVN: r243639
      Toma Tabacu committed
    • tree-ssa-strlen.c (fold_strstr_to_memcmp): New function. · 3b1970cb
      2016-12-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      	    Jakub Jelinek  <jakub@redhat.com>
      
      	* tree-ssa-strlen.c (fold_strstr_to_memcmp): New function.
      	(strlen_optimize_stmt): Call fold_strstr_to_memcmp.
      
      testsuite/
      	* gcc.dg/strlenopt-30.c: New test-case.
      
      Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
      
      From-SVN: r243633
      Prathamesh Kulkarni committed
    • lra-constraints.c (process_address_1): Do not attempt to decompose addresses for… · 164f0634
      lra-constraints.c (process_address_1): Do not attempt to decompose addresses for MEMs that satisfy fixed-form constraints.
      
      	* lra-constraints.c (process_address_1): Do not attempt to decompose
      	addresses for MEMs that satisfy fixed-form constraints.
      
      From-SVN: r243632
      Eric Botcazou committed
    • re PR tree-optimization/78788 (ICE (segfault) on s390x-linux-gnu) · 253c0172
      2016-12-14  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/78788
      	* tree-vrp.c (set_value_range): Allow [-INF(OVF), +INF(OVF)].
      	(set_and_canonicalize_value_range): Do not drop the above to
      	VARYING.
      
      	* gcc.dg/torture/pr78788.c: New testcase.
      
      From-SVN: r243631
      Richard Biener committed
    • Daily bump. · 803312a7
      From-SVN: r243629
      GCC Administrator committed
  2. 13 Dec, 2016 18 commits