Commit Graph

120709 Commits

Author SHA1 Message Date
Jakub Jelinek
dfc8400779 re PR testsuite/55587 ([ASAN] Testsuite test c-c++-common/asan/memcmp-1.c fails to link on targets without libasan/libsanitizer)
PR testsuite/55587
	* lib/asan-dg.exp (asan_init): Return 1 if libasan has been found,
	0 if not.
	* g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init]
	returned 0.
	* gcc.dg/asan/asan.exp: Likewise.

From-SVN: r194134
2012-12-04 14:21:11 +01:00
Jakub Jelinek
c954bddd5f re PR sanitizer/55439 (ThreadSanitizer: handle atomic operations)
PR sanitizer/55439
	* Makefile.in (tsan.o): Depend on tree-ssa-propagate.h.
	* sanitizer.def: Add __tsan_atomic* builtins.
	* asan.c (initialize_sanitizer_builtins): Adjust to also
	initialize __tsan_atomic* builtins.
	* tsan.c: Include tree-ssa-propagate.h.
	(enum tsan_atomic_action): New enum.
	(tsan_atomic_table): New table.
	(instrument_builtin_call): New function.
	(instrument_gimple): Take pointer to gimple_stmt_iterator
	instead of gimple_stmt_iterator.  Call instrument_builtin_call
	on builtin call stmts.
	(instrument_memory_accesses): Adjust instrument_gimple caller.
	* builtin-types.def (BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
	BT_FN_BOOL_VPTR_PTR_I2_INT_INT, BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
	BT_FN_BOOL_VPTR_PTR_I8_INT_INT, BT_FN_BOOL_VPTR_PTR_I16_INT_INT): New.

From-SVN: r194133
2012-12-04 14:20:20 +01:00
Jakub Jelinek
41d37c5656 Fix up two ChangeLog entries.
From-SVN: r194132
2012-12-04 14:18:54 +01:00
Tejas Belagod
db0253a428 aarch64.c (aarch64_simd_vector_alignment, [...]): New.
2012-12-04  Tejas Belagod  <tejas.belagod@arm.com>

        * config/aarch64/aarch64.c (aarch64_simd_vector_alignment,
        aarch64_simd_vector_alignment_reachable): New. 
        (TARGET_VECTOR_ALIGNMENT, TARGET_VECTORIZE_VECTOR_ALIGNMENT_REACHABLE):
        Define.

From-SVN: r194126
2012-12-04 11:43:04 +00:00
Richard Biener
c3dd8dd768 re PR tree-optimization/55124 (ICE in find_or_generate_expression, at tree-ssa-pre.c:2803)
2012-12-04  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/55124
	* tree-ssa-pre.c (find_or_generate_expression): Instead of
	ICEing when we are not able to generate an expression defer it
	by signalling failure.  Fix possible wrong-code issue by
	not picking random REFERENCE expressions as fallback.
	(create_component_ref_by_pieces_1): Adjust.  Add failure paths.
	(create_expression_by_pieces): Likewise.
	(insert_into_preds_of_block): When expression generation failed
	for one edge make sure to not insert a PHI node.

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

From-SVN: r194125
2012-12-04 09:19:05 +00:00
Ian Lance Taylor
f2b2ead42e compiler: Give error for constant inverted slice range.
From-SVN: r194124
2012-12-04 09:09:56 +00:00
Eric Botcazou
44bd7f6525 ia64.c (ia64_compute_frame_size): Allocate the scratch area if the function allocates dynamic stack space.
* config/ia64/ia64.c (ia64_compute_frame_size): Allocate the scratch
	area if the function allocates dynamic stack space.
	(ia64_initial_elimination_offset): Adjust offsets to above change.

From-SVN: r194121
2012-12-04 09:05:49 +00:00
Kostya Serebryany
8c4d267c6e [libsanitizer] Fix PR55521 by switching libsanitizer from mach_override to mac interpose functions on darwin
From-SVN: r194120
2012-12-04 07:00:35 +00:00
Ian Lance Taylor
3fa057a437 compiler: Reject invalid nil == nil comparisons.
From-SVN: r194119
2012-12-04 06:44:19 +00:00
Ian Lance Taylor
98fd70c20f mksysinfo: Fix TIOCNOTTY and TIOCSCTTY for ARM.
From Matthias Klose.

From-SVN: r194118
2012-12-04 06:23:37 +00:00
Ian Lance Taylor
4731f878b7 runtime: Fix build failures with -D_FORTIFY_SOURCE=2.
From-SVN: r194116
2012-12-04 06:18:07 +00:00
Ian Lance Taylor
3f7af571aa compiler: Fix crash in go/defer of some builtin functions.
From-SVN: r194114
2012-12-04 05:17:54 +00:00
Ian Lance Taylor
114d8843e6 compiler: Don't permit go/defer argument to be parenthesized.
Fixes Go repository issue 4468.

From-SVN: r194112
2012-12-04 00:28:30 +00:00
GCC Administrator
9394665eaf Daily bump.
From-SVN: r194111
2012-12-04 00:18:53 +00:00
Steven Bosscher
dca3da7afc gcse.c (struct reg_use): Remove unused struct.
* gcse.c (struct reg_use): Remove unused struct.
	(gcse_emit_move_after): Do not create REG_EQUAL notes that reference
	the SET_DEST of the instruction the note would be attached to.
	* cse.c (cse_main): Add the DF_NOTE problem.

From-SVN: r194108
2012-12-03 23:28:42 +00:00
Benjamin Kosnik
cef1bc586c standard_policies.hpp: Remove.
2012-12-03  Benjamin Kosnik  <bkoz@redhat.com>

	* include/ext/pb_ds/detail/cc_hash_table_map_/standard_policies.hpp:
	Remove.
	* include/ext/pb_ds/detail/gp_hash_table_map_/standard_policies.hpp:
	Remove.
 	* include/Makefile.am (pb_headers): Remove include files.
	* include/Makefile.in: Regenerated.

From-SVN: r194107
2012-12-03 23:23:52 +00:00
Janus Weil
a07c4054c2 re PR fortran/55548 (SYSTEM_CLOCK with integer(8) provides nanosecond resolution, but only microsecond precision (without -lrt))
2012-12-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/55548
	* intrinsics/system_clock.c (gf_gettime_mono): Add argument 'tck',
	which returns the clock resolution.
	(system_clock_4): Get resolution from gf_gettime_mono, but limit to
	1000/s.
	(system_clock_8): Get resolution from gf_gettime_mono.

2012-12-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/55548
	* intrinsic.texi (SYSTEM_CLOCK): Update documentation of SYSTEM_CLOCK.

From-SVN: r194105
2012-12-03 23:06:41 +01:00
Tobias Burnus
86035eeca6 re PR fortran/37336 ([F03] Finish derived-type finalization)
2012-12-03  Tobias Burnus  <burnus@net-b.de>
            Janus Weil  <janus@gcc.gnu.org>

        PR fortran/37336
        * class.c (gfc_is_finalizable): New function.
        * gfortran.h (gfc_is_finalizable): Its prototype.
        * module.c (mio_component): Read initializer for vtype's _final.
        * resolve.c (resolve_fl_derived0): Call gfc_is_finalizable.
        * trans-expr.c (gfc_vtable_final_get): New function.
        (conv_parent_component_references): Fix comment.
        (gfc_conv_variable): Fix for scalar coarray components.
        * trans-intrinsic.c (conv_intrinsic_move_alloc): For BT_CLASS,
        pass the BT_CLASS type and not the declared type to
        gfc_deallocate_scalar_with_status.
        * trans.h (gfc_vtable_final_get): New prototype.


Co-Authored-By: Janus Weil <janus@gcc.gnu.org>

From-SVN: r194104
2012-12-03 22:13:42 +01:00
Jakub Jelinek
0e668eaf77 sanitizer.def: Add Address Sanitizer builtins.
* sanitizer.def: Add Address Sanitizer builtins.
	Rename BUILT_IN_TSAN_READ_* to BUILT_IN_TSAN_READ* and
	BUILT_IN_TSAN_WRITE_* to BUILT_IN_TSAN_WRITE*.
	* Makefile.in (asan.o): Depend on langhooks.h.
	(tsan.o): Depend on asan.h.
	* asan.h (initialize_sanitizer_builtins): New prototype.
	* asan.c: Include langhooks.h.
	(report_error_func): Use builtin_decl_implicit of corresponding
	BUILT_IN_ASAN_REPORT_{LOAD,STORE}*.
	(asan_init_func): Removed.
	(initialize_sanitizer_builtins): New function.
	(asan_finish_file): Call it.  Use builtin_decl_implicit
	on BUILT_IN_ASAN_{INIT,{,UN}REGISTER_GLOBALS}.
	(asan_instrument): Call initialize_sanitizer_builtins.
	* builtins.def (DEF_SANITIZER_BUILTIN): Change condition to
	(flag_asan || flag_tsan).
	* tsan.c: Include asan.h and tsan.h.
	(get_memory_access_decl): Rename BUILT_IN_TSAN_{READ,WRITE}_*
	to BUILT_IN_TSAN_{READ,WRITE}*.
	(tsan_pass): Call initialize_sanitizer_builtins.
	(tsan_gate, tsan_gate_O0): Don't check if
	builtin_decl_implicit_p (BUILT_IN_TSAN_INIT) is true.
	(tsan_finish_file): Call initialize_sanitizer_builtins.
	* builtin-types.def (BT_FN_VOID_PTR_PTRMODE): New fn type.

From-SVN: r194103
2012-12-03 18:28:10 +01:00
Jakub Jelinek
f41e5bd19d re PR bootstrap/55380 (All search_line_fast implementations read beyond buffer)
PR bootstrap/55380
	PR other/54691
	* files.c (read_file_guts): Allocate extra 16 bytes instead of
	1 byte at the end of buf.  Pass size + 16 instead of size
	to _cpp_convert_input.
	* charset.c (_cpp_convert_input): Reallocate if there aren't
	at least 16 bytes beyond to.len in the buffer.  Clear 16 bytes
	at to.text + to.len.

From-SVN: r194102
2012-12-03 18:19:47 +01:00
Tobias Burnus
36402bb186 strtod_l.c (___STRTOF_INTERNAL): Fix exponent reading.
2012-12-03  Tobias Burnus  <burnus@net-b.de>

        * strtod/strtod_l.c (___STRTOF_INTERNAL): Fix exponent
        reading.

2012-12-03  Tobias Burnus  <burnus@net-b.de>

        * gfortran.dg/quad_3.f90: New.

From-SVN: r194100
2012-12-03 17:16:28 +01:00
Aldy Hernandez
0ed3d24e39 re PR middle-end/55401 (uninstrumented path in TM clones are still instrumented)
PR middle-end/55401
	* trans-mem.c (get_tm_region_blocks): Exclude uninstrumented
	blocks from vector if requested.
	(collect_bb2reg): Pass new argument to
	get_tm_region_blocks.
	(get_bb_regions_instrumented): Add INCLUDE_UNINSTRUMENTED_P
	argument, and pass it to expand_regions.
	(execute_tm_mark): Pass new argument to
	get_bb_regions_instrumented.
	(execute_tm_edges): Same.

From-SVN: r194099
2012-12-03 16:11:21 +00:00
Paolo Carlini
e3692e025b re PR c++/54170 (Call to lambda elided)
/cp
2012-12-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54170
	* cvt.c (cp_convert_to_pointer): Don't discard side-effects from
	expressions of nullptr_t.
	* typeck.c (build_ptrmemfunc): Likewise.

/testsuite
2012-12-03  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/54170
	* g++.dg/cpp0x/lambda/lambda-nullptr.C: New.

From-SVN: r194098
2012-12-03 16:01:32 +00:00
Jakub Jelinek
cc1f4a3020 re PR testsuite/55452 (gfortran.dg/reassoc_4.f -O scan-tree-dump-times reassoc1)
PR testsuite/55452
	* gfortran.dg/reassoc_4.f: Use --param max-completely-peeled-insns=400
	on all targets, not just s390*.

From-SVN: r194095
2012-12-03 16:18:49 +01:00
Jakub Jelinek
c63d3b963c asan.c (instrument_mem_region_access): Don't instrument if base doesn't have pointer type or len integral type.
* asan.c (instrument_mem_region_access): Don't instrument
	if base doesn't have pointer type or len integral type.
	Add cast if len doesn't have size_t compatible type.
	(instrument_builtin_call): Don't instrument BUILT_IN_ATOMIC_LOAD,
	BUILT_IN_ATOMIC_TEST_AND_SET, BUILT_IN_ATOMIC_CLEAR,
	BUILT_IN_ATOMIC_EXCHANGE, BUILT_IN_ATOMIC_COMPARE_EXCHANGE
	and BUILT_IN_ATOMIC_STORE.

From-SVN: r194094
2012-12-03 16:04:57 +01:00
Diego Novillo
f15b972787 Fix stale use of old 'options' argument.
An earlier patch had made the command line options a global variable
_OPTIONS, but it had not renamed all the uses of the old options argument.

	* testsuite-management/validate_failures.py: Fix stale
	use of 'options'.

From-SVN: r194092
2012-12-03 09:53:37 -05:00
Kirill Yukhin
ad25c55802 Adding missed in r194086 file.
From-SVN: r194088
2012-12-03 13:59:38 +00:00
Jakub Jelinek
52f2e7e1e9 asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only for gimple_assign_load_p.
* asan.c (instrument_assignment): Instrument lhs only
	for gimple_store_p and rhs1 only for gimple_assign_load_p.

From-SVN: r194087
2012-12-03 14:57:29 +01:00
Michael Zolotukhin
4a0639a2a9 Makefile.in: Add target mddump, build/genmddump.o.
* Makefile.in: Add target mddump, build/genmddump.o.  Extend
genprogrtl with mddump.
* genmddump.c: New.

From-SVN: r194086
2012-12-03 13:54:07 +00:00
Steven Bosscher
41222ddf8e rtl.h (print_insn_with_notes): Prototype.
* rtl.h (print_insn_with_notes): Prototype.
	* sched-vis.c (print_insn_with_notes): Export it.

	* gimple-pretty-print.h (gimple_dump_bb_for_graph): Prototype.
	* gimple-pretty-print.c (print_gimple_expr): Flush the buffer.
	(pp_gimple_stmt_1): Don't do it here.
	(gimple_dump_bb_for_graph): New function.
	* tree-pretty-print.c (print_generic_expr): Flush the buffer here.
	(dump_generic_node): Don't flush the buffer here.

	* graph.h (print_rtl_graph_with_bb): Rename to print_graph_cfg.
	* graph.c: Include gimple.h, dumpfile.h, and gimple-pretty-print.h.
	(draw_cfg_node): Handle GIMPLE basic blocks also.
	(print_rtl_graph_with_bb): Rename to print_graph_cfg.
	* passes.c (finish_optimization_passes): Don't finish graph dumps here.
	(execute_function_dump): Use print_graph_cfg. Enable dumping the CFG
	for GIMPLE also.
	(pass_init_dump_file): Wrap in TV_DUMP.  Set up CFG graph dumps.
	(pass_fini_dump_file): Wrap in TV_DUMP.  Finish graph dumps.
	(execute_one_pass): Don't set up graph dumps here.

From-SVN: r194085
2012-12-03 13:16:55 +00:00
Marek Polacek
a859517f1e Fix PR c/55570.
From-SVN: r194083
2012-12-03 13:02:04 +00:00
Eric Botcazou
ea3c6c07bd tree-ssa.c (warn_uninitialized_var): Use OPT_Wmaybe_uninitialized tag in the non-always executed case.
* tree-ssa.c (warn_uninitialized_var): Use OPT_Wmaybe_uninitialized tag
	in the non-always executed case.

From-SVN: r194082
2012-12-03 12:08:35 +00:00
Jakub Jelinek
5c31da80bb asan-dg.exp (asan_get_gtest_test_list, [...]): New procedures.
* lib/asan-dg.exp (asan_get_gtest_test_list,
	asan_get_gtest_expect_death_list, asan-gtest): New procedures.
	(proc ${tool}_load): Remember [asan_get_gtest_test_list "$output"]
	and [asan_get_gtest_expect_death_list "$output"] in global vars.
	(asan_symbolize): Sanitize [] characters from key.
	* g++.dg/asan/asan_test_config.h: New file.
	* g++.dg/asan/asan_globals_test.cc: New file.
	* g++.dg/asan/asan_test_utils.h: New file.
	* g++.dg/asan/dejagnu-gtest.h: New file.
	* g++.dg/asan/asan_test.cc: New file.
	* g++.dg/asan/asan_test.C: New test.

From-SVN: r194081
2012-12-03 12:49:41 +01:00
Sofiane Naci
d9600ae5a3 [AARCH64] Refactor constant generation.
2012-12-03  Sofiane Naci  <sofiane.naci@arm.com>

	* config/aarch64/aarch64.c (aarch64_build_constant): Update prototype.
	Call emit_move_insn	instead of printing movi/movn/movz instructions.
	Call gen_insv_immdi instead of printing movk instruction.
	(aarch64_add_constant): Update prototype.
	Generate RTL instead of printing add/sub instructions.
	(aarch64_output_mi_thunk): Update calls to aarch64_build_constant
	and aarch64_add_constant.

From-SVN: r194080
2012-12-03 11:13:41 +00:00
Richard Biener
6ff11db28b pr35634.c: Use signed char.
2012-12-03  Richard Biener  <rguenther@suse.de>

	* gcc.dg/torture/pr35634.c: Use signed char.
	* g++.dg/torture/pr35634.C: Likewise.

From-SVN: r194078
2012-12-03 10:45:16 +00:00
Tobias Burnus
021aa628c6 re PR fortran/55475 (heap-buffer-overflow in fortran/error.c)
2012-12-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/55475
        * scanner.c (gfc_next_char_literal): Fix setting locus
        to free_line_length for the error message.
        * error.c (show_locus): Fix potential out-of-bounds
        read.

From-SVN: r194076
2012-12-03 09:56:11 +01:00
Tobias Burnus
29a7d776ea re PR fortran/37336 ([F03] Finish derived-type finalization)
2012-11-03  Tobias Burnus  <burnus@net-b.de>

        PR fortran/37336
        * class.c (finalizer_insert_packed_call): New static function.
        (finalize_component, generate_finalization_wrapper):
        Fix coarray handling and packing.

From-SVN: r194075
2012-12-03 09:54:18 +01:00
Ian Lance Taylor
9cc263b852 compiler: Fix field tracking for references in global initializers.
From-SVN: r194073
2012-12-03 07:21:16 +00:00
Kai Tietz
9204da15ef re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32)
PR target/53912
	* ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t.

From-SVN: r194072
2012-12-03 08:05:26 +01:00
Kai Tietz
c63d51cc18 re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32)
PR target/53912
	* tree-dump.c (dump_pointer): Print pointer via HOST_WIDE_INT_PRINT.

From-SVN: r194070
2012-12-03 08:02:17 +01:00
Ian Lance Taylor
cfb84a52ec compiler: Don't encode non-ASCII characters in identifiers.
From-SVN: r194068
2012-12-03 06:57:04 +00:00
Kai Tietz
b4ec63970a re PR bootstrap/53912 (bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32)
PR target/53912
	* pointer-set.c (hash1): Cast from pointer via uintptr_t.

From-SVN: r194067
2012-12-03 07:56:16 +01:00
Ian Lance Taylor
405c87c4d3 compiler: Fix nil func panics, constant type conversions.
From-SVN: r194064
2012-12-03 03:25:18 +00:00
GCC Administrator
9b8a401725 Daily bump.
From-SVN: r194063
2012-12-03 00:18:00 +00:00
Marek Polacek
60cec1fd88 re PR middle-end/54838 (ICE: in merge_latch_edges, at cfgloop.c:678 with -ftracer)
PR54838

From-SVN: r194060
2012-12-02 20:16:09 +00:00
Teresa Johnson
bde8c9629a re PR gcov-profile/55551 (Revision 193999 breaks lto/profiledbootstrap)
2012-12-02  Teresa Johnson  <tejohnson@google.com>

        PR gcov-profile/55551
	* lto-cgraph.c (merge_profile_summaries): Handle scaled histogram
        entries that map to the same index.

From-SVN: r194055
2012-12-02 16:40:28 +00:00
Steven Bosscher
853f8f1c1c optabs.c (add_equal_note): Do not create self-referencing REG_EQUAL notes.
* optabs.c (add_equal_note): Do not create self-referencing REG_EQUAL
	notes.
	* fwprop.c (forward_propagate_and_simplify): Likewise.

From-SVN: r194054
2012-12-02 15:46:26 +00:00
Steven Bosscher
fa967f341c function.h (struct rtl_data): Remove epilogue_delay_list.
* function.h (struct rtl_data): Remove epilogue_delay_list.
	* reorg.c (find_end_label): Simplify always-true test.
	(optimize_skip): Likewise.
	* final.c (leaf_function_p): Don't loop over epilogue_delay_list.
	(leaf_renumber_regs): Likewise.
	* varasm.c (mark_constant_pool): Likewise.
	* except.c (set_nothrow_function_flags): Likewise.
	* cfgrtl.c (print_rtl_with_bb): Likewise.

From-SVN: r194053
2012-12-02 15:43:16 +00:00
Paul Thomas
474d486a73 resolve.c (resolve_allocate_deallocate, [...]): Recover revisions 193568 and 193778...
2012-12-02  Paul Thomas  <pault@gcc.gnu.org>

	* resolve.c (resolve_allocate_deallocate,
	resolve_typebound_intrinsic_op): Recover revisions 193568 and
	193778, which were accidentally reverted by the previous patch.

From-SVN: r194052
2012-12-02 15:23:30 +00:00
Hans-Peter Nilsson
9b6343a1d4 Remove stray "gcc/" heading to previous^2 entry.
From-SVN: r194051
2012-12-02 11:34:55 +00:00