Commit Graph

127067 Commits

Author SHA1 Message Date
Jakub Jelinek
165b9e9352 re PR lto/59326 (FAIL: gcc.dg/vect/vect-simd-clone-*.c)
PR lto/59326
	* gcc.target/i386/i386.exp (check_effective_target_avx2): Move to...
	* lib/target-supports.exp (check_effective_target_avx2): ... here.
	(check_effective_target_vect_simd_clones): New.
	* gcc.dg/vect/vect-simd-clone-1.c: Add dg-require-effective-target
	vect_simd_clones.
	* gcc.dg/vect/vect-simd-clone-2.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-3.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-4.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-5.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-6.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-7.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-8.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-9.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-10.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-11.c: Likewise.
	* gcc.dg/vect/vect-simd-clone-12.c: Likewise.

From-SVN: r205606
2013-12-02 23:39:12 +01:00
Sterling Augustine
858c19053b dwarf2out.c (output_pubnames): Use comp_unit_die ()->die_offset when...
2013-12-02 Sterling Augustine  <saugustine@google.com>

        * dwarf2out.c (output_pubnames): Use comp_unit_die ()->die_offset
        when there isn't a skeleton die.

From-SVN: r205603
2013-12-02 22:10:44 +00:00
Marek Polacek
cdb02ac743 re PR sanitizer/59353 (-fsanitize=return is not documented)
PR sanitizer/59353
	* doc/invoke.texi: Document -fsanitize=return.

From-SVN: r205601
2013-12-02 20:39:25 +00:00
Gerald Pfeifer
52cacf7207 update_web_docs_svn: Work around makeinfo generated file names and references with "_002d" instead...
* update_web_docs_svn: Work around makeinfo generated file names
	and references with "_002d" instead of "-".

From-SVN: r205600
2013-12-02 20:07:14 +00:00
Tobias Burnus
b6cfa9eb37 re PR middle-end/59257 (usan/*san: Dpcumentation oddness of -fsanitize= / -fsanitize=shift)
2013-12-02  Tobias Burnus  <burnus@net-b.de>
            Manuel López-Ibáñez  <manu@gcc.gnu.org>

        PR middle-end/59257
        * doc/invoke.texi: Add missing @opindex.
        (-fsanitize=): Use @gcctabopt instead of @itemize.


Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>

From-SVN: r205598
2013-12-02 20:54:29 +01:00
Bernd Edlinger
2399cad090 Fix C++0x memory model for unaligned fields in packed...
2013-12-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Fix C++0x memory model for unaligned fields in packed, aligned(4)
        structures with -fno-strict-volatile-bitfields on STRICT_ALIGNMENT
        targets like arm-none-eabi.
        * expr.c (expand_assignment): Handle normal fields like bit regions.

testsuite:
2013-12-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * gcc.dg/pr56997-4.c: New testcase.

From-SVN: r205597
2013-12-02 19:50:55 +00:00
Bernd Edlinger
72ee07fb76 re PR target/58115 (testcase gcc.target/i386/intrinsics_4.c failure)
2013-11-03  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        PR target/58115
        * function.c (invoke_set_current_function_hook): Call
        targetm.set_current_function after setting this_fn_optabs.

From-SVN: r205593
2013-12-02 18:00:47 +00:00
Marek Polacek
76004bbc2d vla-1.c: Split the tests into individual functions.
2013-12-02  Marek Polacek  <polacek@redhat.com>

testsuite/
	* c-c++-common/ubsan/vla-1.c: Split the tests into individual
	functions.

From-SVN: r205590
2013-12-02 16:08:47 +00:00
Richard Biener
100f09a564 re PR tree-optimization/59139 (internal compiler error: in get_val_for, at tree-ssa-loop-niter.c:2267)
2013-12-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/59139
	* tree-ssa-loop-niter.c (chain_of_csts_start): Properly match
	code in get_val_for.
	(get_val_for): Use gcc_checking_asserts.

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

From-SVN: r205588
2013-12-02 15:43:01 +00:00
Richard Biener
75fcf2876f tree-ssa-operands.c (opf_implicit): Remove.
2013-12-02  Richard Biener  <rguenther@suse.de>

	* tree-ssa-operands.c (opf_implicit): Remove.
	(opf_address_taken): New flag.
	(get_expr_operands): Remove early out, pass down
	opf_address_taken for ADDR_EXPRs, add a use operand only
	for non-opf_address_taken bases.
	(get_indirect_ref_operands): Rename to ...
	(get_mem_ref_operands): ... this.
	(get_asm_expr_operands): Rename to ...
	(get_asm_stmt_operands): ... this.

From-SVN: r205587
2013-12-02 15:13:52 +00:00
Yuri Rumyantsev
1656a81424 Add missed pointer de-reference
2013-12-02  Yuri Rumyantsev  <ysrumyan@gmail.com>

	* ipa-inline.c (check_callers): Add missed pointer de-reference.

From-SVN: r205586
2013-12-02 06:39:28 -08:00
Eric Botcazou
139bd704f1 re PR tree-optimization/59356 (ACATS C52102A and C52102C failures)
PR tree-optimization/59356
	* tree-dfa.h (get_addr_base_and_unit_offset_1) <case ARRAY_REF>: Do the
	offset computation using the precision of the index type.

From-SVN: r205585
2013-12-02 11:20:14 +00:00
Yvan Roux
95044b50b0 ChangeLog: Fix ChangeLog entry.
* gcc/ChangeLog: Fix ChangeLog entry.

From-SVN: r205582
2013-12-02 07:54:53 +00:00
Yvan Roux
54227be563 arm.c (arm_preferred_reload_class): Only return LO_REGS when rclass is GENERAL_REGS.
2013-12-02  Yvan Roux  <yvan.roux@linaro.org>

        * config/arm/arm.c (arm_preferred_reload_class): Only return LO_REGS
        when rclass is GENERAL_REGS.

From-SVN: r205581
2013-12-02 07:44:34 +00:00
Ganesh Gopalasubramanian
df0f339235 Check TARGET_LOOP_UNROLL_ADJUST while deciding unroll factor
From-SVN: r205580
2013-12-02 07:27:14 +00:00
GCC Administrator
62ca1b143c Daily bump.
From-SVN: r205578
2013-12-02 00:17:06 +00:00
Uros Bizjak
3d41d9d98c re PR libfortran/59313 (gfortran.dg/erf_3.F90 FAILs on Solaris/SPARC)
PR libfortran/59313
	* intrinsics/erfc_scaled.c (erfc_scaled_r16): Also provide for
	quadruple precision long double variant.

From-SVN: r205574
2013-12-01 21:56:21 +01:00
Eric Botcazou
06623961c7 winnt.c (i386_pe_asm_named_section): Be prepared for an identifier node.
* config/i386/winnt.c (i386_pe_asm_named_section): Be prepared for an
	identifier node.

From-SVN: r205568
2013-12-01 12:20:58 +00:00
Paul Thomas
343ab49260 re PR fortran/57354 (Wrong run-time assignment of allocatable array of derived type with allocatable component)
2013-12-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/57354
	* trans-array.c (gfc_conv_resolve_dependencies): For other than
	SS_SECTION, do a dependency check if the lhs is liable to be
	reallocated.

2013-12-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/57354
	* gfortran.dg/realloc_on_assign_23.f90 : New test

From-SVN: r205567
2013-12-01 11:50:20 +00:00
Paul Thomas
d700518bbd re PR fortran/58410 (Bogus uninitialized variable warning for allocatable derived type array function result)
2013-12-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/58410
	* trans-array.c (gfc_alloc_allocatable_for_assignment): Do not
	use the array bounds of an unallocated array but set its size
	to zero instead.

From-SVN: r205566
2013-12-01 11:42:25 +00:00
Paul Thomas
49560f0c74 Index...
Index: gcc/fortran/resolve.c
===================================================================
*** gcc/fortran/resolve.c	(revision 205031)
--- gcc/fortran/resolve.c	(working copy)
*************** resolve_transfer (gfc_code *code)
*** 8247,8256 ****
  	 && exp->value.op.op == INTRINSIC_PARENTHESES)
      exp = exp->value.op.op1;
  
!   if (exp && exp->expr_type == EXPR_NULL && exp->ts.type == BT_UNKNOWN)
      {
!       gfc_error ("NULL intrinsic at %L in data transfer statement requires "
! 		 "MOLD=", &exp->where);
        return;
      }
  
--- 8247,8257 ----
  	 && exp->value.op.op == INTRINSIC_PARENTHESES)
      exp = exp->value.op.op1;
  
!   if (exp && exp->expr_type == EXPR_NULL
!       && code->ext.dt)
      {
!       gfc_error ("Invalid context for NULL () intrinsic at %L",
! 		 &exp->where);
        return;
      }
  
Index: gcc/testsuite/gfortran.dg/null_5.f90
===================================================================
*** gcc/testsuite/gfortran.dg/null_5.f90	(revision 205031)
--- gcc/testsuite/gfortran.dg/null_5.f90	(working copy)
*************** subroutine test_PR34547_1 ()
*** 34,40 ****
  end subroutine test_PR34547_1
  
  subroutine test_PR34547_2 ()
!   print *, null () ! { dg-error "in data transfer statement requires MOLD" }
  end subroutine test_PR34547_2
  
  subroutine test_PR34547_3 ()
--- 34,40 ----
  end subroutine test_PR34547_1
  
  subroutine test_PR34547_2 ()
!   print *, null () ! { dg-error "Invalid context" }
  end subroutine test_PR34547_2
  
  subroutine test_PR34547_3 ()
Index: gcc/testsuite/gfortran.dg/null_6.f90
===================================================================
*** gcc/testsuite/gfortran.dg/null_6.f90	(revision 205031)
--- gcc/testsuite/gfortran.dg/null_6.f90	(working copy)
*************** end subroutine test_PR50375_2
*** 30,34 ****
  
  subroutine test_PR34547_3 ()
    integer, allocatable :: i(:)
!   print *, NULL(i)
  end subroutine test_PR34547_3
--- 30,34 ----
  
  subroutine test_PR34547_3 ()
    integer, allocatable :: i(:)
!   print *, NULL(i)    ! { dg-error "Invalid context for NULL" }
  end subroutine test_PR34547_3

From-SVN: r205565
2013-12-01 11:37:09 +00:00
Bernd Edlinger
c931d01d7d expr.c (emit_group_store): Corrected BITFIELD_END parameter.
2013-12-01  Bernd Edlinger <bernd.edlinger@hotmail.de>

        * expr.c (emit_group_store): Corrected BITFIELD_END parameter.

From-SVN: r205563
2013-12-01 09:08:04 +00:00
Ian Lance Taylor
2583109c81 libgo: Avoid some cases of getting callers recursively.
Avoids hanging inside older versions of glibc that do not
support recurive calls to dl_iterate_phdr.

From-SVN: r205561
2013-12-01 01:40:16 +00:00
GCC Administrator
2d7930e5e3 Daily bump.
From-SVN: r205560
2013-12-01 00:17:11 +00:00
Ian Lance Taylor
df5d92ce0e reflect: Rename struct field to be consistent in assembler and Go.
From-SVN: r205555
2013-11-30 18:08:42 +00:00
Ian Lance Taylor
9c6230e90e reflect: Fix MakeFunc for 386 when returning a struct.
When a 386 function returns a struct, it needs to return using
an rtd instruction that pops the hidden struct parameter off
the stack.  That wasn't happening.

From-SVN: r205551
2013-11-30 17:14:50 +00:00
Paulo Matos
67aca9dfae combine.c (reg_nonzero_bits_for_combine): Apply mask transformation as applied to nonzero_sign_valid when...
* combine.c (reg_nonzero_bits_for_combine): Apply mask transformation
	as applied to nonzero_sign_valid when last_set_mode has less precision
	than mode.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>

From-SVN: r205550
2013-11-30 11:13:07 +00:00
Tobias Burnus
483b0aa49b re PR sanitizer/59275 (Document environment variables used by the sanitizers)
2013-11-30  Tobias Burnus  <burnus@net-b.de>

        PR sanitizer/59275
        * doc/invoke.texi (-fsanitize=address,leak): Mention the
        * associated
        environment variable and link to a list with flags.
        (-fsanitize=thread): Ditto and update link.

From-SVN: r205548
2013-11-30 10:11:13 +01:00
GCC Administrator
fe23d8ce4f Daily bump.
From-SVN: r205547
2013-11-30 00:16:57 +00:00
Marek Polacek
f8ef336f0b re PR sanitizer/59331 (ubsan gives extra warnings with vla.)
PR sanitizer/59331
cp/
	* decl.c (compute_array_index_type): Don't build COMPOUND_EXPR for
	instrumentation.
testsuite/
	* g++.dg/ubsan/pr59331.C: New test.
	* g++.dg/ubsan/cxx1y-vla.C: Enable -Wall -Wno-unused-variable.
	Disable the -w option.
	* c-c++-common/ubsan/vla-1.c: Likewise.
	* c-c++-common/ubsan/vla-2.c: Likewise.
	* c-c++-common/ubsan/vla-3.c: Don't use the -w option.

From-SVN: r205544
2013-11-29 21:29:48 +00:00
Joseph Myers
340baef702 re PR c/42262 (internal compiler error: in set_designator, at c-typeck.c:5771)
PR c/42262
c:
	* c-typeck.c (process_init_element): Do not treat a string as
	initializing a whole array when used with a designator for an
	individual element.

testsuite:
	* gcc.dg/c99-init-5.c, gcc.dg/c99-init-6.c: New tests.

From-SVN: r205543
2013-11-29 21:24:14 +00:00
Marek Polacek
3163a5cab5 bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.
* bootstrap-ubsan.mk (POSTSTAGE1_LDFLAGS): Remove -lpthread -ldl.
	Add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.

From-SVN: r205542
2013-11-29 20:13:45 +00:00
Vladimir Makarov
49f5efa5ea re PR rtl-optimization/59340 (LRA enable-checking bootstrap failure since r205136)
2013-11-29  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/59340
	* lra.c (check_rtl): Use recog_memoized instead of insn_invalid_p.

	Revert
	2013-11-20  Robert Suchanek  <Robert.Suchanek@imgtec.com>

	* lra.c (lra): Set lra_in_progress before check_rtl call.
	* recog.c (insn_invalid_p): Add !lra_in_progress to prevent
	adding clobber regs when LRA is running.

From-SVN: r205541
2013-11-29 20:08:38 +00:00
H.J. Lu
913e2f0a00 Add -B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/
* bootstrap-asan.mk (POSTSTAGE1_LDFLAGS): Add
	-B$$r/prev-$(TARGET_SUBDIR)/libsanitizer/.

From-SVN: r205539
2013-11-29 10:10:21 -08:00
H.J. Lu
213f02f48e Move config ChangeLog entries to config/ChangeLog
From-SVN: r205538
2013-11-29 09:53:36 -08:00
H.J. Lu
b33593abbd Properly add path to libsanitizer.spec to cflags
* lib/asan-dg.exp (asan_link_flags): Properly add path to
	libsanitizer.spec to cflags.

From-SVN: r205537
2013-11-29 09:08:14 -08:00
Matthias Klose
be483ee77a exception, [...]: Remove empty dirs.
2013-11-29  Matthias Klose  <doko@ubuntu.com>

        * testsuite/experimental/string_view/requirements/exception,
        testsuite/experimental/string_view/capacity/wchar_t,
        testsuite/experimental/string_view/capacity/char: Remove empty dirs.

From-SVN: r205536
2013-11-29 17:04:30 +00:00
Matthias Klose
3e920bd03d gnu_java_awt_peer_gtk_FreetypeGlyphVector.c, [...]: Fix freetype includes.
2013-11-29  Matthias Klose  <doko@ubuntu.com>

        * native/jni/gtk-peer/gnu_java_awt_peer_gtk_FreetypeGlyphVector.c,
        native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkFontPeer.c:
        Fix freetype includes.

From-SVN: r205533
2013-11-29 16:53:39 +00:00
Eric Botcazou
b66eaab22a re PR ada/54040 ([x32] Incorrect timeval and timespec)
PR ada/54040
	PR ada/59346
	* s-osinte-hpux.ads (timespec): Change type of tv_nsec field to time_t.
	* s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
	* s-osinte-solaris-posix.ads (timespec): Likewise.

From-SVN: r205532
2013-11-29 16:19:36 +00:00
Jan Hubicka
fba0d71e26 * MAINTAINERS: Update my email address.
From-SVN: r205531
2013-11-29 15:34:32 +00:00
Jan Hubicka
cd4b644bbd Add missing testcase.
From-SVN: r205530
2013-11-29 15:25:31 +00:00
Kyrylo Tkachov
61cd472df7 re PR target/59289 ([ARM] regression on unsigned-extend-2.c)
2013-11-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/59289
	* config/arm/arm.c (cortexa15_extra_costs): Adjust costs.

From-SVN: r205529
2013-11-29 15:19:34 +00:00
Richard Biener
6a58cccac6 re PR middle-end/59208 (ice in initialize_flags_in_bb)
2013-11-29  Richard Biener  <rguenther@suse.de>

	PR middle-end/59208
	* tree-ssa-operands.h (fini_ssa_operands, verify_ssa_operands,
	free_stmt_operands, update_stmt_operands): Add struct function
	argument.
	* tree-ssa-operands.c: Remove uses of cfun, propagate struct
	function argument from fini_ssa_operands, verify_ssa_operands,
	free_stmt_operands and update_stmt_operands everywhere.
	* tree-ssanames.h (release_ssa_name_fn): New.
	(release_ssa_name): Inline wrapper around release_ssa_name_fn.
	* tree-ssanames.c (release_ssa_name): Rename to ...
	(release_ssa_name_fn): ... this and add struct function argument.
	* gimple-ssa.h (update_stmt, update_stmt_if_modified): Adjust.
	(update_stmt_fn): New function.
	* tree-cfg.c (move_block_to_fn): Adjust.
	* tree-if-conv.c (free_bb_predicate): Likewise.
	* tree-ssa.c (verify_ssa): Likewise.
	(delete_tree_ssa): Likewise.
	* gimple-pretty-print.c (dump_gimple_mem_ops): Remove guard.
	* cgraph.c (cgraph_redirect_edge_call_stmt_to_callee): Call
	update_stmt_fn instead of update_stmt.

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

From-SVN: r205528
2013-11-29 14:37:07 +00:00
Yvan Roux
78a14aa81e arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Return NO_REGS for LRA.
2013-11-29  Yvan Roux  <yvan.roux@linaro.org>

        * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Return NO_REGS
        for LRA.

From-SVN: r205527
2013-11-29 13:17:04 +00:00
Yvan Roux
b2ddad83bc arm.md (store_minmaxsi): Use only when optimize_function_for_size_p.
2013-11-29  Yvan Roux  <yvan.roux@linaro.org>

         * config/arm/arm.md (store_minmaxsi): Use only when
        optimize_function_for_size_p.

From-SVN: r205526
2013-11-29 13:10:52 +00:00
H.J. Lu
d7947e191b Properly handle function without arguments
PR c/59309
	* cilk.c (gimplify_cilk_spawn): Properly handle function without
	arguments.

From-SVN: r205525
2013-11-29 05:00:35 -08:00
Jakub Jelinek
35814b0346 re PR sanitizer/59063 (ASAN: segfault in __interceptor_clock_gettime)
gcc/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * config/gnu-user.h: Removed old code for setting up sanitizer
        libs.
        * gcc.c: Using libsanitizer spec instead of explicit libs.

gcc/testsuite/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * c-c++-common/asan/pr59063-1.c: New test.
        * c-c++-common/asan/pr59063-2.c: Likewise.
        * lib/asan-dg.exp: Add path to libsanitizer.spec to cflags.
        * lib/ubsan-dg.exp: Likewise.

libsanitizer/
2013-11-29  Jakub Jelinek  <jakub@redhat.com>
            Yury Gribov  <y.gribov@samsung.com>

        PR sanitizer/59063
        * libsanitizer.spec.in: Add spec file to hold link flags for
        various sanitizer libs.
        * configure.ac: Check whether clock_* routines come from librt.
        * asan/Makefile.am (libasan_la_LDFLAGS): Libs now come from
        configure.ac.
        * tsan/Makefile.am (libtsan_la_LDFLAGS): Likewise.
        * ubsan/Makefile.am (libubsan_la_LDFLAGS): Likewise.
        * lsan/Makefile.am (liblsan_la_LDFLAGS): Likewise.
        * asan/Makefile.in: Regenerate.
        * interception/Makefile.in: Regenerate.
        * lsan/Makefile.in: Regenerate.
        * sanitizer_common/Makefile.in: Regenerate.
        * tsan/Makefile.in: Regenerate.
        * ubsan/Makefile.in: Regenerate.
        * Makefile.in: Regenerate.
        * configure: Regenerate.


Co-Authored-By: Yury Gribov <y.gribov@samsung.com>

From-SVN: r205524
2013-11-29 12:30:36 +00:00
Eric Botcazou
08c5a7c685 * gnat.dg/opt29.ad[sb]: New test.
From-SVN: r205523
2013-11-29 12:16:07 +00:00
Ilya Enkovich
089d122746 revert: cgraph.h (varpool_node): Add need_bounds_init field.
Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* cgraph.h (varpool_node): Add need_bounds_init field.
	* lto-cgraph.c (lto_output_varpool_node): Output
	need_bounds_init value.
	(input_varpool_node): Read need_bounds_init value.
	* varpool.c (dump_varpool_node): Dump need_bounds_init field.

	Reverted:
	2013-11-20  Ilya Enkovich  <ilya.enkovich@intel.com>
	* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
	* dwarf2out.c (gen_subprogram_die): Ignore bound args.
	(gen_type_die_with_usage): Skip pointer bounds.
	(dwarf2out_global_decl): Likewise.

	Reverted:
	2013-11-18  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_PTR_CONST_PTR_VAR): New.
	* chkp-builtins.def (BUILT_IN_CHKP_BIND_BOUNDS): New.
	* cfgexpand.c (expand_call_stmt): Expand BUILT_IN_CHKP_BIND_BOUNDS.
	* gimple.c (gimple_call_get_nobnd_arg_index): Remove.
	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
	(gimple_call_with_bounds_p): New.
	(gimple_call_set_with_bounds): New.
	(gimple_call_num_nobnd_args): Remove.
	(gimple_call_nobnd_arg): Remove.
	* tree.h (CALL_WITH_BOUNDS_P): New.
	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.

	Reverted:
	2013-11-08  Ilya Enkovich  <ilya.enkovich@intel.com>
	* common.opt (fcheck-pointer-bounds): Move to ...
	* c-family/c.opt: ... here.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): Remove.
	(LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_CHKP_SUPPORTED.
	* langhooks.h (lang_hooks): Remove chkp_supported field.
	* toplev.c (process_options): Remove chkp_supported check.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
	* tree.h (POINTER_BOUNDS_P): New.
	(BOUNDED_TYPE_P): New.
	(BOUNDED_P): New.
	(pointer_bounds_type_node): New.
	* tree.c (build_common_tree_nodes): Initialize
	pointer_bounds_type_node.
	* gimple.h (gimple_call_get_nobnd_arg_index): New.
	(gimple_call_num_nobnd_args): New.
	(gimple_call_nobnd_arg): New.
	(gimple_return_retbnd): New.
	(gimple_return_set_retbnd): New
	* gimple.c (gimple_build_return): Increase number of ops
	for return statement.
	(gimple_call_get_nobnd_arg_index): New.
	* gimple-pretty-print.c (dump_gimple_return): Print second op.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
	with "chkp ctor" and "bnd_legacy" attributes.
	* gimplify.c (gimplify_init_constructor): Avoid infinite
	loop during gimplification of bounds initializer.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
	(handle_bnd_legacy): New.
	(c_common_attribute_table): Add bnd_variable_size and bnd_legacy.
	* doc/extend.texi: Document bnd_variable_size and bnd_legacy
	attributes.

	Reverted:
	2013-10-29  Ilya Enkovich  <ilya.enkovich@intel.com>
	* builtin-types.def (BT_FN_VOID_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR): New.
	(BT_FN_CONST_PTR_CONST_PTR): New.
	(BT_FN_PTR_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
	(BT_FN_VOID_PTRPTR_CONST_PTR): New.
	(BT_FN_VOID_CONST_PTR_SIZE): New.
	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
	* chkp-builtins.def: New.
	* builtins.def: include chkp-builtins.def.
	(DEF_CHKP_BUILTIN): New.
	* builtins.c (expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
	BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
	BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
	BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
	BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
	BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
	BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
	BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_ARG_BND, BUILT_IN_CHKP_NARROW,
	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
	* common.opt (fcheck-pointer-bounds): New.
	* toplev.c (process_options): Check Pointer Bounds Checker is
	supported.
	* doc/extend.texi: Document Pointer Bounds Checker built-in functions.

	Reverted:
	2013-10-30  Ilya Enkovich  <ilya.enkovich@intel.com>
	* target.def (builtin_chkp_function): New.
	(chkp_bound_type): New.
	(chkp_bound_mode): New.
	(fn_abi_va_list_bounds_size): New.
	(load_bounds_for_arg): New.
	(store_bounds_for_arg): New.
	* targhooks.h (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode): New.
	(default_builtin_chkp_function): New.
	* targhooks.c (default_load_bounds_for_arg): New.
	(default_store_bounds_for_arg): New.
	(default_fn_abi_va_list_bounds_size): New.
	(default_chkp_bound_type): New.
	(default_chkp_bound_mode); New.
	(default_builtin_chkp_function): New.
	* doc/tm.texi.in (TARGET_FN_ABI_VA_LIST_BOUNDS_SIZE): New.
	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
	(TARGET_STORE_BOUNDS_FOR_ARG): New.
	(TARGET_BUILTIN_CHKP_FUNCTION): New.
	(TARGET_CHKP_BOUND_TYPE): New.
	(TARGET_CHKP_BOUND_MODE): New.
	* doc/tm.texi: Regenerated.
	* langhooks.h (lang_hooks): Add chkp_supported field.
	* langhooks-def.h (LANG_HOOKS_CHKP_SUPPORTED): New.
	(LANG_HOOKS_INITIALIZER); Add LANG_HOOKS_CHKP_SUPPORTED.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* config/i386/constraints.md (B): New.
	(Ti): New.
	(Tb): New.
	* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
	* config/i386/i386-modes.def (BND32): New.
	(BND64): New.
	* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.c (isa_opts): Add mmpx.
	(regclass_map): Add bound registers.
	(dbx_register_map): Likewise.
	(dbx64_register_map): Likewise.
	(svr4_dbx_register_map): Likewise.
	(PTA_MPX): New.
	(ix86_option_override_internal): Support MPX ISA.
	(ix86_conditional_register_usage): Support bound registers.
	(print_reg): Likewise.
	(ix86_code_end): Add MPX bnd prefix.
	(output_set_got): Likewise.
	(ix86_output_call_insn): Likewise.
	(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
	(ix86_print_operand_punct_valid_p): Likewise.
	(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
	UNSPEC_BNDMK_ADDR.
	(ix86_class_likely_spilled_p): Add bound regs support.
	(ix86_hard_regno_mode_ok): Likewise.
	(x86_order_regs_for_local_alloc): Likewise.
	(ix86_bnd_prefixed_insn_p): New.
	* config/i386/i386.h (FIRST_PSEUDO_REGISTER): Fix to new value.
	(FIXED_REGISTERS): Add bound registers.
	(CALL_USED_REGISTERS): Likewise.
	(REG_ALLOC_ORDER): Likewise.
	(HARD_REGNO_NREGS): Likewise.
	(TARGET_MPX): New.
	(VALID_BND_REG_MODE): New.
	(FIRST_BND_REG): New.
	(LAST_BND_REG): New.
	(reg_class): Add BND_REGS.
	(REG_CLASS_NAMES): Likewise.
	(REG_CLASS_CONTENTS): Likewise.
	(BND_REGNO_P): New.
	(ANY_BND_REG_P): New.
	(BNDmode): New.
	(HI_REGISTER_NAMES): Add bound registers.
	* config/i386/i386.md (UNSPEC_BNDMK): New.
	(UNSPEC_BNDMK_ADDR): New.
	(UNSPEC_BNDSTX): New.
	(UNSPEC_BNDLDX): New.
	(UNSPEC_BNDLDX_ADDR): New.
	(UNSPEC_BNDCL): New.
	(UNSPEC_BNDCU): New.
	(UNSPEC_BNDCN): New.
	(UNSPEC_MPX_FENCE): New.
	(BND0_REG): New.
	(BND1_REG): New.
	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
	(length_immediate): Likewise.
	(prefix_0f): Likewise.
	(memory): Likewise.
	(prefix_rep): Check for bnd prefix.
	(length_nobnd): New.
	(length): Use length_nobnd if specified.
	(BND): New.
	(bnd_ptr): New.
	(BNDCHECK): New.
	(bndcheck): New.
	(*jcc_1): Add bnd prefix and rename length attr to length_nobnd.
	(*jcc_2): Likewise.
	(jump): Likewise.
	(simple_return_internal): Likewise.
	(simple_return_pop_internal): Likewise.
	(*indirect_jump): Add MPX bnd prefix.
	(*tablejump_1): Likewise.
	(simple_return_internal_long): Likewise.
	(simple_return_indirect_internal): Likewise.
	(<mode>_mk): New.
	(*<mode>_mk): New.
	(mov<mode>): New.
	(*mov<mode>_internal_mpx): New.
	(<mode>_<bndcheck>): New.
	(*<mode>_<bndcheck>): New.
	(<mode>_ldx): New.
	(*<mode>_ldx): New.
	(<mode>_stx): New.
	(*<mode>_stx): New.
	* config/i386/predicates.md (lea_address_operand): Rename to...
	(address_no_seg_operand): ... this.
	(address_mpx_no_base_operand): New.
	(address_mpx_no_index_operand): New.
	(bnd_mem_operator): New.
	* config/i386/i386.opt (mmpx): New.
	* doc/invoke.texi: Add documentation for the flags -mmpx, -mno-mpx.
	* doc/rtl.texi Add documentation for BND32mode and BND64mode.

	Reverted:
	2013-10-24  Ilya Enkovich  <ilya.enkovich@intel.com>
	* mode-classes.def (MODE_POINTER_BOUNDS): New.
	* tree.def (POINTER_BOUNDS_TYPE): New.
	* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
	(POINTER_BOUNDS_MODE): New.
	(make_pointer_bounds_mode): New.
	* machmode.h (POINTER_BOUNDS_MODE_P): New.
	* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
	(layout_type): Support POINTER_BOUNDS_TYPE.
	* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
	(type_contains_placeholder_1): Likewise.
	* tree.h (POINTER_BOUNDS_TYPE_P): New.
	* varasm.c (output_constant): Support POINTER_BOUNDS_TYPE.
	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.

From-SVN: r205522
2013-11-29 12:12:39 +00:00
Richard Biener
b8815bd32f re PR middle-end/59338 (error: position plus size exceeds size of referenced object in BIT_FIELD_REF)
2013-11-29  Richard Biener  <rguenther@suse.de>

	PR middle-end/59338
	* tree-cfg.c (verify_expr): Restrict bounds verification of
	BIT_FIELD_REF arguments to non-aggregate typed base objects.

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

From-SVN: r205521
2013-11-29 12:09:12 +00:00