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 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
* 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
* 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 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 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
* 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
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
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
* 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
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
* 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-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 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